eslint-config-angular-strict 22.3.1 → 22.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.
Files changed (2) hide show
  1. package/index.js +4 -0
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -51,6 +51,7 @@ export default [
51
51
  'max-depth': 'error',
52
52
  'max-lines': ['error', { max: 425, skipBlankLines: true, skipComments: true }],
53
53
  'max-nested-callbacks': 'error',
54
+ 'no-continue': 'off', // conflicts with unicorn/prefer-continue, which requires the early continue this rule forbids
54
55
  'no-fallthrough': 'off',
55
56
  'no-loop-func': 'error',
56
57
  'no-param-reassign': ['error', { props: false }],
@@ -296,10 +297,13 @@ export default [
296
297
  'unicorn/no-null': 'off',
297
298
  'unicorn/no-this-outside-of-class': 'off',
298
299
  'unicorn/prefer-await': 'off',
300
+ 'unicorn/prefer-continue': ['error', { maximumStatements: 2 }], // two coupled statements read better wrapped than behind an inverted guard
301
+ 'unicorn/prefer-early-return': ['error', { maximumStatements: 2 }], // same threshold as prefer-continue, so loops and functions follow one rule
299
302
  'unicorn/prefer-includes-over-repeated-comparisons': ['error', { minimumComparisons: 6 }],
300
303
  'unicorn/prefer-number-coercion': 'off', // `Number()` reads a CSS length like `30.8px` as NaN, and Typed OM gives the declared ratio, not the used pixels
301
304
  'unicorn/prefer-split-limit': 'off',
302
305
  'unicorn/prefer-temporal': 'off',
306
+ 'unicorn/prefer-ternary': ['error', 'only-single-line'], // a guard followed by a multi-line return reads better as if/return
303
307
  'unicorn/prefer-top-level-await': 'off',
304
308
  'unicorn/switch-case-braces': ['error', 'avoid'],
305
309
  'unicorn/try-complexity': ['error', { max: 5 }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-angular-strict",
3
- "version": "22.3.1",
3
+ "version": "22.3.3",
4
4
  "description": "Modern ESLint configuration with strict rules for Angular development.",
5
5
  "keywords": [
6
6
  "angular",
@@ -46,7 +46,7 @@
46
46
  "eslint-config-airbnb-extended": "3.2.0",
47
47
  "eslint-plugin-import-x": "4.17.1",
48
48
  "eslint-plugin-perfectionist": "5.11.1",
49
- "eslint-plugin-unicorn": "74.0.0"
49
+ "eslint-plugin-unicorn": "75.0.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "typescript": "6.0.3"