-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from TSLint to ESLint (#1250)
TSLint is now deprecated in favour of ESLint. We should keep our dependencies up-to-date. Let's migrate to ESLint to ensure that our linter is up-to-date. --------- Co-authored-by: Misra Aditya <[email protected]> Co-authored-by: Wong Chee Hong <[email protected]>
- Loading branch information
1 parent
c7461b2
commit 5a91541
Showing
26 changed files
with
192 additions
and
253 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,90 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json", "e2e/tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"], | ||
"rules": { | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"prefix": "app", | ||
"style": "kebab-case", | ||
"type": "element" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"style": "camelCase", | ||
"type": "attribute" | ||
} | ||
], | ||
// "arrow-body-style": ["error", "as-needed", { "requireReturnForObjectLiteral": true }], | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/naming-convention": ["error", { "selector": "class", "format": ["PascalCase"] }], | ||
"spaced-comment": ["error", "always", { "exceptions": ["*"] }], | ||
"curly": ["error", "all"], | ||
"eol-last": ["error", "always"], | ||
"guard-for-in": "error", | ||
"no-restricted-imports": ["error", "rxjs/Rx"], | ||
"indent": "off", | ||
"no-labels": ["error", { "allowLoop": true, "allowSwitch": true }], | ||
"max-len": ["error", { "code": 140 }], | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/member-ordering": [ | ||
"error", | ||
{ | ||
"default": ["static-field", "instance-field", "static-method", "instance-method"] | ||
} | ||
], | ||
"no-caller": "error", | ||
"no-bitwise": "error", | ||
"no-console": ["error", { "allow": ["warn", "error", "log"] }], | ||
"no-new-wrappers": "error", | ||
"no-debugger": "error", | ||
"no-empty": "off", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"no-eval": "error", | ||
"@typescript-eslint/no-inferrable-types": ["error", { "ignoreParameters": true }], | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"@typescript-eslint/no-throw-literal": "error", | ||
"no-fallthrough": "error", | ||
"no-trailing-spaces": "error", | ||
"no-undef-init": "error", | ||
"no-var": "error", | ||
"sort-keys": "off", | ||
"brace-style": "error", | ||
"radix": "error", | ||
"semi": "error", | ||
"eqeqeq": ["error", "always", { "null": "ignore" }], | ||
"@angular-eslint/no-empty-lifecycle-method": "off", | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/unified-signatures": "error", | ||
"@angular-eslint/directive-class-suffix": "error", | ||
"@angular-eslint/component-class-suffix": "error", | ||
"@angular-eslint/use-pipe-transform-interface": "error", | ||
"@angular-eslint/no-output-rename": "error", | ||
"@angular-eslint/no-input-rename": "error", | ||
"@angular-eslint/no-host-metadata-property": "error", | ||
"@angular-eslint/no-outputs-metadata-property": "error", | ||
"@angular-eslint/no-inputs-metadata-property": "error", | ||
"@angular-eslint/no-output-on-prefix": "error" | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": { | ||
"@angular-eslint/template/eqeqeq": "off" | ||
} | ||
} | ||
] | ||
} |
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
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.