Skip to content

Commit

Permalink
build: migrate to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlewis92 committed Sep 1, 2021
1 parent bcd7147 commit 0d7b589
Show file tree
Hide file tree
Showing 23 changed files with 1,535 additions and 426 deletions.
40 changes: 40 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "mwl",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "mwl",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
33 changes: 14 additions & 19 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:module": {
},
"@schematics/angular:module": {},
"@schematics/angular:pipe": {
"skipTests": true
},
Expand All @@ -45,9 +44,7 @@
"projects/demos/sw.js",
"projects/demos/assets"
],
"styles": [
"projects/demos/styles.scss"
],
"styles": ["projects/demos/styles.scss"],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
Expand Down Expand Up @@ -92,13 +89,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/demos/tsconfig.app.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/demos/**/*.ts",
"projects/demos/**/*.html"
]
}
},
Expand Down Expand Up @@ -141,19 +136,19 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/angular-calendar/tsconfig.lib.json",
"projects/angular-calendar/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/angular-calendar/**/*.ts",
"projects/angular-calendar/**/*.html"
]
}
}
}
}
},
"defaultProject": "demos"
"defaultProject": "demos",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
Loading

0 comments on commit 0d7b589

Please sign in to comment.