@allthings/eslint-config 1.1.0 → 2.0.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.
Files changed (3) hide show
  1. package/index.js +44 -1
  2. package/node.js +40 -0
  3. package/package.json +7 -6
package/index.js CHANGED
@@ -30,6 +30,7 @@ sortedPaths.push(...keptPaths)
30
30
 
31
31
  const hookPropertyMap = new Map(
32
32
  [
33
+ ['eslint-plugin-unicorn', 'eslint-plugin-unicorn'],
33
34
  ['eslint-plugin-jest', 'eslint-plugin-jest'],
34
35
  ['eslint-plugin-import', 'eslint-plugin-import'],
35
36
  ['eslint-plugin-react', 'eslint-plugin-react'],
@@ -61,6 +62,7 @@ require('@rushstack/eslint-patch/modern-module-resolution')
61
62
 
62
63
  module.exports = {
63
64
  extends: [
65
+ 'plugin:unicorn/recommended',
64
66
  'plugin:import/recommended',
65
67
  'plugin:import/typescript',
66
68
  'eslint:recommended',
@@ -73,6 +75,7 @@ module.exports = {
73
75
  'plugin:prettier/recommended',
74
76
  ],
75
77
  plugins: [
78
+ 'unicorn',
76
79
  'jest',
77
80
  'import',
78
81
  'react',
@@ -175,7 +178,10 @@ module.exports = {
175
178
  ],
176
179
  '@typescript-eslint/no-this-alias': 'error',
177
180
  '@typescript-eslint/no-unused-expressions': 'error',
178
- '@typescript-eslint/no-unused-vars': 'error',
181
+ '@typescript-eslint/no-unused-vars': [
182
+ 'error',
183
+ { varsIgnorePattern: '^jsx$' },
184
+ ],
179
185
  '@typescript-eslint/no-use-before-define': 'error',
180
186
  '@typescript-eslint/no-var-requires': 'error',
181
187
  '@typescript-eslint/prefer-for-of': 'error',
@@ -313,6 +319,43 @@ module.exports = {
313
319
  markers: ['/'],
314
320
  },
315
321
  ],
322
+ 'unicorn/better-regex': 'off',
323
+ 'unicorn/expiring-todo-comments': 'off',
324
+ 'unicorn/filename-case': [
325
+ 'warn',
326
+ {
327
+ cases: {
328
+ camelCase: true,
329
+ pascalCase: true,
330
+ },
331
+ },
332
+ ],
333
+ 'unicorn/import-style': 'warn',
334
+ 'unicorn/no-array-reduce': 'off',
335
+ 'unicorn/no-console-spaces': 'off',
336
+ 'unicorn/no-document-cookie': 'warn',
337
+ 'unicorn/no-empty-file': 'off',
338
+ 'unicorn/no-hex-escape': 'warn',
339
+ 'unicorn/no-invalid-remove-event-listener': 'warn',
340
+ 'unicorn/no-nested-ternary': 'off',
341
+ 'unicorn/no-object-as-default-parameter': 'warn',
342
+ 'unicorn/no-unreadable-array-destructuring': 'off',
343
+ 'unicorn/no-unsafe-regex': 'off',
344
+ 'unicorn/no-unused-properties': 'warn',
345
+ 'unicorn/no-zero-fractions': 'off',
346
+ 'unicorn/prefer-export-from': 'off',
347
+ 'unicorn/prefer-includes': 'off',
348
+ 'unicorn/prefer-module': 'warn',
349
+ 'unicorn/prefer-optional-catch-binding': 'off',
350
+ 'unicorn/prefer-prototype-methods': 'off',
351
+ 'unicorn/prefer-query-selector': 'off',
352
+ 'unicorn/prefer-regexp-test': 'off',
353
+ 'unicorn/prefer-set-has': 'off',
354
+ 'unicorn/prefer-set-size': 'off',
355
+ 'unicorn/prefer-string-replace-all': 'off',
356
+ 'unicorn/relative-url-style': 'off',
357
+ 'unicorn/switch-case-braces': 'off',
358
+ 'unicorn/template-indent': 'off',
316
359
  'use-isnan': 'error',
317
360
  },
318
361
  parser: '@typescript-eslint/parser',
package/node.js CHANGED
@@ -28,6 +28,7 @@ sortedPaths.push(...keptPaths.reverse())
28
28
 
29
29
  const hookPropertyMap = new Map(
30
30
  [
31
+ ['eslint-plugin-unicorn', 'eslint-plugin-unicorn'],
31
32
  ['eslint-plugin-jest', 'eslint-plugin-jest'],
32
33
  ['eslint-plugin-import', 'eslint-plugin-import'],
33
34
  [
@@ -56,6 +57,7 @@ require('@rushstack/eslint-patch/modern-module-resolution')
56
57
 
57
58
  module.exports = {
58
59
  extends: [
60
+ 'plugin:unicorn/recommended',
59
61
  'plugin:import/recommended',
60
62
  'plugin:import/typescript',
61
63
  'eslint:recommended',
@@ -65,6 +67,7 @@ module.exports = {
65
67
  'plugin:prettier/recommended',
66
68
  ],
67
69
  plugins: [
70
+ 'unicorn',
68
71
  'jest',
69
72
  'import',
70
73
  'typescript-sort-keys',
@@ -288,6 +291,43 @@ module.exports = {
288
291
  markers: ['/'],
289
292
  },
290
293
  ],
294
+ 'unicorn/better-regex': 'off',
295
+ 'unicorn/expiring-todo-comments': 'off',
296
+ 'unicorn/filename-case': [
297
+ 'warn',
298
+ {
299
+ cases: {
300
+ camelCase: true,
301
+ pascalCase: true,
302
+ },
303
+ },
304
+ ],
305
+ 'unicorn/import-style': 'warn',
306
+ 'unicorn/no-array-reduce': 'off',
307
+ 'unicorn/no-console-spaces': 'off',
308
+ 'unicorn/no-document-cookie': 'warn',
309
+ 'unicorn/no-empty-file': 'off',
310
+ 'unicorn/no-hex-escape': 'warn',
311
+ 'unicorn/no-invalid-remove-event-listener': 'warn',
312
+ 'unicorn/no-nested-ternary': 'off',
313
+ 'unicorn/no-object-as-default-parameter': 'warn',
314
+ 'unicorn/no-unreadable-array-destructuring': 'off',
315
+ 'unicorn/no-unsafe-regex': 'off',
316
+ 'unicorn/no-unused-properties': 'warn',
317
+ 'unicorn/no-zero-fractions': 'off',
318
+ 'unicorn/prefer-export-from': 'off',
319
+ 'unicorn/prefer-includes': 'off',
320
+ 'unicorn/prefer-module': 'warn',
321
+ 'unicorn/prefer-optional-catch-binding': 'off',
322
+ 'unicorn/prefer-prototype-methods': 'off',
323
+ 'unicorn/prefer-query-selector': 'off',
324
+ 'unicorn/prefer-regexp-test': 'off',
325
+ 'unicorn/prefer-set-has': 'off',
326
+ 'unicorn/prefer-set-size': 'off',
327
+ 'unicorn/prefer-string-replace-all': 'off',
328
+ 'unicorn/relative-url-style': 'off',
329
+ 'unicorn/switch-case-braces': 'off',
330
+ 'unicorn/template-indent': 'off',
291
331
  'use-isnan': 'error',
292
332
  },
293
333
  parser: '@typescript-eslint/parser',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allthings/eslint-config",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "ESlint shareable config for Allthings style",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -15,22 +15,23 @@
15
15
  "postdeploy": "git push --tags origin HEAD"
16
16
  },
17
17
  "dependencies": {
18
- "@rushstack/eslint-patch": "^1.3.3",
19
- "@typescript-eslint/eslint-plugin": "^6.6.0",
20
- "@typescript-eslint/parser": "^6.6.0",
18
+ "@rushstack/eslint-patch": "^1.4.0",
19
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
20
+ "@typescript-eslint/parser": "^6.7.2",
21
21
  "eslint-config-prettier": "^9.0.0",
22
22
  "eslint-import-resolver-node": "^0.3.9",
23
23
  "eslint-import-resolver-typescript": "^3.6.0",
24
24
  "eslint-plugin-import": "^2.28.1",
25
25
  "eslint-plugin-jest": "^27.4.0",
26
26
  "eslint-plugin-jsx-a11y": "^6.7.1",
27
- "eslint-plugin-n": "^16.0.2",
27
+ "eslint-plugin-n": "^16.1.0",
28
28
  "eslint-plugin-prefer-arrow": "^1.2.3",
29
29
  "eslint-plugin-prettier": "^5.0.0",
30
30
  "eslint-plugin-react": "^7.33.2",
31
31
  "eslint-plugin-react-hooks": "^4.6.0",
32
32
  "eslint-plugin-simple-import-sort": "^10.0.0",
33
- "eslint-plugin-typescript-sort-keys": "^2.3.0"
33
+ "eslint-plugin-typescript-sort-keys": "^3.0.0",
34
+ "eslint-plugin-unicorn": "^48.0.1"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "eslint": ">=8.22.0",