@will-stone/eslint-config 5.1.0 → 6.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "5.1.0",
3
+ "version": "6.2.0",
4
4
  "private": false,
5
5
  "description": "My ESLint config",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "author": "Will Stone",
11
11
  "scripts": {
12
- "eslint-find-unused-rules": "eslint-find-rules --unused ./_for_rule_checking.js > ./unused-rules.txt",
12
+ "eslint-find-unused-rules": "npx eslint-find-rules --unused ./_for_rule_checking.js > ./unused-rules.txt",
13
13
  "eslint-print-rules": "eslint --no-eslintrc -c ./_for_rule_checking.js --print-config ./_for_rule_checking.js > rules.json"
14
14
  },
15
15
  "dependencies": {
@@ -17,22 +17,22 @@
17
17
  "eslint-config-prettier": "^8.3.0"
18
18
  },
19
19
  "devDependencies": {
20
- "eslint-find-rules": "^3.6.1"
20
+ "eslint-find-rules": "^4.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@typescript-eslint/eslint-plugin": "^5.3.0",
24
- "@typescript-eslint/parser": "^5.3.0",
25
- "eslint": "^7.32.0",
26
- "eslint-plugin-import": "^2.25.2",
27
- "eslint-plugin-jest": "^25.2.2",
28
- "eslint-plugin-jsx-a11y": "^6.4.1",
23
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
24
+ "@typescript-eslint/parser": "^5.4.0",
25
+ "eslint": "^8.3.0",
26
+ "eslint-plugin-import": "^2.25.3",
27
+ "eslint-plugin-jest": "^25.2.4",
28
+ "eslint-plugin-jsx-a11y": "^6.5.1",
29
29
  "eslint-plugin-node": "^11.1.0",
30
30
  "eslint-plugin-prettier": "^4.0.0",
31
- "eslint-plugin-react": "^7.26.1",
32
- "eslint-plugin-react-hooks": "^4.2.0",
31
+ "eslint-plugin-react": "^7.27.1",
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": "^38.0.0",
35
+ "eslint-plugin-unicorn": "^39.0.0",
36
36
  "typescript": "4.x"
37
37
  },
38
38
  "peerDependenciesMeta": {
package/rules/built-in.js CHANGED
@@ -584,6 +584,8 @@ module.exports = {
584
584
  // likely an error due to incomplete refactoring.
585
585
  'no-unused-labels': 'warn',
586
586
 
587
+ 'no-unused-private-class-members': 'error',
588
+
587
589
  // Variables must be used unless name starts with "ignored"
588
590
  'no-unused-vars': ['error', { varsIgnorePattern: '[iI]gnored' }],
589
591
 
package/rules/react.js CHANGED
@@ -49,12 +49,8 @@ module.exports = {
49
49
  'react/react-in-jsx-scope': 'off',
50
50
 
51
51
  // Enforce a defaultProps definition for every prop that is not a required prop
52
- 'react/require-default-props': [
53
- 'error',
54
- {
55
- ignoreFunctionalComponents: true,
56
- },
57
- ],
52
+ // TODO turn this back on and create a react-typescript rule set for disabling thing like this.
53
+ 'react/require-default-props': 'off',
58
54
 
59
55
  // Do not enforce React components to have a shouldComponentUpdate method.
60
56
  'react/require-optimization': 'off',
@@ -77,6 +77,7 @@ module.exports = {
77
77
  * These are for type checking which I don't use eslint for
78
78
  */
79
79
  '@typescript-eslint/await-thenable': 'off',
80
+ '@typescript-eslint/consistent-type-exports': 'off',
80
81
  '@typescript-eslint/dot-notation': 'off',
81
82
  '@typescript-eslint/naming-convention': 'off',
82
83
  '@typescript-eslint/no-base-to-string': 'off',
package/rules/unicorn.js CHANGED
@@ -67,6 +67,9 @@ module.exports = {
67
67
  // for..of is much easier to read
68
68
  'unicorn/no-array-reduce': 'error',
69
69
 
70
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
71
+ 'unicorn/no-await-expression-member': 'warn',
72
+
70
73
  // Do not use leading/trailing space between console.log parameters
71
74
  'unicorn/no-console-spaces': 'warn',
72
75
 
@@ -177,6 +180,10 @@ module.exports = {
177
180
  // Prefer .at() method for index access and String#charAt()
178
181
  'unicorn/prefer-at': 'warn',
179
182
 
183
+ // Prefer String#codePointAt(…) over String#charCodeAt(…)
184
+ // and String.fromCodePoint(…) over String.fromCharCode(…)
185
+ 'unicorn/prefer-code-point': 'error',
186
+
180
187
  // Prefer Date.now() to get the number of milliseconds since the Unix Epoch
181
188
  'unicorn/prefer-date-now': 'warn',
182
189
 
@@ -285,6 +292,8 @@ module.exports = {
285
292
  {
286
293
  replacements: {
287
294
  props: false,
295
+ ref: false,
296
+ refs: false,
288
297
  },
289
298
  allowList: {
290
299
  'next-env.d': true,