Skip to content

Commit

Permalink
fix(eslint): confict rules
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Philibeaux <aphilibeaux@scaleway.com>
  • Loading branch information
philibea committed Dec 5, 2024
1 parent a1b85f1 commit 9763093
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 236 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-pears-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scaleway/eslint-config-react": minor
---

fix conflict rules apply by formatter like prettier / biome
1 change: 1 addition & 0 deletions .github/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix=""
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@babel/eslint-parser": "7.25.9",
"@babel/plugin-transform-runtime": "7.25.9",
"@babel/preset-env": "7.26.0",
"@babel/preset-react": "7.25.9",
"@babel/preset-react": "7.26.3",
"@babel/preset-typescript": "7.26.0",
"@biomejs/biome": "1.9.4",
"@changesets/changelog-github": "0.5.0",
Expand All @@ -27,7 +27,7 @@
"@testing-library/react": "16.0.1",
"@types/jest": "29.5.14",
"@types/node": "22.10.1",
"@types/react": "18.3.12",
"@types/react": "18.3.13",
"@types/react-dom": "18.3.1",
"@vitejs/plugin-react": "4.3.4",
"@vitest/coverage-istanbul": "2.1.6",
Expand Down
11 changes: 6 additions & 5 deletions packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@
"license": "MIT",
"dependencies": {
"@emotion/eslint-plugin": "11.12.0",
"@eslint/compat": "1.2.3",
"@eslint/compat": "1.2.4",
"@eslint/eslintrc": "3.2.0",
"@stylistic/eslint-plugin": "2.11.0",
"@typescript-eslint/eslint-plugin": "8.16.0",
"@typescript-eslint/parser": "8.16.0",
"@typescript-eslint/eslint-plugin": "8.17.0",
"@typescript-eslint/parser": "8.17.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.7.0",
"eslint-plugin-deprecation": "3.0.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.31.0",
Expand All @@ -50,10 +51,10 @@
"eslint-plugin-react-hooks": "5.0.0"
},
"peerDependencies": {
"eslint": ">= 9.13"
"eslint": ">= 9.x"
},
"devDependencies": {
"eslint": "9.13.0",
"eslint": "9.16.0",
"typescript": "5.7.2"
}
}
5 changes: 5 additions & 0 deletions packages/eslint-config-react/stylistic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const config = compat.extends('airbnb-base')

const defaultAirBnbRules = [...fixupPluginRules(config)].reduce(
(acc, currentConfig) => ({
// biome-ignore lint/performance/noAccumulatingSpread: <explanation>
...acc,
...currentConfig.rules,
}),
Expand All @@ -31,12 +32,16 @@ export default [
stylisticPlugin.configs['recommended-flat'],
{
rules: {
// --- Should be done when using biome/prettier formatter --- //
'@stylistic/quotes': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/indent': 'off',
'@stylistic/quote-props': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/arrow-parens': 'off',
'@stylistic/multiline-ternary': 'off',
'@stylistic/no-trailing-spaces': 'off',
// -------------------------------------- ///

'@stylistic/brace-style': defaultAirBnbRules['brace-style'],
'@stylistic/comma-dangle': [
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-react/typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
),
),
...airbnbTypescript,
Expand Down
Loading

0 comments on commit 9763093

Please sign in to comment.