Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint): confict rules #2324

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading