fix(linter): safely check if angular-eslint is the right version (#5511)
This commit is contained in:
parent
f7bdd89e3e
commit
e2bec26b18
2
nx.json
2
nx.json
@ -53,7 +53,7 @@
|
|||||||
"nest": {
|
"nest": {
|
||||||
"implicitDependencies": ["node", "linter"]
|
"implicitDependencies": ["node", "linter"]
|
||||||
},
|
},
|
||||||
"linter": {},
|
"linter": { "implicitDependencies": ["eslint-plugin-nx"] },
|
||||||
"express": {
|
"express": {
|
||||||
"implicitDependencies": ["node"]
|
"implicitDependencies": ["node"]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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
|
* This configuration is intended to be applied to ALL .ts files in Angular
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user