Skip to content

Commit

Permalink
feat: switch linting to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaliske committed Jun 15, 2021
1 parent d392afb commit e214574
Show file tree
Hide file tree
Showing 5 changed files with 385 additions and 28 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
extends: '@pascaliske/eslint-config/angular',
plugins: ['cypress'],
parserOptions: {
project: `${__dirname}/tsconfig.lint.json`,
createDefaultProgram: true,
},
env: {
browser: true,
node: true,
'cypress/globals': true,
},
globals: {
APP_ID: 'readonly',
APP_VERSION: 'readonly',
gtag: 'readonly',
gtagInit: 'readonly',
gtagOut: 'readonly',
},
}
5 changes: 2 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": ["tsconfig.app.json", "cypress/tsconfig.json"],
"exclude": ["**/node_modules/**", "**/*.json"]
"lintFilePatterns": ["src/**/*.ts"]
}
},
"server": {
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"devDependencies": {
"@angular-builders/custom-webpack": "^12.1.0",
"@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",
"@angular/language-service": "^12.0.4",
Expand All @@ -78,6 +83,7 @@
"@commitlint/config-conventional": "^12.1.4",
"@cypress/webpack-preprocessor": "^5.9.0",
"@packtracker/webpack-plugin": "^2.3.0",
"@pascaliske/eslint-config": "^2.0.3",
"@pascaliske/ngx-prerenderer": "^2.0.6",
"@pascaliske/prettier-config": "^1.1.2",
"@rstacruz/bump-cli": "^2.0.0",
Expand All @@ -89,11 +95,15 @@
"@types/node": "^15.12.2",
"@types/nodemailer": "^6.4.2",
"@types/webpack": "^5.28.0",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"bundlewatch": "^0.3.2",
"chalk": "^4.1.1",
"codelyzer": "^6.0.0",
"cors": "^2.8.5",
"cypress": "^7.5.0",
"eslint": "^7.26.0",
"eslint-plugin-cypress": "^2.11.3",
"esm": "^3.2.25",
"firebase-admin": "^9.9.0",
"firebase-functions": "^3.14.1",
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"include": ["**/*.ts"]
}
Loading

0 comments on commit e214574

Please sign in to comment.