eslint-config-angular-strict 1.1.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -51
- package/index.js +181 -0
- package/package.json +29 -21
- package/template.js +0 -26
- package/typescript.js +0 -106
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<h1 align="center">Angular Strict ESLint</h1>
|
|
4
4
|
|
|
5
|
-
<p align="center">
|
|
5
|
+
<p align="center">Modern ESLint configuration with strict rules for <strong>Angular</strong> development</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/eslint-config-angular-strict"><img src="https://img.shields.io/npm/v/eslint-config-angular-strict/latest.svg" alt="NPM Version" /></a>
|
|
@@ -12,9 +12,29 @@
|
|
|
12
12
|
|
|
13
13
|
<br>
|
|
14
14
|
|
|
15
|
+
## ⚠️ Version 2.0.0 - Complete ESLint Bundle
|
|
16
|
+
|
|
17
|
+
This package includes **ESLint 9** and uses the new **flat configuration format** : [ESLint 9 Migration Guide](https://eslint.org/docs/latest/use/configure/migration-guide).
|
|
18
|
+
|
|
19
|
+
## What's Included
|
|
20
|
+
|
|
21
|
+
#### ✨ **No additional ESLint installation needed!** Everything is bundled.
|
|
22
|
+
|
|
23
|
+
- ✅ **All plugins and parsers** (complete setup)
|
|
24
|
+
- ✅ **Angular ESLint** (Angular 18+ support)
|
|
25
|
+
- ✅ **ESLint 9** (bundled - no separate installation needed)
|
|
26
|
+
- ✅ **Stylistic** (modern formatting rules)
|
|
27
|
+
- ✅ **TypeScript ESLint** (latest rules)
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
- **Angular 18+**
|
|
32
|
+
- **Node.js 18+**
|
|
33
|
+
- **TypeScript 5.0+**
|
|
34
|
+
|
|
15
35
|
## Installation
|
|
16
36
|
|
|
17
|
-
|
|
37
|
+
**One command setup** - ESLint is included!
|
|
18
38
|
|
|
19
39
|
```sh
|
|
20
40
|
npm install eslint-config-angular-strict --save-dev
|
|
@@ -26,72 +46,70 @@ or
|
|
|
26
46
|
yarn add eslint-config-angular-strict --dev
|
|
27
47
|
```
|
|
28
48
|
|
|
49
|
+
**⚠️ Important**: Remove any existing `eslint` dependency from your project - it's included!
|
|
50
|
+
|
|
29
51
|
## Configure ESLint
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
Create an `eslint.config.js` file (ESLint 9 flat config format):
|
|
32
54
|
|
|
33
55
|
```javascript
|
|
34
|
-
|
|
35
|
-
"root": true,
|
|
36
|
-
"overrides": [
|
|
37
|
-
{
|
|
38
|
-
"extends": ["angular-strict/typescript"],
|
|
39
|
-
"files": ["*.ts"],
|
|
40
|
-
"parserOptions": {
|
|
41
|
-
"project": ["./tsconfig.json"] // Specify your tsconfig relative path
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"extends": ["angular-strict/template"],
|
|
46
|
-
"files": ["*.html"]
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Configuring Eslint for Typescript only projects
|
|
53
|
-
|
|
54
|
-
Within your **ESLint** config file:
|
|
56
|
+
import angularStrict from 'eslint-config-angular-strict';
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
"extends": ["angular-strict/typescript"],
|
|
62
|
-
"files": ["*.ts"],
|
|
63
|
-
"parserOptions": {
|
|
64
|
-
"project": ["./tsconfig.json"] // Specify your tsconfig relative path
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
58
|
+
export default [
|
|
59
|
+
...angularStrict,
|
|
60
|
+
// Your custom overrides here
|
|
61
|
+
];
|
|
69
62
|
```
|
|
70
63
|
|
|
71
|
-
|
|
64
|
+
### TypeScript Configuration
|
|
72
65
|
|
|
73
|
-
|
|
66
|
+
Make sure your `tsconfig.json` is properly configured:
|
|
74
67
|
|
|
75
68
|
```javascript
|
|
76
69
|
{
|
|
77
70
|
"compilerOptions": {
|
|
78
71
|
(...),
|
|
79
|
-
"forceConsistentCasingInFileNames": true,
|
|
80
|
-
"noImplicitAny": true,
|
|
81
|
-
"noImplicitOverride": true,
|
|
82
|
-
"
|
|
72
|
+
"forceConsistentCasingInFileNames": true,
|
|
73
|
+
"noImplicitAny": true,
|
|
74
|
+
"noImplicitOverride": true,
|
|
75
|
+
"noUnusedLocals": true,
|
|
76
|
+
"strict": true,
|
|
83
77
|
},
|
|
84
78
|
"angularCompilerOptions": {
|
|
85
|
-
"strictInjectionParameters": true,
|
|
86
|
-
"
|
|
87
|
-
"strictTemplates": true
|
|
79
|
+
"strictInjectionParameters": true,
|
|
80
|
+
"strictStandalone": true,
|
|
81
|
+
"strictTemplates": true
|
|
88
82
|
}
|
|
89
83
|
}
|
|
90
84
|
```
|
|
91
85
|
|
|
92
|
-
##
|
|
86
|
+
## Features
|
|
87
|
+
|
|
88
|
+
### Angular Rules
|
|
89
|
+
|
|
90
|
+
- ✅ Accessibility enforcement
|
|
91
|
+
- ✅ Angular 18+ standalone components support
|
|
92
|
+
- ✅ Component/Directive naming conventions
|
|
93
|
+
- ✅ Lifecycle method validation
|
|
94
|
+
- ✅ Template best practices
|
|
95
|
+
|
|
96
|
+
### TypeScript Rules
|
|
97
|
+
|
|
98
|
+
- ✅ Code style consistency
|
|
99
|
+
- ✅ Import/export management
|
|
100
|
+
- ✅ Modern ES2020+ features
|
|
101
|
+
- ✅ Strict type checking
|
|
102
|
+
|
|
103
|
+
### Performance
|
|
104
|
+
|
|
105
|
+
- ✅ Better caching and incremental linting
|
|
106
|
+
- ✅ Fast linting with ESLint 9 improvements
|
|
107
|
+
- ✅ Optimized for large Angular projects
|
|
108
|
+
|
|
109
|
+
## Contributing
|
|
110
|
+
|
|
111
|
+
Contributions are welcome! Please open an issue or submit a PR.
|
|
112
|
+
|
|
113
|
+
## License
|
|
93
114
|
|
|
94
|
-
|
|
95
|
-
- [@typescript-eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
96
|
-
- [airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript)
|
|
97
|
-
- [airbnb](https://github.com/airbnb/javascript)
|
|
115
|
+
MIT © [Jean-benoit Gautier](https://github.com/Jbz797)
|
package/index.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// ESLint 9 flat configuration export
|
|
2
|
+
import angular from '@angular-eslint/eslint-plugin';
|
|
3
|
+
import angularTemplate from '@angular-eslint/eslint-plugin-template';
|
|
4
|
+
import angularTemplateParser from '@angular-eslint/template-parser';
|
|
5
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
6
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
7
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
8
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
9
|
+
|
|
10
|
+
export default [
|
|
11
|
+
// TypeScript files configuration
|
|
12
|
+
{
|
|
13
|
+
files: ['**/*.ts'],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parser: typescriptParser,
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaVersion: 2022,
|
|
18
|
+
project: './tsconfig.json',
|
|
19
|
+
sourceType: 'module',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
plugins: {
|
|
23
|
+
'@angular-eslint': angular,
|
|
24
|
+
'@stylistic': stylistic,
|
|
25
|
+
'@typescript-eslint': typescriptEslint,
|
|
26
|
+
import: importPlugin,
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
// Angular ESLint rules
|
|
30
|
+
'@angular-eslint/component-class-suffix': ['error', { suffixes: ['Component', 'Modal', 'Page'] }],
|
|
31
|
+
'@angular-eslint/component-max-inline-declarations': 'error',
|
|
32
|
+
'@angular-eslint/component-selector': ['error', { type: 'element', style: 'kebab-case' }],
|
|
33
|
+
'@angular-eslint/consistent-component-styles': 'error',
|
|
34
|
+
'@angular-eslint/contextual-decorator': 'error',
|
|
35
|
+
'@angular-eslint/contextual-lifecycle': 'error',
|
|
36
|
+
'@angular-eslint/directive-class-suffix': 'error',
|
|
37
|
+
'@angular-eslint/directive-selector': ['error', { type: 'attribute', style: 'camelCase' }],
|
|
38
|
+
'@angular-eslint/no-async-lifecycle-method': 'error',
|
|
39
|
+
'@angular-eslint/no-attribute-decorator': 'error',
|
|
40
|
+
'@angular-eslint/no-conflicting-lifecycle': 'error',
|
|
41
|
+
'@angular-eslint/no-empty-lifecycle-method': 'error',
|
|
42
|
+
'@angular-eslint/no-forward-ref': 'error',
|
|
43
|
+
'@angular-eslint/no-input-prefix': ['error', { prefixes: ['on'] }],
|
|
44
|
+
'@angular-eslint/no-input-rename': 'error',
|
|
45
|
+
'@angular-eslint/no-inputs-metadata-property': 'error',
|
|
46
|
+
'@angular-eslint/no-lifecycle-call': 'error',
|
|
47
|
+
'@angular-eslint/no-output-native': 'error',
|
|
48
|
+
'@angular-eslint/no-output-on-prefix': 'error',
|
|
49
|
+
'@angular-eslint/no-output-rename': 'error',
|
|
50
|
+
'@angular-eslint/no-outputs-metadata-property': 'error',
|
|
51
|
+
'@angular-eslint/no-pipe-impure': 'error',
|
|
52
|
+
'@angular-eslint/no-queries-metadata-property': 'error',
|
|
53
|
+
'@angular-eslint/prefer-output-readonly': 'error',
|
|
54
|
+
'@angular-eslint/prefer-standalone': 'error',
|
|
55
|
+
'@angular-eslint/relative-url-prefix': 'error',
|
|
56
|
+
'@angular-eslint/sort-lifecycle-methods': 'error',
|
|
57
|
+
'@angular-eslint/use-component-view-encapsulation': 'error',
|
|
58
|
+
'@angular-eslint/use-injectable-provided-in': 'error',
|
|
59
|
+
'@angular-eslint/use-lifecycle-interface': 'error',
|
|
60
|
+
'@angular-eslint/use-pipe-transform-interface': 'error',
|
|
61
|
+
|
|
62
|
+
// TypeScript ESLint rules
|
|
63
|
+
'@typescript-eslint/member-ordering': 'error',
|
|
64
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
65
|
+
'@typescript-eslint/no-extraneous-class': ['error', { allowEmpty: true, allowStaticOnly: true }],
|
|
66
|
+
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
|
|
67
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
68
|
+
'@typescript-eslint/only-throw-error': 'error',
|
|
69
|
+
'@typescript-eslint/prefer-destructuring': 'error',
|
|
70
|
+
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
71
|
+
'@typescript-eslint/return-await': 'error',
|
|
72
|
+
'@typescript-eslint/sort-type-constituents': 'error',
|
|
73
|
+
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
|
|
74
|
+
|
|
75
|
+
// Style rules handled by @stylistic/eslint-plugin
|
|
76
|
+
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
|
77
|
+
'@stylistic/comma-dangle': ['error', 'always-multiline'],
|
|
78
|
+
'@stylistic/comma-spacing': ['error', { before: false, after: true }],
|
|
79
|
+
'@stylistic/function-call-spacing': ['error', 'never'],
|
|
80
|
+
'@stylistic/indent': ['error', 2],
|
|
81
|
+
'@stylistic/keyword-spacing': ['error', { before: true, after: true }],
|
|
82
|
+
'@stylistic/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
83
|
+
'@stylistic/no-extra-semi': 'error',
|
|
84
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
85
|
+
'@stylistic/quotes': ['error', 'single'],
|
|
86
|
+
'@stylistic/semi': ['error', 'always'],
|
|
87
|
+
'@stylistic/space-before-blocks': 'error',
|
|
88
|
+
'@stylistic/space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
|
|
89
|
+
'@stylistic/space-infix-ops': 'error',
|
|
90
|
+
|
|
91
|
+
// Import rules
|
|
92
|
+
'import/extensions': ['error', 'ignorePackages', { ts: 'never' }],
|
|
93
|
+
'import/no-anonymous-default-export': 'error',
|
|
94
|
+
'import/no-commonjs': 'error',
|
|
95
|
+
'import/no-cycle': ['error', { maxDepth: 2 }],
|
|
96
|
+
'import/no-deprecated': 'error',
|
|
97
|
+
'import/no-empty-named-blocks': 'error',
|
|
98
|
+
'import/no-import-module-exports': 'off',
|
|
99
|
+
'import/no-named-as-default-member': 'error',
|
|
100
|
+
'import/order': [
|
|
101
|
+
'error',
|
|
102
|
+
{
|
|
103
|
+
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
104
|
+
named: true,
|
|
105
|
+
'newlines-between': 'always',
|
|
106
|
+
pathGroups: [
|
|
107
|
+
{ pattern: '@angular/**', group: 'external', position: 'before' },
|
|
108
|
+
{ pattern: '@nestjs/**', group: 'external', position: 'before' },
|
|
109
|
+
{ pattern: 'firebase*/**', group: 'external', position: 'before', patternOptions: { partial: true } },
|
|
110
|
+
{ pattern: 'ng-zorro-antd/**', group: 'external', position: 'before' },
|
|
111
|
+
],
|
|
112
|
+
pathGroupsExcludedImportTypes: [],
|
|
113
|
+
warnOnUnassignedImports: true,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
'import/prefer-default-export': 'off',
|
|
117
|
+
|
|
118
|
+
// General rules
|
|
119
|
+
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
120
|
+
'class-methods-use-this': ['error', { exceptMethods: ['beforeUnloadHander', 'trackBy', 'transform', 'windowRef'] }],
|
|
121
|
+
'max-len': ['error', 180],
|
|
122
|
+
'max-lines': ['error', 500],
|
|
123
|
+
'no-param-reassign': ['error', { props: false }],
|
|
124
|
+
'no-plusplus': 'off',
|
|
125
|
+
'no-restricted-globals': 'off',
|
|
126
|
+
'no-return-assign': 'off',
|
|
127
|
+
'no-underscore-dangle': 'off',
|
|
128
|
+
'object-curly-newline': [
|
|
129
|
+
'error',
|
|
130
|
+
{
|
|
131
|
+
ExportDeclaration: { multiline: true },
|
|
132
|
+
ImportDeclaration: { multiline: true },
|
|
133
|
+
ObjectExpression: { minProperties: 4, multiline: true },
|
|
134
|
+
ObjectPattern: { minProperties: 4, multiline: true },
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
'padded-blocks': 'off',
|
|
138
|
+
'prefer-destructuring': 'off',
|
|
139
|
+
'sort-keys': ['error'],
|
|
140
|
+
radix: ['error', 'as-needed'],
|
|
141
|
+
|
|
142
|
+
// Disable base ESLint rule that conflicts with @typescript-eslint/only-throw-error
|
|
143
|
+
'@typescript-eslint/no-throw-literal': 'off',
|
|
144
|
+
'no-throw-literal': 'off',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
// HTML Template files configuration
|
|
149
|
+
{
|
|
150
|
+
files: ['**/*.html'],
|
|
151
|
+
languageOptions: {
|
|
152
|
+
parser: angularTemplateParser,
|
|
153
|
+
},
|
|
154
|
+
plugins: {
|
|
155
|
+
'@angular-eslint/template': angularTemplate,
|
|
156
|
+
},
|
|
157
|
+
rules: {
|
|
158
|
+
'@angular-eslint/template/attributes-order': ['error', { alphabetical: true }],
|
|
159
|
+
'@angular-eslint/template/banana-in-box': 'error',
|
|
160
|
+
'@angular-eslint/template/conditional-complexity': 'error',
|
|
161
|
+
'@angular-eslint/template/cyclomatic-complexity': ['error', { maxComplexity: 10 }],
|
|
162
|
+
'@angular-eslint/template/elements-content': 'error',
|
|
163
|
+
'@angular-eslint/template/eqeqeq': 'error',
|
|
164
|
+
'@angular-eslint/template/label-has-associated-control': 'error',
|
|
165
|
+
'@angular-eslint/template/mouse-events-have-key-events': 'error',
|
|
166
|
+
'@angular-eslint/template/no-any': 'error',
|
|
167
|
+
'@angular-eslint/template/no-autofocus': 'error',
|
|
168
|
+
'@angular-eslint/template/no-call-expression': 'error',
|
|
169
|
+
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
170
|
+
'@angular-eslint/template/no-duplicate-attributes': 'error',
|
|
171
|
+
'@angular-eslint/template/no-interpolation-in-attributes': 'error',
|
|
172
|
+
'@angular-eslint/template/no-negated-async': 'error',
|
|
173
|
+
'@angular-eslint/template/no-positive-tabindex': 'error',
|
|
174
|
+
'@angular-eslint/template/prefer-self-closing-tags': 'error',
|
|
175
|
+
'@angular-eslint/template/role-has-required-aria': 'error',
|
|
176
|
+
'@angular-eslint/template/table-scope': 'error',
|
|
177
|
+
'@angular-eslint/template/use-track-by-function': ['error', { alias: ['ngForTrackByIndex', 'ngForTrackByProperty'] }],
|
|
178
|
+
'@angular-eslint/template/valid-aria': 'error',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
];
|
package/package.json
CHANGED
|
@@ -1,43 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-angular-strict",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/Jbz797/eslint-config-angular-strict"
|
|
8
|
-
},
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Modern ESLint configuration with strict rules for Angular development.",
|
|
9
5
|
"keywords": [
|
|
10
6
|
"angular",
|
|
11
7
|
"eslint",
|
|
8
|
+
"eslint-config",
|
|
12
9
|
"eslint-plugin",
|
|
10
|
+
"eslint9",
|
|
11
|
+
"flat-config",
|
|
13
12
|
"linting-rules",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"strict-rules",
|
|
14
|
+
"stylistic",
|
|
15
|
+
"typescript",
|
|
16
|
+
"typescript5"
|
|
16
17
|
],
|
|
17
18
|
"author": {
|
|
18
19
|
"name": "Jean-benoit Gautier"
|
|
19
20
|
},
|
|
20
21
|
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/Jbz797/eslint-config-angular-strict"
|
|
25
|
+
},
|
|
21
26
|
"bugs": {
|
|
22
27
|
"url": "https://github.com/Jbz797/eslint-config-angular-strict/issues"
|
|
23
28
|
},
|
|
24
|
-
"
|
|
29
|
+
"type": "module",
|
|
25
30
|
"main": "./index.js",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": "./index.js"
|
|
33
|
+
},
|
|
26
34
|
"dependencies": {
|
|
27
|
-
"@angular-eslint/
|
|
28
|
-
"@angular-eslint/eslint-plugin": "
|
|
29
|
-
"@angular-eslint/
|
|
30
|
-
"@
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "
|
|
32
|
-
"@typescript-eslint/parser": "
|
|
33
|
-
"eslint": "
|
|
34
|
-
"eslint-config-airbnb-base": "15.0.0",
|
|
35
|
-
"eslint-config-airbnb-typescript": "18.0.0",
|
|
36
|
-
"eslint-import-resolver-typescript": "3.6.3",
|
|
37
|
-
"eslint-plugin-import": "2.31.0"
|
|
35
|
+
"@angular-eslint/eslint-plugin": "20.3.0",
|
|
36
|
+
"@angular-eslint/eslint-plugin-template": "20.3.0",
|
|
37
|
+
"@angular-eslint/template-parser": "20.3.0",
|
|
38
|
+
"@stylistic/eslint-plugin": "5.4.0",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "8.45.0",
|
|
40
|
+
"@typescript-eslint/parser": "8.45.0",
|
|
41
|
+
"eslint-plugin-import-x": "4.16.1"
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
|
-
"
|
|
44
|
+
"@angular-eslint/builder": "20.3.0",
|
|
45
|
+
"@typescript-eslint/types": "8.45.0",
|
|
46
|
+
"@typescript-eslint/utils": "8.45.0",
|
|
47
|
+
"eslint": "9.36.0",
|
|
48
|
+
"typescript": "5.9.2"
|
|
41
49
|
},
|
|
42
50
|
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
|
43
51
|
}
|
package/template.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: ['plugin:@angular-eslint/template/recommended'],
|
|
3
|
-
rules: {
|
|
4
|
-
'@angular-eslint/template/attributes-order': ['error', { alphabetical: true }],
|
|
5
|
-
'@angular-eslint/template/banana-in-box': 'error',
|
|
6
|
-
'@angular-eslint/template/conditional-complexity': 'error',
|
|
7
|
-
'@angular-eslint/template/cyclomatic-complexity': ['error', { maxComplexity: 10 }],
|
|
8
|
-
'@angular-eslint/template/elements-content': 'error',
|
|
9
|
-
'@angular-eslint/template/eqeqeq': 'error',
|
|
10
|
-
'@angular-eslint/template/label-has-associated-control': 'error',
|
|
11
|
-
'@angular-eslint/template/mouse-events-have-key-events': 'error',
|
|
12
|
-
'@angular-eslint/template/no-any': 'error',
|
|
13
|
-
'@angular-eslint/template/no-autofocus': 'error',
|
|
14
|
-
'@angular-eslint/template/no-call-expression': 'error',
|
|
15
|
-
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
16
|
-
'@angular-eslint/template/no-duplicate-attributes': 'error',
|
|
17
|
-
'@angular-eslint/template/no-interpolation-in-attributes': 'error',
|
|
18
|
-
'@angular-eslint/template/no-negated-async': 'error',
|
|
19
|
-
'@angular-eslint/template/no-positive-tabindex': 'error',
|
|
20
|
-
'@angular-eslint/template/prefer-self-closing-tags': 'error',
|
|
21
|
-
'@angular-eslint/template/role-has-required-aria': 'error',
|
|
22
|
-
'@angular-eslint/template/table-scope': 'error',
|
|
23
|
-
'@angular-eslint/template/use-track-by-function': ['error', { alias: ['ngForTrackByIndex', 'ngForTrackByProperty'] }],
|
|
24
|
-
'@angular-eslint/template/valid-aria': 'error',
|
|
25
|
-
},
|
|
26
|
-
};
|
package/typescript.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
'airbnb-base',
|
|
4
|
-
'airbnb-typescript/base',
|
|
5
|
-
'plugin:@typescript-eslint/recommended',
|
|
6
|
-
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
7
|
-
'plugin:@typescript-eslint/strict',
|
|
8
|
-
'plugin:@angular-eslint/recommended',
|
|
9
|
-
'plugin:@angular-eslint/template/process-inline-templates',
|
|
10
|
-
],
|
|
11
|
-
rules: {
|
|
12
|
-
'@angular-eslint/component-class-suffix': ['error', { suffixes: ['Component', 'Modal', 'Page'] }],
|
|
13
|
-
'@angular-eslint/component-max-inline-declarations': 'error',
|
|
14
|
-
'@angular-eslint/component-selector': ['error', { type: 'element', style: 'kebab-case' }],
|
|
15
|
-
'@angular-eslint/consistent-component-styles': 'error',
|
|
16
|
-
'@angular-eslint/contextual-decorator': 'error',
|
|
17
|
-
'@angular-eslint/contextual-lifecycle': 'error',
|
|
18
|
-
'@angular-eslint/directive-class-suffix': 'error',
|
|
19
|
-
'@angular-eslint/directive-selector': ['error', { type: 'attribute', style: 'camelCase' }],
|
|
20
|
-
'@angular-eslint/no-async-lifecycle-method': 'error',
|
|
21
|
-
'@angular-eslint/no-attribute-decorator': 'error',
|
|
22
|
-
'@angular-eslint/no-conflicting-lifecycle': 'error',
|
|
23
|
-
'@angular-eslint/no-empty-lifecycle-method': 'error',
|
|
24
|
-
'@angular-eslint/no-forward-ref': 'error',
|
|
25
|
-
'@angular-eslint/no-input-prefix': ['error', { prefixes: ['on'] }],
|
|
26
|
-
'@angular-eslint/no-input-rename': 'error',
|
|
27
|
-
'@angular-eslint/no-inputs-metadata-property': 'error',
|
|
28
|
-
'@angular-eslint/no-lifecycle-call': 'error',
|
|
29
|
-
'@angular-eslint/no-output-native': 'error',
|
|
30
|
-
'@angular-eslint/no-output-on-prefix': 'error',
|
|
31
|
-
'@angular-eslint/no-output-rename': 'error',
|
|
32
|
-
'@angular-eslint/no-outputs-metadata-property': 'error',
|
|
33
|
-
'@angular-eslint/no-pipe-impure': 'error',
|
|
34
|
-
'@angular-eslint/no-queries-metadata-property': 'error',
|
|
35
|
-
'@angular-eslint/prefer-output-readonly': 'error',
|
|
36
|
-
'@angular-eslint/prefer-standalone': 'error',
|
|
37
|
-
'@angular-eslint/relative-url-prefix': 'error',
|
|
38
|
-
'@angular-eslint/sort-lifecycle-methods': 'error',
|
|
39
|
-
'@angular-eslint/sort-ngmodule-metadata-arrays': 'error',
|
|
40
|
-
'@angular-eslint/use-component-view-encapsulation': 'error',
|
|
41
|
-
'@angular-eslint/use-injectable-provided-in': 'error',
|
|
42
|
-
'@angular-eslint/use-lifecycle-interface': 'error',
|
|
43
|
-
'@angular-eslint/use-pipe-transform-interface': 'error',
|
|
44
|
-
|
|
45
|
-
'@typescript-eslint/return-await': 'error',
|
|
46
|
-
'@typescript-eslint/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
47
|
-
'@typescript-eslint/member-ordering': 'error',
|
|
48
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
49
|
-
'@typescript-eslint/no-extraneous-class': ['error', { allowEmpty: true, allowStaticOnly: true }],
|
|
50
|
-
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
|
|
51
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
52
|
-
'@typescript-eslint/prefer-destructuring': 'error',
|
|
53
|
-
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
54
|
-
'@typescript-eslint/sort-type-constituents': 'error',
|
|
55
|
-
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
|
|
56
|
-
|
|
57
|
-
'import/extensions': ['error', 'ignorePackages', { ts: 'never' }],
|
|
58
|
-
'import/no-anonymous-default-export': 'error',
|
|
59
|
-
'import/no-commonjs': 'error',
|
|
60
|
-
'import/no-cycle': ['error', { maxDepth: 2 }],
|
|
61
|
-
'import/no-deprecated': 'error',
|
|
62
|
-
'import/no-empty-named-blocks': 'error',
|
|
63
|
-
'import/no-import-module-exports': 'off',
|
|
64
|
-
'import/no-named-as-default-member': 'error',
|
|
65
|
-
'import/order': [
|
|
66
|
-
'error',
|
|
67
|
-
{
|
|
68
|
-
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
69
|
-
named: true,
|
|
70
|
-
'newlines-between': 'always',
|
|
71
|
-
pathGroups: [
|
|
72
|
-
{ pattern: '@angular/**', group: 'external', position: 'before' },
|
|
73
|
-
{ pattern: '@nestjs/**', group: 'external', position: 'before' },
|
|
74
|
-
{ pattern: 'firebase*/**', group: 'external', position: 'before', patternOptions: { partial: true } },
|
|
75
|
-
{ pattern: 'ng-zorro-antd/**', group: 'external', position: 'before' },
|
|
76
|
-
],
|
|
77
|
-
pathGroupsExcludedImportTypes: [],
|
|
78
|
-
warnOnUnassignedImports: true,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
'import/prefer-default-export': 'off',
|
|
82
|
-
|
|
83
|
-
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
84
|
-
'class-methods-use-this': ['error', { exceptMethods: ['beforeUnloadHander', 'trackBy', 'transform', 'windowRef'] }],
|
|
85
|
-
'max-len': ['error', 180],
|
|
86
|
-
'max-lines': ['error', 500],
|
|
87
|
-
'no-param-reassign': ['error', { props: false }],
|
|
88
|
-
'no-plusplus': 'off',
|
|
89
|
-
'no-restricted-globals': 'off',
|
|
90
|
-
'no-return-assign': 'off',
|
|
91
|
-
'no-underscore-dangle': 'off',
|
|
92
|
-
'object-curly-newline': [
|
|
93
|
-
'error',
|
|
94
|
-
{
|
|
95
|
-
ExportDeclaration: { multiline: true },
|
|
96
|
-
ImportDeclaration: { multiline: true },
|
|
97
|
-
ObjectExpression: { minProperties: 4, multiline: true },
|
|
98
|
-
ObjectPattern: { minProperties: 4, multiline: true },
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
'padded-blocks': 'off',
|
|
102
|
-
'prefer-destructuring': 'off',
|
|
103
|
-
'sort-keys': ['error'],
|
|
104
|
-
radix: ['error', 'as-needed'],
|
|
105
|
-
},
|
|
106
|
-
};
|