Skip to content

Commit

Permalink
chore(lint): centralize node linting rules (#2528)
Browse files Browse the repository at this point in the history
Fixes #2522
  • Loading branch information
wesbillman authored Aug 28, 2024
1 parent 0106f6c commit 2c38960
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 70 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
engine-strict=true
shamefully-hoist=true
41 changes: 41 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true,
"ignore": ["node_modules", "dist", "protos"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"useKeyWithClickEvents": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noArrayIndexKey": "off"
}
}
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 160
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"indentStyle": "space",
"quoteStyle": "single",
"jsxQuoteStyle": "single"
}
},
"json": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
}
36 changes: 1 addition & 35 deletions extensions/vscode/biome.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,11 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true,
"ignore": ["./node_modules", "./dist"]
},
"extends": ["../../biome.json"],
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"useKeyWithClickEvents": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noArrayIndexKey": "off"
}
},
"include": ["src/**/*.ts"],
"ignore": ["./node_modules", "./dist"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 160,
"include": ["src/**/*.ts"],
"ignore": ["./node_modules", "./dist"]
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"indentStyle": "space",
"quoteStyle": "single",
"jsxQuoteStyle": "single"
}
},
"json": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
}
36 changes: 1 addition & 35 deletions frontend/biome.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,11 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true,
"ignore": ["./node_modules", "./dist", "./src/protos"]
},
"extends": ["../biome.json"],
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"useKeyWithClickEvents": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noArrayIndexKey": "off"
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx", "src/**/*.cjs", "src/**/*.mjs", "tests/**/*.ts"],
"ignore": ["./node_modules", "./dist", "./src/protos"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 160,
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx", "src/**/*.cjs", "src/**/*.mjs", "tests/**/*.ts"],
"ignore": ["./node_modules", "./dist", "./src/protos"]
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"indentStyle": "space",
"quoteStyle": "single",
"jsxQuoteStyle": "single"
}
},
"json": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
}

0 comments on commit 2c38960

Please sign in to comment.