eslint-config-angular-strict 2.2.70 → 2.2.71
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 +22 -14
- package/index.js +0 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -18,27 +18,33 @@
|
|
|
18
18
|
|
|
19
19
|
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)). Requires **Angular 18+** and **Node.js 18+**.
|
|
20
20
|
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
A production-ready, opinionated ESLint configuration that enforces best practices for Angular applications. Combines rules from industry-leading plugins into a single package with zero additional configuration required.
|
|
24
|
+
|
|
21
25
|
## Features
|
|
22
26
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
+
- **🅰️ Angular**: 35+ rules for standalone components, lifecycle methods, component standards, and modern control flow syntax, and more...
|
|
28
|
+
- **📘 TypeScript**: Strict typing, member ordering, promise handling, type safety enforcement, and more...
|
|
29
|
+
- **✨ Code Quality**: Complexity limits, file length control, import cycle detection, anti-patterns prevention, and more...
|
|
30
|
+
- **🎨 Style**: Airbnb extended compliance, consistent formatting, organized imports, and more...
|
|
31
|
+
- **🔍 Templates**: 25+ HTML template rules including alphabetical attributes, complexity limits checks, trackBy enforcement, and more...
|
|
27
32
|
|
|
28
33
|
## What's Included
|
|
29
34
|
|
|
30
35
|
#### ✨ **No additional ESLint installation needed!** Everything is bundled.
|
|
31
36
|
|
|
32
|
-
- <img src="https://eslint-airbnb-extended.nishargshah.dev/logo.png" width="16" height="16"> [**Airbnb Extended**](https://github.com/nishargshah/eslint-config-airbnb-extended)
|
|
33
|
-
- <img src="https://avatars.githubusercontent.com/u/53234240?s=48&" width="16" height="16"> [**Angular ESLint**](https://github.com/angular-eslint/angular-eslint)
|
|
34
|
-
- <img src="https://eslint.org/icon-512.png" width="16" height="16"> [**ESLint
|
|
35
|
-
-
|
|
36
|
-
- <img src="https://avatars.githubusercontent.com/u/
|
|
37
|
-
-
|
|
37
|
+
- <img src="https://eslint-airbnb-extended.nishargshah.dev/logo.png" width="16" height="16"> [**Airbnb Extended**](https://github.com/nishargshah/eslint-config-airbnb-extended) - Airbnb style guide
|
|
38
|
+
- <img src="https://avatars.githubusercontent.com/u/53234240?s=48&" width="16" height="16"> [**Angular ESLint**](https://github.com/angular-eslint/angular-eslint) - Angular-specific rules
|
|
39
|
+
- <img src="https://eslint.org/icon-512.png" width="16" height="16"> [**ESLint**](https://github.com/eslint/eslint) - Core linting engine
|
|
40
|
+
- 📦 [**Import-X**](https://github.com/un-ts/eslint-plugin-import-x) - Import/export validation
|
|
41
|
+
- <img src="https://avatars.githubusercontent.com/u/144717797?s=48&" width="16" height="16"> [**Stylistic**](https://github.com/eslint-stylistic/eslint-stylistic) - Code formatting rules
|
|
42
|
+
- <img src="https://avatars.githubusercontent.com/u/46634674?s=48&" width="16" height="16"> [**TypeScript ESLint**](https://github.com/typescript-eslint/typescript-eslint) - TypeScript linting
|
|
43
|
+
- 🦄 [**Unicorn**](https://github.com/sindresorhus/eslint-plugin-unicorn) - More than 100 powerful ESLint rules
|
|
38
44
|
|
|
39
45
|
## Installation
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
### 1. Install Package
|
|
42
48
|
|
|
43
49
|
```sh
|
|
44
50
|
npm install eslint-config-angular-strict --save-dev
|
|
@@ -52,7 +58,7 @@ yarn add eslint-config-angular-strict --dev
|
|
|
52
58
|
|
|
53
59
|
**⚠️ Important**: Remove any existing `eslint` dependency from your project - it's included!
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
### 2. Configure ESLint
|
|
56
62
|
|
|
57
63
|
Create an `eslint.config.js` file (ESLint 9 flat config format):
|
|
58
64
|
|
|
@@ -65,7 +71,9 @@ export default [
|
|
|
65
71
|
];
|
|
66
72
|
```
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
### 3. Update package.json
|
|
75
|
+
|
|
76
|
+
Add the following to your `package.json`:
|
|
69
77
|
|
|
70
78
|
```json
|
|
71
79
|
{
|
|
@@ -85,7 +93,7 @@ Make sure your `tsconfig.json` is properly configured:
|
|
|
85
93
|
"noImplicitOverride": true,
|
|
86
94
|
"noUnusedLocals": true,
|
|
87
95
|
"noUnusedParameters": true,
|
|
88
|
-
"strict": true
|
|
96
|
+
"strict": true
|
|
89
97
|
},
|
|
90
98
|
"angularCompilerOptions": {
|
|
91
99
|
"strictInjectionParameters": true,
|
package/index.js
CHANGED
|
@@ -33,12 +33,10 @@ export default [
|
|
|
33
33
|
// Angular ESLint rules
|
|
34
34
|
'@angular-eslint/component-class-suffix': ['error', { suffixes: ['Component', 'Modal', 'Page'] }],
|
|
35
35
|
'@angular-eslint/component-max-inline-declarations': 'error',
|
|
36
|
-
'@angular-eslint/component-selector': ['error', { type: 'element', style: 'kebab-case' }],
|
|
37
36
|
'@angular-eslint/consistent-component-styles': 'error',
|
|
38
37
|
'@angular-eslint/contextual-decorator': 'error',
|
|
39
38
|
'@angular-eslint/contextual-lifecycle': 'error',
|
|
40
39
|
'@angular-eslint/directive-class-suffix': 'error',
|
|
41
|
-
'@angular-eslint/directive-selector': ['error', { type: 'attribute', style: 'camelCase' }],
|
|
42
40
|
'@angular-eslint/no-async-lifecycle-method': 'error',
|
|
43
41
|
'@angular-eslint/no-attribute-decorator': 'error',
|
|
44
42
|
'@angular-eslint/no-conflicting-lifecycle': 'error',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-angular-strict",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.71",
|
|
4
4
|
"description": "Modern ESLint configuration with strict rules for Angular development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"test": "cd tests && yarn install && eslint . --format=stylish"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@angular-eslint/builder": "20.
|
|
39
|
-
"@angular-eslint/eslint-plugin": "20.
|
|
40
|
-
"@angular-eslint/eslint-plugin-template": "20.
|
|
41
|
-
"@angular-eslint/template-parser": "20.
|
|
38
|
+
"@angular-eslint/builder": "20.6.0",
|
|
39
|
+
"@angular-eslint/eslint-plugin": "20.6.0",
|
|
40
|
+
"@angular-eslint/eslint-plugin-template": "20.6.0",
|
|
41
|
+
"@angular-eslint/template-parser": "20.6.0",
|
|
42
42
|
"@stylistic/eslint-plugin": "5.5.0",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "8.46.3",
|
|
44
44
|
"@typescript-eslint/parser": "8.46.3",
|