eslint-config-seekingalpha-base 8.0.0 → 8.1.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # Change Log
2
2
 
3
- ## 8.0.0 - 2024-04-00
3
+ ## 8.1.0 - 2024-05-12
4
+
5
+ - [deps] update `eslint-plugin-unicorn` to version `53.0.0`
6
+ - [breaking] enable `unicorn/consistent-empty-array-spread` rule
7
+ - [breaking] enable `unicorn/no-invalid-fetch-options` rule
8
+ - [breaking] enable `unicorn/no-magic-array-flat-depth` rule
9
+ - [breaking] enable `unicorn/prefer-string-raw` rule
10
+ - [breaking] enable `unicorn/prefer-structured-clone` rule
11
+
12
+ ## 8.0.0 - 2024-04-08
4
13
 
5
14
  - [breaking] removed `@stylistic/eslint-plugin-js`
6
15
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/
6
6
 
7
7
  Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/):
8
8
 
9
- npm install eslint@8.57.0 eslint-plugin-array-func@4.0.0 eslint-plugin-import@2.29.1 eslint-plugin-no-use-extend-native@0.5.0 eslint-plugin-promise@6.1.1 eslint-plugin-unicorn@52.0.0 --save-dev
9
+ npm install eslint@8.57.0 eslint-plugin-array-func@4.0.0 eslint-plugin-import@2.29.1 eslint-plugin-no-use-extend-native@0.5.0 eslint-plugin-promise@6.1.1 eslint-plugin-unicorn@53.0.0 --save-dev
10
10
 
11
11
  Install SeekingAlpha shareable ESLint:
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-seekingalpha-base",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "SeekingAlpha's sharable base ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  "eslint-plugin-import": "2.29.1",
54
54
  "eslint-plugin-no-use-extend-native": "0.5.0",
55
55
  "eslint-plugin-promise": "6.1.1",
56
- "eslint-plugin-unicorn": "52.0.0"
56
+ "eslint-plugin-unicorn": "53.0.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "eslint": "8.57.0",
@@ -62,6 +62,6 @@
62
62
  "eslint-plugin-import": "2.29.1",
63
63
  "eslint-plugin-no-use-extend-native": "0.5.0",
64
64
  "eslint-plugin-promise": "6.1.1",
65
- "eslint-plugin-unicorn": "52.0.0"
65
+ "eslint-plugin-unicorn": "53.0.0"
66
66
  }
67
67
  }
@@ -1,3 +1,7 @@
1
1
  module.exports = {
2
- extends: ['./possible-problems.js', './suggestions.js', './layout-and-formatting.js'],
2
+ extends: [
3
+ './possible-problems.js',
4
+ './suggestions.js',
5
+ './layout-and-formatting.js',
6
+ ],
3
7
  };
@@ -437,7 +437,8 @@ module.exports = {
437
437
  'no-restricted-syntax': [
438
438
  'error',
439
439
  {
440
- selector: 'CallExpression[callee.name="setTimeout"][arguments.length!=2]',
440
+ selector:
441
+ 'CallExpression[callee.name="setTimeout"][arguments.length!=2]',
441
442
  message: 'setTimeout must always be invoked with two arguments.',
442
443
  },
443
444
  {
@@ -446,7 +447,8 @@ module.exports = {
446
447
  },
447
448
  {
448
449
  selector: 'LabeledStatement',
449
- message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
450
+ message:
451
+ 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
450
452
  },
451
453
  {
452
454
  selector: 'WithStatement',
@@ -1,7 +1,12 @@
1
1
  // eslint-plugin-import rules (https://github.com/benmosher/eslint-plugin-import)
2
2
 
3
3
  module.exports = {
4
- extends: ['./helpful-warnings.js', './module-systems.js', './static-analysis.js', './style-guide.js'],
4
+ extends: [
5
+ './helpful-warnings.js',
6
+ './module-systems.js',
7
+ './static-analysis.js',
8
+ './style-guide.js',
9
+ ],
5
10
 
6
11
  plugins: ['import'],
7
12
 
@@ -32,7 +32,16 @@ module.exports = {
32
32
  'import/order': [
33
33
  'error',
34
34
  {
35
- groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'unknown', 'index', 'type'],
35
+ groups: [
36
+ 'builtin',
37
+ 'external',
38
+ 'internal',
39
+ 'parent',
40
+ 'sibling',
41
+ 'unknown',
42
+ 'index',
43
+ 'type',
44
+ ],
36
45
 
37
46
  'newlines-between': 'always',
38
47
  },
@@ -18,6 +18,9 @@ module.exports = {
18
18
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-destructuring.md
19
19
  'unicorn/consistent-destructuring': 'error',
20
20
 
21
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md
22
+ 'unicorn/consistent-empty-array-spread': 'error',
23
+
21
24
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-function-scoping.md
22
25
  'unicorn/consistent-function-scoping': 'error',
23
26
 
@@ -102,6 +105,9 @@ module.exports = {
102
105
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-instanceof-array.md
103
106
  'unicorn/no-instanceof-array': 'error',
104
107
 
108
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md
109
+ 'unicorn/no-invalid-fetch-options': 'error',
110
+
105
111
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
106
112
  'unicorn/no-invalid-remove-event-listener': 'error',
107
113
 
@@ -117,6 +123,9 @@ module.exports = {
117
123
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-lonely-if.md
118
124
  'unicorn/no-lonely-if': 'error',
119
125
 
126
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md
127
+ 'unicorn/no-magic-array-flat-depth': 'error',
128
+
120
129
  /*
121
130
  * Disabled in favour of native ESLint no-negated-condition rule
122
131
  * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md
@@ -327,6 +336,9 @@ module.exports = {
327
336
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-spread.md
328
337
  'unicorn/prefer-spread': 'off',
329
338
 
339
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md
340
+ 'unicorn/prefer-string-raw': 'error',
341
+
330
342
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
331
343
  'unicorn/prefer-string-replace-all': 'error',
332
344
 
@@ -339,6 +351,9 @@ module.exports = {
339
351
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-trim-start-end.md
340
352
  'unicorn/prefer-string-trim-start-end': 'error',
341
353
 
354
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md
355
+ 'unicorn/prefer-structured-clone': 'error',
356
+
342
357
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
343
358
  'unicorn/prefer-switch': 'error',
344
359