-
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.
1. use tsc build mode Packages are built in topological order, one after the other. Typescript recently added a "build" mode, that allows us to somewhat link all the packages together into one compilation step, speeding up compilation time. This commit makes use of this by rewiring the monorepo to use tsc build and incremental mode. Reworked a few scripts to accomodate with the new build method. 2. replace tslint with eslint 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 <[email protected]>
- Loading branch information
1 parent
e1d08d0
commit 1ca3ec3
Showing
582 changed files
with
4,079 additions
and
1,782 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 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'./configs/base.eslintrc.json', | ||
'./configs/warnings.eslintrc.json', | ||
'./configs/errors.eslintrc.json' | ||
], | ||
ignorePatterns: [ | ||
'**/{node_modules,lib}', | ||
'plugins' | ||
], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: '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 |
---|---|---|
|
@@ -23,3 +23,5 @@ plugins | |
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 |
---|---|---|
|
@@ -22,4 +22,4 @@ | |
], | ||
"sourceMap": true | ||
} | ||
} | ||
} |
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,129 @@ | ||
{ | ||
"rules": { | ||
"@typescript-eslint/class-name-casing": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/indent": "error", | ||
"@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": "error", | ||
"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" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.