-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert most tslint rules to eslint, changed most inline comments in the sources as well. Some tslint rules still work, hence why you will be able to see `// tslint` comments. Unfortunately, there is an outstanding issue regarding eslint performance on large typescript monorepos, so we should fallback to linting all packages individually until this is fixed. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
- Loading branch information
1 parent
4bfe7e5
commit 05ad6de
Showing
462 changed files
with
2,298 additions
and
1,249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'./configs/base.eslintrc.json', | ||
'./configs/warnings.eslintrc.json', | ||
'./configs/errors.eslintrc.json' | ||
], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: [ | ||
'tsconfig.json', | ||
'dev-packages/*/tsconfig.json', | ||
'packages/*/tsconfig.json', | ||
'examples/*/tsconfig.json' | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ gh-pages | |
.vscode/ipch | ||
dev-packages/electron/compile_commands.json | ||
*.tsbuildinfo | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 6, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"@typescript-eslint/tslint", | ||
"import", | ||
"no-null" | ||
], | ||
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": [ | ||
"node_modules", | ||
"*.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"./base.eslintrc.json", | ||
"./errors.eslintrc.json" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"rules": { | ||
"@typescript-eslint/class-name-casing": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/indent": "off", // temp | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"@typescript-eslint/semi": [ | ||
"error", | ||
"always" | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"arrow-body-style": [ | ||
"error", | ||
"as-needed" | ||
], | ||
"arrow-parens": [ | ||
"error", | ||
"as-needed" | ||
], | ||
"camelcase": "off", | ||
"comma-dangle": "off", | ||
"curly": "error", | ||
"eol-last": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"smart" | ||
], | ||
"guard-for-in": "error", | ||
"id-blacklist": "off", | ||
"id-match": "off", | ||
"import/no-deprecated": "error", | ||
"import/no-extraneous-dependencies": "off", | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 180 | ||
} | ||
], | ||
"no-magic-numbers": "off", | ||
"no-multiple-empty-lines": "error", | ||
"no-new-wrappers": "error", | ||
"no-null/no-null": "error", | ||
"no-shadow": [ | ||
"error", | ||
{ | ||
"hoist": "all" | ||
} | ||
], | ||
"no-throw-literal": "error", | ||
"no-trailing-spaces": "error", | ||
"no-underscore-dangle": "off", | ||
"no-unused-expressions": "error", | ||
"no-var": "error", | ||
"no-void": "off", // @theia/plugin-ext uses this? | ||
"one-var": [ | ||
"error", | ||
"never" | ||
], | ||
"prefer-const": [ | ||
"error", | ||
{ | ||
"destructuring": "all" | ||
} | ||
], | ||
"radix": "off", | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "always", | ||
"named": "never", | ||
"asyncArrow": "always" | ||
} | ||
], | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"exceptions": ["*", "+", "-", "/"] | ||
} | ||
], | ||
"@typescript-eslint/tslint/config": [ | ||
"error", { | ||
"rules": { | ||
"file-header": [ | ||
true, | ||
"SPDX-License-Identifier: EPL-2\\.0 OR GPL-2\\.0 WITH Classpath-exception-2\\.0" | ||
], | ||
"jsdoc-format": [ | ||
true, | ||
"check-multiline-start" | ||
], | ||
"one-line": [ | ||
true, | ||
"check-open-brace", | ||
"check-catch", | ||
"check-else", | ||
"check-whitespace" | ||
], | ||
"typedef": [ | ||
true, | ||
"call-signature", | ||
"property-declaration" | ||
], | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.