eslint-config-angular-strict 2.2.70 → 2.2.72
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 +25 -17
- package/index.js +1 -3
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<p align="center">Modern ESLint configuration with strict rules for <strong>Angular</strong> development</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/eslint-config-angular-strict"><img src="https://
|
|
11
|
-
<a href="https://github.com/Jbz797/eslint-config-angular-strict/blob/master/LICENSE"><img src="https://
|
|
12
|
-
<a href="https://www.npmjs.com/package/eslint-config-angular-strict"><img src="https://
|
|
10
|
+
<a href="https://www.npmjs.com/package/eslint-config-angular-strict"><img src="https://badgen.net/npm/v/eslint-config-angular-strict" alt="NPM Version" /></a>
|
|
11
|
+
<a href="https://github.com/Jbz797/eslint-config-angular-strict/blob/master/LICENSE"><img src="https://badgen.net/npm/license/eslint-config-angular-strict" alt="GitHub license" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/eslint-config-angular-strict"><img src="https://badgen.net/npm/dm/eslint-config-angular-strict" alt="NPM Downloads" /></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<br>
|
|
@@ -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**: 30+ rules for standalone, lifecycle, components/directives standards, metadata, signals, pipes,...<br>
|
|
28
|
+
📘 **TypeScript**: Member ordering, promise-async, type imports, strict typing, type safety, extraneous classes,...<br>
|
|
29
|
+
✨ **Code Quality**: Complexity max, file length control, import cycles detection, 100+ Unicorn best practices,...<br>
|
|
30
|
+
🎨 **Style**: Airbnb extended, max line length, arrow parens, object/class newlines, sorted keys/imports,...<br>
|
|
31
|
+
🔍 **Templates**: 30+ rules with alphabetical attrs, complexity max, control flow, trackBy, a11y, no-any,...
|
|
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
|
@@ -27,18 +27,16 @@ export default [
|
|
|
27
27
|
// TypeScript files configuration
|
|
28
28
|
{
|
|
29
29
|
files: ['**/*.ts'],
|
|
30
|
-
languageOptions: { parser: tsEslintParser
|
|
30
|
+
languageOptions: { parser: tsEslintParser },
|
|
31
31
|
plugins: { '@angular-eslint': angularEslintPlugin },
|
|
32
32
|
rules: {
|
|
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.72",
|
|
4
4
|
"description": "Modern ESLint configuration with strict rules for Angular development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -35,21 +35,21 @@
|
|
|
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
|
-
"@typescript-eslint/eslint-plugin": "8.46.
|
|
44
|
-
"@typescript-eslint/parser": "8.46.
|
|
45
|
-
"@typescript-eslint/types": "8.46.
|
|
46
|
-
"@typescript-eslint/utils": "8.46.
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "8.46.4",
|
|
44
|
+
"@typescript-eslint/parser": "8.46.4",
|
|
45
|
+
"@typescript-eslint/types": "8.46.4",
|
|
46
|
+
"@typescript-eslint/utils": "8.46.4",
|
|
47
47
|
"eslint": "9.39.1",
|
|
48
48
|
"eslint-config-airbnb-extended": "2.3.2",
|
|
49
49
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
50
50
|
"eslint-plugin-import-x": "4.16.1",
|
|
51
51
|
"eslint-plugin-unicorn": "62.0.0",
|
|
52
|
-
"typescript-eslint": "8.46.
|
|
52
|
+
"typescript-eslint": "8.46.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"typescript": "5.9.3"
|