@will-stone/eslint-config 6.3.0 → 6.6.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/javascript.js CHANGED
@@ -6,7 +6,7 @@ const unicornRules = require('./rules/unicorn')
6
6
  module.exports = {
7
7
  parserOptions: {
8
8
  sourceType: 'module',
9
- ecmaVersion: 2020,
9
+ ecmaVersion: 'latest',
10
10
  },
11
11
 
12
12
  env: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "6.3.0",
3
+ "version": "6.6.0",
4
4
  "private": false,
5
5
  "description": "My ESLint config",
6
6
  "repository": {
@@ -20,11 +20,11 @@
20
20
  "eslint-find-rules": "^4.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@typescript-eslint/eslint-plugin": "^5.8.0",
24
- "@typescript-eslint/parser": "^5.8.0",
25
- "eslint": "^8.5.0",
23
+ "@typescript-eslint/eslint-plugin": "^5.8.1",
24
+ "@typescript-eslint/parser": "^5.8.1",
25
+ "eslint": "^8.6.0",
26
26
  "eslint-plugin-import": "^2.25.3",
27
- "eslint-plugin-jest": "^25.3.0",
27
+ "eslint-plugin-jest": "^25.3.3",
28
28
  "eslint-plugin-jsx-a11y": "^6.5.1",
29
29
  "eslint-plugin-node": "^11.1.0",
30
30
  "eslint-plugin-prettier": "^4.0.0",
@@ -32,7 +32,7 @@
32
32
  "eslint-plugin-react-hooks": "^4.3.0",
33
33
  "eslint-plugin-simple-import-sort": "^7.0.0",
34
34
  "eslint-plugin-switch-case": "^1.1.2",
35
- "eslint-plugin-unicorn": "^39.0.0",
35
+ "eslint-plugin-unicorn": "^40.0.0",
36
36
  "typescript": "4.x"
37
37
  },
38
38
  "peerDependenciesMeta": {
@@ -263,6 +263,7 @@ module.exports = {
263
263
  '@typescript-eslint/padding-line-between-statements': [
264
264
  'warn',
265
265
  { blankLine: 'always', prev: 'multiline-block-like', next: '*' },
266
+ { blankLine: 'always', prev: '*', next: 'multiline-block-like' },
266
267
  ],
267
268
 
268
269
  '@typescript-eslint/prefer-enum-initializers': 'error',
package/rules/unicorn.js CHANGED
@@ -125,6 +125,9 @@ module.exports = {
125
125
  // A class with only static members could just be an object instead
126
126
  'unicorn/no-static-only-class': 'error',
127
127
 
128
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
129
+ 'unicorn/no-thenable': 'error',
130
+
128
131
  // Disallow assigning this to a variable
129
132
  'unicorn/no-this-assignment': 'error',
130
133
 
@@ -135,6 +138,9 @@ module.exports = {
135
138
  // Disallow useless array length check
136
139
  'unicorn/no-useless-length-check': 'warn',
137
140
 
141
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
142
+ 'unicorn/no-useless-promise-resolve-reject': 'warn',
143
+
138
144
  // Disallow useless spread
139
145
  'unicorn/no-useless-spread': 'warn',
140
146
 
@@ -208,6 +214,9 @@ module.exports = {
208
214
  // Prefer .includes() over .indexOf() when checking for existence or non-existence
209
215
  'unicorn/prefer-includes': 'warn',
210
216
 
217
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
218
+ 'unicorn/prefer-json-parse-buffer': 'warn',
219
+
211
220
  // Prefer KeyboardEvent#key over KeyboardEvent#keyCode
212
221
  'unicorn/prefer-keyboard-event-key': 'warn',
213
222
 
@@ -297,6 +306,7 @@ module.exports = {
297
306
  },
298
307
  allowList: {
299
308
  'next-env.d': true,
309
+ 'react-app-env.d': true,
300
310
  },
301
311
  },
302
312
  ],
@@ -304,6 +314,9 @@ module.exports = {
304
314
  // Enforce the use of regex shorthands to improve readability
305
315
  'unicorn/regex-shorthand': 'warn',
306
316
 
317
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
318
+ 'unicorn/relative-url-style': 'warn',
319
+
307
320
  // Enforce using the separator argument with Array#join()
308
321
  'unicorn/require-array-join-separator': 'warn',
309
322