@scaleway/eslint-config-react 5.1.0 → 5.2.1

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": "@scaleway/eslint-config-react",
3
- "version": "5.1.0",
3
+ "version": "5.2.1",
4
4
  "description": "Scaleway React eslint shared config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,17 +38,16 @@
38
38
  "@eslint/compat": "1.2.4",
39
39
  "@eslint/eslintrc": "3.2.0",
40
40
  "@stylistic/eslint-plugin": "2.11.0",
41
- "@typescript-eslint/eslint-plugin": "8.17.0",
42
- "@typescript-eslint/parser": "8.17.0",
41
+ "@typescript-eslint/eslint-plugin": "8.18.0",
42
+ "@typescript-eslint/parser": "8.18.0",
43
43
  "eslint-config-airbnb": "19.0.4",
44
44
  "eslint-config-prettier": "9.1.0",
45
45
  "eslint-import-resolver-typescript": "3.7.0",
46
- "eslint-plugin-deprecation": "3.0.0",
47
46
  "eslint-plugin-eslint-comments": "3.2.0",
48
47
  "eslint-plugin-import": "2.31.0",
49
48
  "eslint-plugin-jsx-a11y": "6.10.2",
50
49
  "eslint-plugin-react": "7.37.2",
51
- "eslint-plugin-react-hooks": "5.0.0"
50
+ "eslint-plugin-react-hooks": "5.1.0"
52
51
  },
53
52
  "peerDependencies": {
54
53
  "eslint": ">= 9.x"
package/shared.mjs CHANGED
@@ -37,11 +37,13 @@ export default [
37
37
  },
38
38
 
39
39
  groups: [
40
- ['builtin', 'external'],
40
+ 'builtin',
41
+ 'external',
41
42
  'internal',
42
43
  'parent',
43
44
  'sibling',
44
45
  'index',
46
+ // "type",
45
47
  ],
46
48
  'newlines-between': 'never',
47
49
  },
package/stylistic.mjs CHANGED
@@ -41,6 +41,14 @@ export default [
41
41
  '@stylistic/arrow-parens': 'off',
42
42
  '@stylistic/multiline-ternary': 'off',
43
43
  '@stylistic/no-trailing-spaces': 'off',
44
+ '@stylistic/comma-style': 'off',
45
+ '@stylistic/func-call-spacing': 'off',
46
+ '@stylistic/jsx-wrap-multilines': 'off',
47
+ '@stylistic/member-delimiter-style': 'off',
48
+ '@stylistic/jsx-curly-brace-presence': 'off',
49
+ '@stylistic/jsx-curly-newline': 'off',
50
+ '@stylistic/jsx-one-expression-per-line': 'off',
51
+ '@stylistic/max-statements-per-line ': 'off',
44
52
  // -------------------------------------- ///
45
53
 
46
54
  '@stylistic/brace-style': defaultAirBnbRules['brace-style'],
package/typescript.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { fixupConfigRules } from '@eslint/compat'
2
2
  import { FlatCompat } from '@eslint/eslintrc'
3
- import deprecation from 'eslint-plugin-deprecation'
4
3
  import path from 'node:path'
5
4
  import { fileURLToPath } from 'node:url'
6
5
  import shared from './shared.mjs'
@@ -19,24 +18,27 @@ export default [
19
18
  'airbnb-base',
20
19
  'plugin:@typescript-eslint/recommended',
21
20
  'plugin:@typescript-eslint/recommended-requiring-type-checking',
21
+ 'plugin:import/recommended',
22
22
  'plugin:import/typescript',
23
23
  ),
24
24
  ),
25
25
  ...airbnbTypescript,
26
26
  ...shared,
27
27
  {
28
- plugins: {
29
- deprecation,
30
- },
31
-
32
28
  rules: {
29
+ /******* WARN ********/
30
+ '@typescript-eslint/no-deprecated': 'warn',
31
+ '@typescript-eslint/no-explicit-any': 'warn',
32
+ '@typescript-eslint/no-redundant-type-constituents': 'warn',
33
+ /***************************/
34
+
35
+ /******* ERROR ********/
33
36
  '@typescript-eslint/array-type': [
34
37
  'error',
35
38
  {
36
39
  default: 'array',
37
40
  },
38
41
  ],
39
-
40
42
  '@typescript-eslint/no-base-to-string': 'error',
41
43
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
42
44
  '@typescript-eslint/no-unnecessary-condition': 'error',
@@ -57,15 +59,10 @@ export default [
57
59
  },
58
60
  },
59
61
  ],
60
-
61
- '@typescript-eslint/no-explicit-any': 'warn',
62
62
  '@typescript-eslint/no-unused-vars': 'error',
63
63
  '@typescript-eslint/consistent-type-imports': 'error',
64
64
  '@typescript-eslint/consistent-type-exports': 'error',
65
65
  '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
66
- '@typescript-eslint/no-redundant-type-constituents': 'warn',
67
- 'react/require-default-props': 'off',
68
- 'react/prop-types': 'off',
69
66
 
70
67
  'react/jsx-no-useless-fragment': [
71
68
  'error',
@@ -74,6 +71,13 @@ export default [
74
71
  },
75
72
  ],
76
73
 
74
+ /***************************/
75
+
76
+ /******* OFF ********/
77
+
78
+ 'react/require-default-props': 'off',
79
+ 'react/prop-types': 'off',
80
+
77
81
  // The following rules are enabled in Airbnb config, but are already checked (more thoroughly) by the TypeScript compiler
78
82
  // Some of the rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586
79
83
  // Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts