forked from stryker-mutator/stryker-js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): migrate tslint -> eslint migration & prettier (stryker-m…
…utator#1731) * Migrate tslint config to eslint * Configure eslint with typescript parser * Configure vscode to fix on save * Document eslint in CONTRIBUTING.md
- Loading branch information
Showing
357 changed files
with
2,943 additions
and
2,799 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 2 space indentation | ||
[{*.ts,*.js,*.json}] | ||
[{*.ts,*.js,*jsx,*tsx,*.json,*.code-workspace}] | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 |
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,7 @@ | ||
.gitignore | ||
/e2e/** | ||
/helpers/** | ||
/perf/** | ||
**/node_modules/** | ||
*.d.ts | ||
/packages/*/testResources/** |
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,118 @@ | ||
|
||
module.exports = { | ||
env: { | ||
node: true | ||
}, | ||
parserOptions: { | ||
sourceType: 'module', | ||
project: [require.resolve('./tsconfig.lint.json')] | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
extends: ['prettier', 'eslint:recommended'], | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
rules: { | ||
'prettier/prettier': ['error'], | ||
'sort-imports': 'off', // No auto-fix! | ||
'no-case-declarations': 'off', | ||
'@typescript-eslint/adjacent-overload-signatures': 'error', | ||
'@typescript-eslint/array-type': [ | ||
'error', | ||
{ | ||
default: 'array-simple' | ||
} | ||
], | ||
'@typescript-eslint/await-thenable': 'off', | ||
'@typescript-eslint/ban-ts-ignore': 'error', | ||
'@typescript-eslint/ban-types': 'error', | ||
'brace-style': 'off', | ||
'@typescript-eslint/brace-style': 'error', | ||
camelcase: 'off', | ||
'@typescript-eslint/camelcase': 'error', | ||
'@typescript-eslint/class-name-casing': 'error', | ||
'@typescript-eslint/consistent-type-assertions': 'error', | ||
'@typescript-eslint/consistent-type-definitions': 'error', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-member-accessibility': 'off', | ||
'func-call-spacing': 'off', | ||
'@typescript-eslint/func-call-spacing': 'error', | ||
'@typescript-eslint/generic-type-naming': 'off', | ||
indent: 'off', | ||
'@typescript-eslint/indent': 'off', | ||
'@typescript-eslint/interface-name-prefix': ['error', 'never'], | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/member-naming': 'error', | ||
'@typescript-eslint/member-ordering': 'off', | ||
'no-array-constructor': 'off', | ||
'@typescript-eslint/no-array-constructor': 'error', | ||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'no-extra-parens': 'off', | ||
'@typescript-eslint/no-extra-parens': ['error', 'functions'], | ||
'@typescript-eslint/no-extraneous-class': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-for-in-array': 'error', | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'no-magic-numbers': 'off', | ||
'@typescript-eslint/no-magic-numbers': 'off', | ||
'@typescript-eslint/no-misused-new': 'error', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
'@typescript-eslint/no-parameter-properties': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-type-alias': 'off', | ||
'@typescript-eslint/no-unnecessary-condition': 'off', | ||
'@typescript-eslint/no-unnecessary-qualifier': 'error', | ||
'@typescript-eslint/no-unnecessary-type-arguments': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'error', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
'@typescript-eslint/prefer-function-type': 'error', | ||
'@typescript-eslint/prefer-includes': 'error', | ||
'@typescript-eslint/prefer-namespace-keyword': 'error', | ||
'@typescript-eslint/prefer-readonly': 'error', | ||
'@typescript-eslint/prefer-regexp-exec': 'error', | ||
'@typescript-eslint/prefer-string-starts-ends-with': 'error', | ||
'@typescript-eslint/promise-function-async': 'off', | ||
quotes: 'off', | ||
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }], | ||
'@typescript-eslint/require-array-sort-compare': 'error', | ||
'require-await': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'error', | ||
semi: 'off', | ||
'@typescript-eslint/semi': 'off', | ||
'@typescript-eslint/strict-boolean-expressions': 'off', | ||
'@typescript-eslint/triple-slash-reference': 'error', | ||
'@typescript-eslint/type-annotation-spacing': 'error', | ||
'@typescript-eslint/typedef': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/unified-signatures': 'error' | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
rules: { | ||
'no-undef': 'off', | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'error', | ||
{ | ||
overrides: { | ||
constructors: 'no-public', | ||
properties: 'explicit' | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ node_modules | |
lerna-debug.log | ||
npm-debug.log | ||
stryker.log | ||
tslint.log | ||
lint.log | ||
|
||
coverage | ||
reports | ||
|
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,4 @@ | ||
{ | ||
"printWidth": 150, | ||
"singleQuote": 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ node_js: | |
- 'node' | ||
- '8' | ||
before_script: | ||
- npm prune | ||
- npm ls | ||
sudo: 'false' | ||
addons: | ||
|
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
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,3 @@ | ||
{ | ||
"extends": "../../.eslintrc.js" | ||
} |
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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
/** | ||
* Define a string literal. | ||
* @param value Token literal | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
enum MutantStatus { | ||
|
||
/** | ||
* The status of a survived mutant, because it was not covered by any test. | ||
*/ | ||
|
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
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
Oops, something went wrong.