Skip to content

Commit 6625aca

Browse files
authored
fix(eslint): confict rules (#2324)
Signed-off-by: Alexandre Philibeaux <[email protected]>
1 parent a1b85f1 commit 6625aca

File tree

7 files changed

+273
-236
lines changed

7 files changed

+273
-236
lines changed

.changeset/strange-pears-tell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@scaleway/eslint-config-react": minor
3+
---
4+
5+
fix conflict rules apply by formatter like prettier / biome

.github/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-prefix=""

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@babel/eslint-parser": "7.25.9",
1414
"@babel/plugin-transform-runtime": "7.25.9",
1515
"@babel/preset-env": "7.26.0",
16-
"@babel/preset-react": "7.25.9",
16+
"@babel/preset-react": "7.26.3",
1717
"@babel/preset-typescript": "7.26.0",
1818
"@biomejs/biome": "1.9.4",
1919
"@changesets/changelog-github": "0.5.0",
@@ -27,7 +27,7 @@
2727
"@testing-library/react": "16.0.1",
2828
"@types/jest": "29.5.14",
2929
"@types/node": "22.10.1",
30-
"@types/react": "18.3.12",
30+
"@types/react": "18.3.13",
3131
"@types/react-dom": "18.3.1",
3232
"@vitejs/plugin-react": "4.3.4",
3333
"@vitest/coverage-istanbul": "2.1.6",

packages/eslint-config-react/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@
3535
"license": "MIT",
3636
"dependencies": {
3737
"@emotion/eslint-plugin": "11.12.0",
38-
"@eslint/compat": "1.2.3",
38+
"@eslint/compat": "1.2.4",
3939
"@eslint/eslintrc": "3.2.0",
4040
"@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",
4343
"eslint-config-airbnb": "19.0.4",
4444
"eslint-config-prettier": "9.1.0",
45+
"eslint-import-resolver-typescript": "3.7.0",
4546
"eslint-plugin-deprecation": "3.0.0",
4647
"eslint-plugin-eslint-comments": "3.2.0",
4748
"eslint-plugin-import": "2.31.0",
@@ -50,10 +51,10 @@
5051
"eslint-plugin-react-hooks": "5.0.0"
5152
},
5253
"peerDependencies": {
53-
"eslint": ">= 9.13"
54+
"eslint": ">= 9.x"
5455
},
5556
"devDependencies": {
56-
"eslint": "9.13.0",
57+
"eslint": "9.16.0",
5758
"typescript": "5.7.2"
5859
}
5960
}

packages/eslint-config-react/stylistic.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const config = compat.extends('airbnb-base')
1515

1616
const defaultAirBnbRules = [...fixupPluginRules(config)].reduce(
1717
(acc, currentConfig) => ({
18+
// biome-ignore lint/performance/noAccumulatingSpread: <explanation>
1819
...acc,
1920
...currentConfig.rules,
2021
}),
@@ -31,12 +32,16 @@ export default [
3132
stylisticPlugin.configs['recommended-flat'],
3233
{
3334
rules: {
35+
// --- Should be done when using biome/prettier formatter --- //
3436
'@stylistic/quotes': 'off',
3537
'@stylistic/operator-linebreak': 'off',
3638
'@stylistic/indent': 'off',
3739
'@stylistic/quote-props': 'off',
3840
'@stylistic/indent-binary-ops': 'off',
3941
'@stylistic/arrow-parens': 'off',
42+
'@stylistic/multiline-ternary': 'off',
43+
'@stylistic/no-trailing-spaces': 'off',
44+
// -------------------------------------- ///
4045

4146
'@stylistic/brace-style': defaultAirBnbRules['brace-style'],
4247
'@stylistic/comma-dangle': [

packages/eslint-config-react/typescript.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default [
1919
'airbnb-base',
2020
'plugin:@typescript-eslint/recommended',
2121
'plugin:@typescript-eslint/recommended-requiring-type-checking',
22+
'plugin:import/typescript',
2223
),
2324
),
2425
...airbnbTypescript,

0 commit comments

Comments
 (0)