fix(linter): safely check if angular-eslint is the right version (#5511)

This commit is contained in:
Jason Jean 2021-04-30 11:40:56 -04:00 committed by GitHub
parent f7bdd89e3e
commit e2bec26b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,7 @@
"nest": {
"implicitDependencies": ["node", "linter"]
},
"linter": {},
"linter": { "implicitDependencies": ["eslint-plugin-nx"] },
"express": {
"implicitDependencies": ["node"]
},

View File

@ -1,4 +1,9 @@
import angularEslintPlugin from '@angular-eslint/eslint-plugin';
import type AngularEslintPlugin from '@angular-eslint/eslint-plugin';
let angularEslintPlugin: typeof AngularEslintPlugin;
try {
angularEslintPlugin = require('@angular-eslint/eslint-plugin');
} catch {}
/**
* This configuration is intended to be applied to ALL .ts files in Angular