Skip to content

Commit

Permalink
feat: add jsonc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Jun 26, 2024
1 parent 3889fa5 commit 58a2a16
Show file tree
Hide file tree
Showing 7 changed files with 394 additions and 707 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-bears-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/eslint-config-hyperse": patch
---

add jsonc plugin
434 changes: 217 additions & 217 deletions .yarn/releases/yarn-4.3.0.cjs → .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.0.cjs
yarnPath: .yarn/releases/yarn-4.3.1.cjs
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@
"app-root-path": "^3.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-sonarjs": "^1.0.3",
"eslint-plugin-tailwindcss": "^3.17.3",
"eslint-plugin-tailwindcss": "^3.17.4",
"eslint-plugin-vitest": "^0.5.4",
"get-tsconfig": "^4.7.5",
"globals": "^15.6.0",
Expand All @@ -90,12 +91,12 @@
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.5",
"@changesets/cli": "2.27.6",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@swc/core": "^1.6.3",
"@swc/core": "^1.6.5",
"@types/eslint__js": "^8.42.3",
"@types/node": "20.14.5",
"@types/node": "20.14.9",
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.5.0",
Expand All @@ -105,8 +106,8 @@
"rimraf": "5.0.7",
"swc-unplugin-ts": "1.0.3",
"tsup": "^8.1.0",
"tsx": "^4.15.6",
"typescript": "5.4.5",
"tsx": "^4.15.7",
"typescript": "5.5.2",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
},
Expand All @@ -117,5 +118,5 @@
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@4.3.0"
"packageManager": "yarn@4.3.1"
}
2 changes: 2 additions & 0 deletions src/main/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
typescript,
vitest,
} from '../rules/index.js';
import { jsonc } from '../rules/jsonc.js';

export const base = defineFlatConfig([
...typescript,
Expand All @@ -16,5 +17,6 @@ export const base = defineFlatConfig([
...prettier,
...regexp,
...sonar,
...jsonc,
...mdx,
]);
12 changes: 12 additions & 0 deletions src/rules/jsonc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineFlatConfig } from 'eslint-define-config';
import eslintPluginJsonc from 'eslint-plugin-jsonc';

export const jsonc = defineFlatConfig([
...eslintPluginJsonc.configs['flat/recommended-with-jsonc'],
{
rules: {
// override/add rules settings here, such as:
// 'jsonc/rule-name': 'error'
},
},
]);
Loading

0 comments on commit 58a2a16

Please sign in to comment.