feat(angular): update angular-eslint to v4 (#5499)

* feat(angular): update angular-eslint to v4

* fix(linter): add check to see if right version is used

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
This commit is contained in:
James Henry 2021-04-30 02:19:50 +04:00 committed by GitHub
parent 84e387b238
commit 1cf7a69ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 23 deletions

View File

@ -30,9 +30,9 @@
"@angular-devkit/build-webpack": "~0.1102.0",
"@angular-devkit/core": "~11.2.0",
"@angular-devkit/schematics": "~11.2.0",
"@angular-eslint/eslint-plugin": "~2.0.2",
"@angular-eslint/eslint-plugin-template": "~2.0.2",
"@angular-eslint/template-parser": "~2.0.2",
"@angular-eslint/eslint-plugin": "~4.2.0",
"@angular-eslint/eslint-plugin-template": "~4.2.0",
"@angular-eslint/template-parser": "~4.2.0",
"@angular/cli": "~11.2.0",
"@angular/common": "~11.2.0",
"@angular/compiler": "~11.2.0",

View File

@ -444,6 +444,23 @@
"alwaysAddToPackageJson": false
}
}
},
"12.1.0-beta.3": {
"version": "12.1.0-beta.3",
"packages": {
"@angular-eslint/eslint-plugin": {
"version": "~4.2.0",
"alwaysAddToPackageJson": false
},
"@angular-eslint/eslint-plugin-template": {
"version": "~4.2.0",
"alwaysAddToPackageJson": false
},
"@angular-eslint/template-parser": {
"version": "~4.2.0",
"alwaysAddToPackageJson": false
}
}
}
}
}

View File

@ -4,9 +4,9 @@ exports[`convert-tslint-to-eslint should work for Angular applications 1`] = `
Object {
"dependencies": Object {},
"devDependencies": Object {
"@angular-eslint/eslint-plugin": "~2.0.2",
"@angular-eslint/eslint-plugin-template": "~2.0.2",
"@angular-eslint/template-parser": "~2.0.2",
"@angular-eslint/eslint-plugin": "~4.2.0",
"@angular-eslint/eslint-plugin-template": "~4.2.0",
"@angular-eslint/template-parser": "~4.2.0",
"@nrwl/eslint-plugin-nx": "*",
"@nrwl/linter": "*",
"@typescript-eslint/eslint-plugin": "4.19.0",
@ -356,9 +356,9 @@ exports[`convert-tslint-to-eslint should work for Angular libraries 1`] = `
Object {
"dependencies": Object {},
"devDependencies": Object {
"@angular-eslint/eslint-plugin": "~2.0.2",
"@angular-eslint/eslint-plugin-template": "~2.0.2",
"@angular-eslint/template-parser": "~2.0.2",
"@angular-eslint/eslint-plugin": "~4.2.0",
"@angular-eslint/eslint-plugin-template": "~4.2.0",
"@angular-eslint/template-parser": "~4.2.0",
"@nrwl/eslint-plugin-nx": "*",
"@nrwl/linter": "*",
"@typescript-eslint/eslint-plugin": "4.19.0",

View File

@ -5,4 +5,4 @@ export const angularJsVersion = '1.7.9';
export const ngrxVersion = '^11.1.0';
export const rxjsVersion = '~6.6.3';
export const jestPresetAngularVersion = '8.4.0';
export const angularEslintVersion = '~2.0.2';
export const angularEslintVersion = '~4.2.0';

View File

@ -1,3 +1,5 @@
import angularEslintPlugin from '@angular-eslint/eslint-plugin';
/**
* This configuration is intended to be applied to ALL .ts files in Angular
* projects within an Nx workspace.
@ -16,6 +18,15 @@ export default {
node: true,
},
plugins: ['@angular-eslint'],
extends: ['plugin:@angular-eslint/recommended'],
extends: [
'plugin:@angular-eslint/recommended',
/**
* TODO: Consider dropping this extends and explicitly carrying over rules we care about
* into our typescript preset in v13
*/
...(angularEslintPlugin?.configs?.['recommended--extra']
? ['plugin:@angular-eslint/recommended--extra']
: []),
],
rules: {},
};

View File

@ -20,6 +20,7 @@ const IGNORE_MATCHES = {
cli: ['@nrwl/cli'],
cypress: ['cypress', '@angular-devkit/schematics', '@nrwl/cypress'],
devkit: ['@angular-devkit/architect', 'rxjs'],
'eslint-plugin-nx': ['@angular-eslint/eslint-plugin'],
gatsby: ['@angular-devkit/architect', 'babel-preset-gatsby', 'rxjs'],
jest: [
'jest',

View File

@ -252,26 +252,26 @@
ora "5.3.0"
rxjs "6.6.3"
"@angular-eslint/eslint-plugin-template@~2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-2.0.2.tgz#1d874e08c70f31c77218d8ff92b8ba55ccf0b5b6"
integrity sha512-STk9bTVSJwX8ctHFNx7G+HanbMfpeX5B3hmaUQ7qloM+JPihk+b7BmXT8BjOnXOT+yN8r3NHF9agekyAiYGRkg==
"@angular-eslint/eslint-plugin-template@~4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-4.2.0.tgz#2716583530bf2b20069076994816630e299ab67c"
integrity sha512-LC8qqqqVmA/OJAsUt6fQCXLmWP5BL30XFvVsPtrORdxMFt0HI1gvkuz5EVak7PeAXEmerdVarNZr5zmCXIWf3g==
dependencies:
"@typescript-eslint/experimental-utils" "4.16.1"
aria-query "^4.2.2"
axobject-query "^2.2.0"
"@angular-eslint/eslint-plugin@~2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin/-/eslint-plugin-2.0.2.tgz#58be0c864cb84c7ee024f2be6af04e90ba14c97f"
integrity sha512-/hJNXUjPEXwsmXeWneAW7X3Jg+JwsMavQ8eQ4UevcaKx4Ozthh09n6oyegqc82Y48Adcce7KyalGCKmWY19piA==
"@angular-eslint/eslint-plugin@~4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz#134203c3ac340ae4ae76703434f636dc0a110d7d"
integrity sha512-G8D8Pso6GcHW8vFkUSvgoKPIOtGTqO+eb5aytGtpogMgzxBRyr0juU/9Uz5dAhO6TOERIj1gPpJQ61R/n/Aaew==
dependencies:
"@typescript-eslint/experimental-utils" "4.16.1"
"@angular-eslint/template-parser@~2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@angular-eslint/template-parser/-/template-parser-2.0.2.tgz#ca1abafdbfd7a59679ff2b5e0ca1dc00aa617b81"
integrity sha512-oMXNAokWWnJF/Jp4fJwm5F/tv+9sShc5yio5cELHFCsn8l1wetTmHMe9xqbwS7aFosJ7BnGj6aSq3WpckWzXTg==
"@angular-eslint/template-parser@~4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@angular-eslint/template-parser/-/template-parser-4.2.0.tgz#02f98c72692880b81cd6b4cc137306b346c0b193"
integrity sha512-77lJ9MDNWmW4ik9l3g149iO9SGRx3qLGZvfSTwmbPxpCgNripWerla9Ia1X+gLkitI8CLpcpiZybxH3EWxj/qQ==
dependencies:
eslint-scope "^5.1.0"