eslint-config-angular-strict 2.3.2 → 2.3.3
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 +21 -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,25 @@ 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
|
+
{ static: true, type: 'property', sort: 'alphabetical' },
|
|
114
|
+
{ static: false, type: 'property', sort: 'alphabetical' },
|
|
115
|
+
'constructor',
|
|
116
|
+
{ name: '/^ng/', type: 'method', sort: 'alphabetical' },
|
|
117
|
+
'[accessor-pairs]',
|
|
118
|
+
{ kind: 'get', sort: 'alphabetical' },
|
|
119
|
+
{ kind: 'set', sort: 'alphabetical' },
|
|
120
|
+
{ static: true, type: 'method', sort: 'alphabetical' },
|
|
121
|
+
{ static: false, type: 'method', sort: 'alphabetical' },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
|
|
105
126
|
// Stylistic rules
|
|
106
127
|
'@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
107
128
|
'@stylistic/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
@@ -124,7 +145,6 @@ export default [
|
|
|
124
145
|
// TypeScript ESLint rules
|
|
125
146
|
'@typescript-eslint/consistent-type-assertions': ['error', { arrayLiteralTypeAssertions: 'never', assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }],
|
|
126
147
|
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'no-type-imports' }],
|
|
127
|
-
'@typescript-eslint/member-ordering': 'error',
|
|
128
148
|
'@typescript-eslint/no-base-to-string': 'error',
|
|
129
149
|
'@typescript-eslint/no-dynamic-delete': 'error',
|
|
130
150
|
'@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.03",
|
|
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": {
|