eslint-config-angular-strict 2.2.69 → 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.
Files changed (3) hide show
  1. package/README.md +22 -14
  2. package/index.js +13 -14
  3. package/package.json +11 -11
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
- - **Angular**: Standalone components, lifecycle enforcement, component standards, and more...
24
- - **TypeScript**: Strict typing, member ordering, modern patterns, and more...
25
- - **Quality**: Modern JavaScript, anti-patterns prevention, performance optimization, and more...
26
- - **Style**: Airbnb compliance, max length, import organization, and more...
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 9**](https://github.com/eslint/eslint)
35
- - <img src="https://avatars.githubusercontent.com/u/144717797?s=48&" width="16" height="16"> [**Stylistic**](https://github.com/eslint-stylistic/eslint-stylistic)
36
- - <img src="https://avatars.githubusercontent.com/u/46634674?s=48&" width="16" height="16"> [**TypeScript ESLint**](https://github.com/typescript-eslint/typescript-eslint)
37
- - 🦄 [**Unicorn**](https://github.com/sindresorhus/eslint-plugin-unicorn)
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
- One command setup
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
- ## ESLint Configuration
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
- **Required**: add to your `package.json`:
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
@@ -1,44 +1,42 @@
1
- import angular from '@angular-eslint/eslint-plugin';
2
- import angularTemplate from '@angular-eslint/eslint-plugin-template';
1
+ import angularEslintPlugin from '@angular-eslint/eslint-plugin';
3
2
  import angularTemplateParser from '@angular-eslint/template-parser';
4
- import eslintPluginUnicorn from 'eslint-plugin-unicorn';
5
- import importX from 'eslint-plugin-import-x';
3
+ import angularTemplatePlugin from '@angular-eslint/eslint-plugin-template';
4
+ import importXPlugin from 'eslint-plugin-import-x';
6
5
  import stylistic from '@stylistic/eslint-plugin';
7
- import tsEslint from '@typescript-eslint/eslint-plugin';
8
- import tsParser from '@typescript-eslint/parser';
6
+ import tsEslintParser from '@typescript-eslint/parser';
7
+ import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
8
+ import unicornPlugin from 'eslint-plugin-unicorn';
9
9
  import { configs, rules } from 'eslint-config-airbnb-extended';
10
10
 
11
11
  export default [
12
12
  {
13
13
  ignores: ['dist/**', 'node_modules/**'],
14
14
  plugins: {
15
- '@angular-eslint/template': angularTemplate,
15
+ '@angular-eslint/template': angularTemplatePlugin,
16
16
  '@stylistic': stylistic,
17
- '@typescript-eslint': tsEslint,
18
- 'import-x': importX,
17
+ '@typescript-eslint': tsEslintPlugin,
18
+ 'import-x': importXPlugin,
19
19
  },
20
20
  },
21
21
 
22
22
  ...configs.base.all,
23
- eslintPluginUnicorn.configs.all,
23
+ unicornPlugin.configs.all,
24
24
  rules.base.importsStrict,
25
25
  rules.typescript.typescriptEslintStrict,
26
26
 
27
27
  // TypeScript files configuration
28
28
  {
29
29
  files: ['**/*.ts'],
30
- languageOptions: { parser: tsParser, parserOptions: { project: './tsconfig.json' } },
31
- plugins: { '@angular-eslint': angular },
30
+ languageOptions: { parser: tsEslintParser, parserOptions: { project: './tsconfig.json' } },
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',
@@ -69,6 +67,7 @@ export default [
69
67
 
70
68
  // ESLint rules
71
69
  'class-methods-use-this': 'off',
70
+ 'complexity': ['error', { max: 25 }],
72
71
  'max-lines': ['error', { max: 400, skipBlankLines: true, skipComments: true }],
73
72
  'no-fallthrough': 'off',
74
73
  'no-param-reassign': ['error', { props: false }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "2.2.69",
3
+ "version": "2.2.71",
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.5.0",
39
- "@angular-eslint/eslint-plugin": "20.5.0",
40
- "@angular-eslint/eslint-plugin-template": "20.5.0",
41
- "@angular-eslint/template-parser": "20.5.0",
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.2",
44
- "@typescript-eslint/parser": "8.46.2",
45
- "@typescript-eslint/types": "8.46.2",
46
- "@typescript-eslint/utils": "8.46.2",
47
- "eslint": "9.38.0",
43
+ "@typescript-eslint/eslint-plugin": "8.46.3",
44
+ "@typescript-eslint/parser": "8.46.3",
45
+ "@typescript-eslint/types": "8.46.3",
46
+ "@typescript-eslint/utils": "8.46.3",
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.2"
52
+ "typescript-eslint": "8.46.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "typescript": "5.9.3"