@scaleway/eslint-config-react 5.0.0 → 5.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": "@scaleway/eslint-config-react",
3
- "version": "5.0.0",
3
+ "version": "5.2.0",
4
4
  "description": "Scaleway React eslint shared config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -35,25 +35,25 @@
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
37
  "@emotion/eslint-plugin": "11.12.0",
38
- "@eslint/compat": "1.2.3",
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.16.0",
42
- "@typescript-eslint/parser": "8.16.0",
41
+ "@typescript-eslint/eslint-plugin": "8.17.0",
42
+ "@typescript-eslint/parser": "8.17.0",
43
43
  "eslint-config-airbnb": "19.0.4",
44
44
  "eslint-config-prettier": "9.1.0",
45
- "eslint-plugin-deprecation": "3.0.0",
45
+ "eslint-import-resolver-typescript": "3.7.0",
46
46
  "eslint-plugin-eslint-comments": "3.2.0",
47
47
  "eslint-plugin-import": "2.31.0",
48
48
  "eslint-plugin-jsx-a11y": "6.10.2",
49
49
  "eslint-plugin-react": "7.37.2",
50
- "eslint-plugin-react-hooks": "5.0.0"
50
+ "eslint-plugin-react-hooks": "5.1.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "eslint": ">= 9.13"
53
+ "eslint": ">= 9.x"
54
54
  },
55
55
  "devDependencies": {
56
- "eslint": "9.13.0",
56
+ "eslint": "9.16.0",
57
57
  "typescript": "5.7.2"
58
58
  }
59
59
  }
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
@@ -15,6 +15,7 @@ const config = compat.extends('airbnb-base')
15
15
 
16
16
  const defaultAirBnbRules = [...fixupPluginRules(config)].reduce(
17
17
  (acc, currentConfig) => ({
18
+ // biome-ignore lint/performance/noAccumulatingSpread: <explanation>
18
19
  ...acc,
19
20
  ...currentConfig.rules,
20
21
  }),
@@ -31,12 +32,24 @@ export default [
31
32
  stylisticPlugin.configs['recommended-flat'],
32
33
  {
33
34
  rules: {
35
+ // --- Should be done when using biome/prettier formatter --- //
34
36
  '@stylistic/quotes': 'off',
35
37
  '@stylistic/operator-linebreak': 'off',
36
38
  '@stylistic/indent': 'off',
37
39
  '@stylistic/quote-props': 'off',
38
40
  '@stylistic/indent-binary-ops': 'off',
39
41
  '@stylistic/arrow-parens': 'off',
42
+ '@stylistic/multiline-ternary': 'off',
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',
52
+ // -------------------------------------- ///
40
53
 
41
54
  '@stylistic/brace-style': defaultAirBnbRules['brace-style'],
42
55
  '@stylistic/comma-dangle': [
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,23 +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
+ 'plugin:import/typescript',
22
23
  ),
23
24
  ),
24
25
  ...airbnbTypescript,
25
26
  ...shared,
26
27
  {
27
- plugins: {
28
- deprecation,
29
- },
30
-
31
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 ********/
32
36
  '@typescript-eslint/array-type': [
33
37
  'error',
34
38
  {
35
39
  default: 'array',
36
40
  },
37
41
  ],
38
-
39
42
  '@typescript-eslint/no-base-to-string': 'error',
40
43
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
41
44
  '@typescript-eslint/no-unnecessary-condition': 'error',
@@ -56,15 +59,10 @@ export default [
56
59
  },
57
60
  },
58
61
  ],
59
-
60
- '@typescript-eslint/no-explicit-any': 'warn',
61
62
  '@typescript-eslint/no-unused-vars': 'error',
62
63
  '@typescript-eslint/consistent-type-imports': 'error',
63
64
  '@typescript-eslint/consistent-type-exports': 'error',
64
65
  '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
65
- '@typescript-eslint/no-redundant-type-constituents': 'warn',
66
- 'react/require-default-props': 'off',
67
- 'react/prop-types': 'off',
68
66
 
69
67
  'react/jsx-no-useless-fragment': [
70
68
  'error',
@@ -73,6 +71,13 @@ export default [
73
71
  },
74
72
  ],
75
73
 
74
+ /***************************/
75
+
76
+ /******* OFF ********/
77
+
78
+ 'react/require-default-props': 'off',
79
+ 'react/prop-types': 'off',
80
+
76
81
  // The following rules are enabled in Airbnb config, but are already checked (more thoroughly) by the TypeScript compiler
77
82
  // Some of the rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586
78
83
  // Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts