Merge pull request #2827 from Tyriar/eslint_types

Convert eslintrc to json and fix errors
This commit is contained in:
Daniel Imms
2020-04-10 10:29:46 -07:00
committed by GitHub
2 changed files with 8 additions and 7 deletions
+7 -6
View File
@@ -1,4 +1,4 @@
module.exports = { {
"env": { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
@@ -23,7 +23,9 @@ module.exports = {
], ],
"sourceType": "module" "sourceType": "module"
}, },
"ignorePatterns": "**/typings/*.d.ts", "ignorePatterns": [
"**/typings/*.d.ts"
],
"plugins": [ "plugins": [
"@typescript-eslint" "@typescript-eslint"
], ],
@@ -79,7 +81,7 @@ module.exports = {
{ "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] }, { "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] },
// typeLike // typeLike
{ "selector": "typeLike", "format": ["PascalCase"] }, { "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }, { "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
], ],
"@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/type-annotation-spacing": "error", "@typescript-eslint/type-annotation-spacing": "error",
@@ -92,7 +94,6 @@ module.exports = {
"error", "error",
"always" "always"
], ],
"@typescript-eslint/type-annotation-spacing": "error",
"comma-dangle": [ "comma-dangle": [
"error", "error",
{ {
@@ -116,7 +117,7 @@ module.exports = {
"no-else-return": [ "no-else-return": [
"error", "error",
{ {
allowElseIf: false "allowElseIf": false
} }
], ],
"no-eval": "error", "no-eval": "error",
@@ -146,4 +147,4 @@ module.exports = {
} }
] ]
} }
}; }
+1 -1
View File
@@ -11,7 +11,7 @@
"prepackage": "npm run build", "prepackage": "npm run build",
"package": "webpack", "package": "webpack",
"start": "node demo/start", "start": "node demo/start",
"lint": "eslint -c .eslintrc.js --ext .ts src/ addons/", "lint": "eslint -c .eslintrc.json --ext .ts src/ addons/",
"test": "npm run test-unit", "test": "npm run test-unit",
"posttest": "npm run lint", "posttest": "npm run lint",
"test-api": "npm run test-api-chromium", "test-api": "npm run test-api-chromium",