Skip to content

Commit

Permalink
build: switch from TSLint to ESLint (#369) and fix new findings.
Browse files Browse the repository at this point in the history
  • Loading branch information
makimenko committed May 6, 2021
1 parent ec42997 commit 7b95561
Show file tree
Hide file tree
Showing 44 changed files with 2,122 additions and 238 deletions.
72 changes: 72 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"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",
{
"prefix": "app",
"style": "kebab-case",
"type": "attribute"
}
],
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/unbound-method": 0,
"@angular-eslint/no-output-native": 0,
"@typescript-eslint/no-unused-vars": 2
}
},
{
"files": [
"*.spec.ts"
],
"rules": {
"@typescript-eslint/no-floating-promises": 0
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
}
}
]
}
33 changes: 10 additions & 23 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,12 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"eslintConfig": ".eslintrc.json",
"lintFilePatterns": [
"./src/**/*.ts",
"./src/**/*.html"
]
}
}
Expand All @@ -113,15 +111,6 @@
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "angular-template-for-threejs:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
},
Expand All @@ -147,14 +136,12 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/atft/tsconfig.lib.json",
"projects/atft/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"eslintConfig": "./projects/atft/.eslintrc.json",
"lintFilePatterns": [
"./projects/atft/**/*.ts",
"./projects/atft/**/*.html"
]
}
}
Expand Down
Loading

0 comments on commit 7b95561

Please sign in to comment.