@jkba/eslint-config-angular 2.2.0 → 3.1.1
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 +1 -0
- package/eslint.config.js +21 -8
- package/index.js +2 -2
- package/package.json +9 -2
- package/prettier.config.js +2 -2
package/README.md
CHANGED
package/eslint.config.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import eslint from '@eslint/js';
|
|
4
|
+
import tseslint from 'typescript-eslint';
|
|
5
|
+
import angular from 'angular-eslint';
|
|
6
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
7
|
+
import * as importPlugin from 'eslint-plugin-import';
|
|
8
|
+
import rxjs from '@smarttools/eslint-plugin-rxjs';
|
|
9
|
+
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
10
|
+
import globals from 'globals';
|
|
9
11
|
|
|
10
12
|
const config = tseslint.config(
|
|
11
13
|
{
|
|
@@ -120,7 +122,7 @@ const config = tseslint.config(
|
|
|
120
122
|
{
|
|
121
123
|
type: 'attribute',
|
|
122
124
|
prefix: 'app',
|
|
123
|
-
style: 'kebab-case', // I just don't really agree with using camelCase. Material isn't using it
|
|
125
|
+
style: 'kebab-case', // I just don't really agree with using camelCase. Material isn't using it either.
|
|
124
126
|
},
|
|
125
127
|
],
|
|
126
128
|
|
|
@@ -161,12 +163,23 @@ const config = tseslint.config(
|
|
|
161
163
|
'@angular-eslint/template/prefer-control-flow': 'error',
|
|
162
164
|
},
|
|
163
165
|
},
|
|
166
|
+
{
|
|
167
|
+
languageOptions: {
|
|
168
|
+
globals: globals.builtin,
|
|
169
|
+
},
|
|
170
|
+
extends: [eslintPluginUnicorn.configs.recommended],
|
|
171
|
+
rules: {
|
|
172
|
+
'unicorn/prevent-abbreviations': 'off', // I just simply disagree with this rule
|
|
173
|
+
'unicorn/array-reduce': 'off', // Author of banning reduce belongs to Functional Programming hell
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
|
|
164
177
|
// Prettier rule must always be the very last!
|
|
165
178
|
// This rule might intentionally disable some rules declared above due to conflicts
|
|
166
179
|
eslintPluginPrettierRecommended,
|
|
167
180
|
);
|
|
168
181
|
|
|
169
|
-
|
|
182
|
+
export default config;
|
|
170
183
|
|
|
171
184
|
// notes
|
|
172
185
|
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import eslintconfig from './eslint.config.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export default eslintconfig;
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jkba/eslint-config-angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.1",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Opinionated ESLint config for Angular projects",
|
|
5
6
|
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./eslint.config": "./eslint.config.js",
|
|
10
|
+
"./prettier.config": "./prettier.config.js"
|
|
11
|
+
},
|
|
6
12
|
"scripts": {
|
|
7
13
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
14
|
},
|
|
@@ -42,6 +48,7 @@
|
|
|
42
48
|
"prettier": ">=3",
|
|
43
49
|
"typescript": ">=4",
|
|
44
50
|
"typescript-eslint": "^8",
|
|
45
|
-
"@smarttools/eslint-plugin-rxjs": "^1.0.0"
|
|
51
|
+
"@smarttools/eslint-plugin-rxjs": "^1.0.0",
|
|
52
|
+
"eslint-plugin-unicorn": "^62.0.0"
|
|
46
53
|
}
|
|
47
54
|
}
|