eslint-config-angular-strict 22.6.12 → 22.6.14
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/index.js +10 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -22,6 +22,9 @@ const enableAllRules = (plugin, prefix) => Object.fromEntries(Object.keys(plugin
|
|
|
22
22
|
// The language plugins ship their presets as arrays whose rules carry no `files` — merge them so they stay scoped to our own blocks
|
|
23
23
|
const presetRules = preset => Object.assign({}, ...preset.map(config => config.rules));
|
|
24
24
|
|
|
25
|
+
// Same line length for every file type that has a rule for it: JSON and Markdown have none
|
|
26
|
+
const maxLen = ['error', { code: 165, tabWidth: 2 }];
|
|
27
|
+
|
|
25
28
|
// Data files get their own language blocks below: the JavaScript presets must not reach them
|
|
26
29
|
const dataFiles = ['**/*.json', '**/*.json5', '**/*.jsonc', '**/*.md', '**/*.toml', '**/*.yaml', '**/*.yml'];
|
|
27
30
|
|
|
@@ -91,7 +94,7 @@ export default [
|
|
|
91
94
|
'@stylistic/array-element-newline': ['error', { consistent: true, multiline: true }],
|
|
92
95
|
'@stylistic/arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
93
96
|
'@stylistic/lines-between-class-members': 'off',
|
|
94
|
-
'@stylistic/max-len':
|
|
97
|
+
'@stylistic/max-len': maxLen,
|
|
95
98
|
'@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 5 }],
|
|
96
99
|
'@stylistic/no-confusing-arrow': 'off',
|
|
97
100
|
'@stylistic/no-extra-parens': ['error', 'all', { ignoredNodes: ['ConditionalExpression'], nestedBinaryExpressions: false, returnAssign: false }],
|
|
@@ -329,6 +332,9 @@ export default [
|
|
|
329
332
|
},
|
|
330
333
|
},
|
|
331
334
|
|
|
335
|
+
// JavaScript files configuration
|
|
336
|
+
{ files: ['**/*.cjs', '**/*.js', '**/*.mjs'], rules: { '@stylistic/max-len': maxLen } },
|
|
337
|
+
|
|
332
338
|
// HTML Template files configuration
|
|
333
339
|
{
|
|
334
340
|
files: ['**/*.html'],
|
|
@@ -347,6 +353,7 @@ export default [
|
|
|
347
353
|
'@angular-eslint/template/no-call-expression': 'off',
|
|
348
354
|
'@angular-eslint/template/no-inline-styles': 'off',
|
|
349
355
|
'@angular-eslint/template/prefer-ngsrc': 'off',
|
|
356
|
+
'@stylistic/max-len': maxLen,
|
|
350
357
|
},
|
|
351
358
|
},
|
|
352
359
|
|
|
@@ -380,6 +387,7 @@ export default [
|
|
|
380
387
|
rules: {
|
|
381
388
|
...presetRules(tomlPlugin.configs['flat/standard']),
|
|
382
389
|
...unicornPlugin.configs['recommended-toml'].rules,
|
|
390
|
+
'@stylistic/max-len': maxLen,
|
|
383
391
|
'toml/array-bracket-spacing': ['error', 'never'], // same as `@stylistic/array-bracket-spacing` on the TypeScript side
|
|
384
392
|
'toml/array-element-newline': ['error', 'consistent'], // one element per line is not forced, only mixing both layouts is reported
|
|
385
393
|
},
|
|
@@ -390,7 +398,7 @@ export default [
|
|
|
390
398
|
files: ['**/*.yaml', '**/*.yml'],
|
|
391
399
|
language: 'yml/yaml',
|
|
392
400
|
plugins: { unicorn: unicornPlugin, yml: ymlPlugin },
|
|
393
|
-
rules: { ...presetRules(ymlPlugin.configs['flat/standard']), ...unicornPlugin.configs['recommended-yaml'].rules },
|
|
401
|
+
rules: { ...presetRules(ymlPlugin.configs['flat/standard']), ...unicornPlugin.configs['recommended-yaml'].rules, 'yml/max-len': maxLen },
|
|
394
402
|
},
|
|
395
403
|
|
|
396
404
|
...noRestrictedSyntaxOverrides,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-angular-strict",
|
|
3
|
-
"version": "22.6.
|
|
3
|
+
"version": "22.6.14",
|
|
4
4
|
"description": "Modern ESLint configuration with strict rules for Angular development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"eslint": "10.14.0",
|
|
48
48
|
"eslint-config-airbnb-extended": "3.3.0",
|
|
49
49
|
"eslint-config-flat-gitignore": "2.4.0",
|
|
50
|
-
"eslint-plugin-import-x": "4.
|
|
50
|
+
"eslint-plugin-import-x": "4.18.0",
|
|
51
51
|
"eslint-plugin-perfectionist": "5.13.0",
|
|
52
52
|
"eslint-plugin-toml": "1.5.0",
|
|
53
53
|
"eslint-plugin-unicorn": "79.0.0",
|
|
54
|
-
"eslint-plugin-yml": "3.
|
|
54
|
+
"eslint-plugin-yml": "3.10.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"typescript": "6.0.3"
|