eslint-config-angular-strict 2.3.2 → 2.3.4
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/.yarn/install-state.gz +0 -0
- package/index.js +34 -1
- package/package.json +2 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import angularEslintPlugin from '@angular-eslint/eslint-plugin';
|
|
|
2
2
|
import angularTemplateParser from '@angular-eslint/template-parser';
|
|
3
3
|
import angularTemplatePlugin from '@angular-eslint/eslint-plugin-template';
|
|
4
4
|
import importXPlugin from 'eslint-plugin-import-x';
|
|
5
|
+
import sortClassMembersPlugin from 'eslint-plugin-sort-class-members';
|
|
5
6
|
import stylistic from '@stylistic/eslint-plugin';
|
|
6
7
|
import tsEslintParser from '@typescript-eslint/parser';
|
|
7
8
|
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
|
|
@@ -16,6 +17,7 @@ export default [
|
|
|
16
17
|
'@stylistic': stylistic,
|
|
17
18
|
'@typescript-eslint': tsEslintPlugin,
|
|
18
19
|
'import-x': importXPlugin,
|
|
20
|
+
'sort-class-members': sortClassMembersPlugin,
|
|
19
21
|
},
|
|
20
22
|
},
|
|
21
23
|
|
|
@@ -102,6 +104,38 @@ export default [
|
|
|
102
104
|
],
|
|
103
105
|
'import-x/prefer-default-export': 'off',
|
|
104
106
|
|
|
107
|
+
// Sort class members rules
|
|
108
|
+
'sort-class-members/sort-class-members': [
|
|
109
|
+
'error',
|
|
110
|
+
{
|
|
111
|
+
accessorPairPositioning: 'getThenSet',
|
|
112
|
+
order: [
|
|
113
|
+
// Decorated properties (@Input, @Output, @ViewChild, etc.)
|
|
114
|
+
{ groupByDecorator: '/.*/', type: 'property', sort: 'alphabetical' },
|
|
115
|
+
// Static properties
|
|
116
|
+
{ accessibility: 'public', static: true, type: 'property', sort: 'alphabetical' },
|
|
117
|
+
{ accessibility: 'private', static: true, type: 'property', sort: 'alphabetical' },
|
|
118
|
+
// Instance properties
|
|
119
|
+
{ accessibility: 'public', static: false, type: 'property', sort: 'alphabetical' },
|
|
120
|
+
{ accessibility: 'private', static: false, type: 'property', sort: 'alphabetical' },
|
|
121
|
+
// Constructor
|
|
122
|
+
'constructor',
|
|
123
|
+
// Angular lifecycle methods (ng*)
|
|
124
|
+
{ name: '/^ng/', type: 'method', sort: 'alphabetical' },
|
|
125
|
+
// Accessors
|
|
126
|
+
'[accessor-pairs]',
|
|
127
|
+
{ kind: 'get', sort: 'alphabetical' },
|
|
128
|
+
{ kind: 'set', sort: 'alphabetical' },
|
|
129
|
+
// Static methods
|
|
130
|
+
{ accessibility: 'public', static: true, type: 'method', sort: 'alphabetical' },
|
|
131
|
+
{ accessibility: 'private', static: true, type: 'method', sort: 'alphabetical' },
|
|
132
|
+
// Instance methods
|
|
133
|
+
{ accessibility: 'public', static: false, type: 'method', sort: 'alphabetical' },
|
|
134
|
+
{ accessibility: 'private', static: false, type: 'method', sort: 'alphabetical' },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
|
|
105
139
|
// Stylistic rules
|
|
106
140
|
'@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
107
141
|
'@stylistic/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
@@ -124,7 +158,6 @@ export default [
|
|
|
124
158
|
// TypeScript ESLint rules
|
|
125
159
|
'@typescript-eslint/consistent-type-assertions': ['error', { arrayLiteralTypeAssertions: 'never', assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }],
|
|
126
160
|
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'no-type-imports' }],
|
|
127
|
-
'@typescript-eslint/member-ordering': 'error',
|
|
128
161
|
'@typescript-eslint/no-base-to-string': 'error',
|
|
129
162
|
'@typescript-eslint/no-dynamic-delete': 'error',
|
|
130
163
|
'@typescript-eslint/no-extraneous-class': ['error', { allowEmpty: true, allowStaticOnly: true }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-angular-strict",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.04",
|
|
4
4
|
"description": "Modern ESLint configuration with strict rules for Angular development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"eslint": "9.39.2",
|
|
48
48
|
"eslint-config-airbnb-extended": "3.0.1",
|
|
49
49
|
"eslint-plugin-import-x": "4.16.1",
|
|
50
|
+
"eslint-plugin-sort-class-members": "^1.21.0",
|
|
50
51
|
"eslint-plugin-unicorn": "62.0.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|