Skip to content

Commit 14a92d8

Browse files
committed
eslint-plugin-jsonc
1 parent f99ed60 commit 14a92d8

File tree

5 files changed

+32
-26
lines changed

5 files changed

+32
-26
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ module.exports = {
1111
"plugin:@mysticatea/es2015",
1212
"plugin:@mysticatea/+node",
1313
"plugin:@mysticatea/+eslint-plugin",
14+
'plugin:jsonc/recommended-with-jsonc',
15+
'plugin:jsonc/auto-config'
1416
],
1517
rules: {
1618
"require-jsdoc": "error",

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"javascript",
44
"javascriptreact",
55
"vue",
6-
"typescript"
6+
"typescript",
7+
"json",
8+
"jsonc"
79
],
810
"typescript.validate.enable": true,
911
"javascript.validate.enable": false,

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": "tsc --project ./tsconfig.build.json",
1212
"clean": "rimraf .nyc_output dist coverage",
1313
"lint": "eslint \"tests\" \"lib\" \"docs/.vuepress\" --ext .js,.vue,.ts",
14+
"lint:json": "eslint . --ext .json",
1415
"eslint-fix": "eslint \"tests\" \"lib\" \"docs/.vuepress\" --ext .js,.vue,.ts --fix",
1516
"pretest": "npm run build",
1617
"test:base": "mocha --require ts-node/register \"tests/**/*.ts\" --reporter dot --timeout 60000",
@@ -56,6 +57,7 @@
5657
"@types/node": "^14.0.13",
5758
"babel-eslint": "^10.1.0",
5859
"eslint": "^7.3.0",
60+
"eslint-plugin-jsonc": "0.0.0",
5961
"eslint4b": "^7.3.1",
6062
"mocha": "^7.0.0",
6163
"nyc": "^15.1.0",

tsconfig.build.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "./tsconfig.json",
3-
"exclude": ["tests/**/*", "tools/**/*", "typings/**/*",],
4-
"compilerOptions": {
5-
"removeComments": true, /* Do not emit comments to output. */
6-
}
7-
}
2+
"extends": "./tsconfig.json",
3+
"exclude": ["tests/**/*", "tools/**/*", "typings/**/*"],
4+
"compilerOptions": {
5+
"removeComments": true /* Do not emit comments to output. */
6+
}
7+
}

tsconfig.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"compilerOptions": {
3-
"target": "es2015",
4-
"module": "commonjs",
5-
"lib": ["es2020"],
6-
"allowJs": true,
7-
"checkJs": true,
8-
"outDir": "./dist",
9-
"strict": true,
10-
"noImplicitAny": true,
2+
"compilerOptions": {
3+
"target": "es2015",
4+
"module": "commonjs",
5+
"lib": ["es2020"],
6+
"allowJs": true,
7+
"checkJs": true,
8+
"outDir": "./dist",
9+
"strict": true,
10+
"noImplicitAny": true,
1111

12-
"noUnusedLocals": true,
13-
"noUnusedParameters": true,
14-
"noImplicitReturns": true,
15-
"noFallthroughCasesInSwitch": true,
16-
"baseUrl": ".",
17-
"paths": {
18-
"*": ["typings/*"]
12+
"noUnusedLocals": true,
13+
"noUnusedParameters": true,
14+
"noImplicitReturns": true,
15+
"noFallthroughCasesInSwitch": true,
16+
"baseUrl": ".",
17+
"paths": {
18+
"*": ["typings/*"]
19+
},
20+
"esModuleInterop": true
1921
},
20-
"esModuleInterop": true
21-
},
22-
"include": ["lib/**/*", "tests/**/*", "tools/**/*", "typings/**/*"]
22+
"include": ["lib/**/*", "tests/**/*", "tools/**/*", "typings/**/*"]
2323
}

0 commit comments

Comments
 (0)