Skip to content

Commit

Permalink
tslint to eslint migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jornetsimon committed Jun 13, 2021
1 parent 23cdbec commit 0c44ba8
Show file tree
Hide file tree
Showing 9 changed files with 1,761 additions and 1,420 deletions.
52 changes: 52 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"extends": ["prettier"],
"overrides": [
{
"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",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
31 changes: 13 additions & 18 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/ng-rough-notation/tsconfig.lib.json",
"projects/ng-rough-notation/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/ng-rough-notation/**/*.ts",
"projects/ng-rough-notation/**/*.html"
]
}
}
Expand Down Expand Up @@ -139,15 +136,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/demo/tsconfig.app.json",
"projects/demo/tsconfig.spec.json",
"projects/demo/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/demo/**/*.ts",
"projects/demo/**/*.html"
]
}
},
Expand All @@ -164,9 +157,11 @@
}
}
}
}},
}
},
"cli": {
"analytics": false
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
},
"defaultProject": "ng-rough-notation"
}
}
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.4",
"@angular-eslint/builder": "12.1.0",
"@angular-eslint/eslint-plugin": "12.1.0",
"@angular-eslint/eslint-plugin-template": "12.1.0",
"@angular-eslint/schematics": "12.1.0",
"@angular-eslint/template-parser": "12.1.0",
"@angular/cli": "^12.0.4",
"@angular/compiler-cli": "^12.0.4",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.12.62",
"codelyzer": "^6.0.0",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.3",
Expand All @@ -45,8 +53,7 @@
"ng-packagr": "^12.0.5",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "~4.2.4"
}
}
}
45 changes: 45 additions & 0 deletions projects/demo/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"extends": "../../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"projects/demo/tsconfig.app.json",
"projects/demo/tsconfig.spec.json",
"projects/demo/e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"rules": {}
}
]
}
17 changes: 0 additions & 17 deletions projects/demo/tslint.json

This file was deleted.

30 changes: 30 additions & 0 deletions projects/ng-rough-notation/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": "../../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"projects/ng-rough-notation/tsconfig.lib.json",
"projects/ng-rough-notation/tsconfig.spec.json"
],
"createDefaultProgram": true
},
"rules": {
"@angular-eslint/directive-selector": "off",
"@angular-eslint/component-selector": "off"
}
},
{
"files": [
"*.html"
],
"rules": {}
}
]
}
7 changes: 0 additions & 7 deletions projects/ng-rough-notation/tslint.json

This file was deleted.

98 changes: 0 additions & 98 deletions tslint.json

This file was deleted.

Loading

0 comments on commit 0c44ba8

Please sign in to comment.