-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathangular-eslint-template.ts
28 lines (26 loc) · 1.25 KB
/
angular-eslint-template.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import {TSESLint} from '@typescript-eslint/utils';
const pluginPrefix = '@angular-eslint/template';
export const angularTemplateEslintRules: TSESLint.Linter.RulesRecord = {
[`${pluginPrefix}/button-has-type`]: ['error'],
[`${pluginPrefix}/eqeqeq`]: [
'off', // disable it for now since it does not work correctly
{
allowNullOrUndefined: true,
},
],
// does not work with custom input components
[`${pluginPrefix}/label-has-associated-control`]: 'off',
[`${pluginPrefix}/no-any`]: ['error'],
// disabled as there is no way to allow signals only and is unlikely to ever be supported
// see: https://github.com/angular-eslint/angular-eslint/issues/1380
[`${pluginPrefix}/no-call-expression`]: 'off',
[`${pluginPrefix}/no-duplicate-attributes`]: ['error'],
[`${pluginPrefix}/no-inline-styles`]: ['error'],
[`${pluginPrefix}/no-interpolation-in-attributes`]: ['error'],
[`${pluginPrefix}/no-positive-tabindex`]: ['error'],
[`${pluginPrefix}/prefer-ngsrc`]: 'error',
// does not provide any value for primitive types
// it is fine to not have this automated for now
// since it is a performance improvement and not a bug
[`${pluginPrefix}/use-track-by-function`]: 'off',
};