-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: configure biome linter (#616)
* chore(lint): move to biome instead of eslint (#538) * chore(lint): apply biome safe fixes * chore: add .git-blame-ignore-revs with bulk formatting/linting changes - Added .git-blame-ignore-revs file to exclude commit b36196d from `git blame` to improve readability by ignoring non-functional bulk edits made by Biome formatter and linter. * chore(lint): disable a11y rules in biome config * chore(vscode): add biome extension to recommended * chore(vscode): configure biome as default formatter * chore(lint): update lint script to include format and import sort checks * chore: remove .editorconfig in favor of Biome configuration
- Loading branch information
1 parent
6e53019
commit 04379e2
Showing
35 changed files
with
307 additions
and
2,102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b36196d4ff17934ed71b0926effa20a5a6c1433d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
name: Lint codebase | ||
description: Run eslint to lint codebase and ensure code quality | ||
description: Run biome to lint codebase and ensure code quality | ||
|
||
runs: | ||
using: 'composite' | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
run: pnpm install | ||
shell: bash | ||
|
||
- name: Run eslint | ||
run: pnpm lint | ||
- name: Setup Biome CLI | ||
uses: biomejs/[email protected] | ||
|
||
- name: Run biome | ||
run: biome ci --reporter=github | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["biomejs.biome"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }, | ||
"files": { | ||
"ignoreUnknown": true | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"formatter": { "enabled": true, "indentStyle": "space" }, | ||
"css": { "formatter": { "quoteStyle": "single" } }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"a11y": { | ||
"all": false | ||
}, | ||
"suspicious": { | ||
"noExplicitAny": "info", | ||
"noGlobalIsNan": "warn", | ||
"noImplicitAnyLet": "warn", | ||
"noAssignInExpressions": "warn", | ||
"noConfusingVoidType": "warn", | ||
"useNamespaceKeyword": "warn" // safe fix | ||
}, | ||
"style": { | ||
"noUnusedTemplateLiteral": "warn", | ||
"noInferrableTypes": "warn", // safe fix | ||
"noUselessElse": "warn", | ||
"useNodejsImportProtocol": "warn", | ||
"useTemplate": "warn", | ||
"useNumberNamespace": "warn", // safe fix | ||
"noNonNullAssertion": "warn", | ||
"useImportType": "warn", | ||
"noParameterAssign": "warn", | ||
"useDefaultParameterLast": "warn", | ||
"noCommaOperator": "warn", | ||
"useConst": "warn", | ||
"useSingleVarDeclarator": "warn", | ||
"noVar": "warn", | ||
"useShorthandFunctionType": "warn" // safe fix | ||
}, | ||
"correctness": { | ||
"noSwitchDeclarations": "warn", | ||
"noUnnecessaryContinue": "warn", | ||
"noInnerDeclarations": "warn" | ||
}, | ||
"complexity": { | ||
"useLiteralKeys": "warn", | ||
"noForEach": "off", | ||
"noUselessSwitchCase": "warn", | ||
"noUselessConstructor": "warn", | ||
"noBannedTypes": "warn", | ||
"noUselessTernary": "warn", | ||
"useArrowFunction": "warn", // safe fix | ||
"noExtraBooleanCast": "warn", | ||
"useOptionalChain": "warn" | ||
}, | ||
"performance": { | ||
"noDelete": "warn", | ||
"noAccumulatingSpread": "warn" | ||
} | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["packages/tests-unit/**", "packages/tests-e2e/**"], | ||
"linter": { | ||
"rules": { | ||
"suspicious": { | ||
"noRedeclare": "warn" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"include": ["examples/**/*"], | ||
"linter": { | ||
"rules": { | ||
"style": { | ||
"useSelfClosingElements": "warn" | ||
}, | ||
"correctness": { | ||
"useJsxKeyInIterable": "warn", | ||
"useExhaustiveDependencies": "warn" | ||
}, | ||
"suspicious": { | ||
"noArrayIndexKey": "warn", | ||
"noRedeclare": "warn" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
{ | ||
"songs": [ | ||
{ | ||
"rank": 1, | ||
"title": "I'm never gonna give you up", | ||
"artist": "Rick Astley", | ||
"album": "Hold Me In Your Arms", | ||
"year": "1965", | ||
"videoId": "dQw4w9WgXcQ" | ||
}, | ||
{ | ||
"rank": 2, | ||
"title": "My Wang", | ||
"artist": "Frank Wangnatra", | ||
"album": "@franjiewang", | ||
"year": "2023", | ||
"videoId": "qQzdAsjWGPg" | ||
}, | ||
{ | ||
"rank": 3, | ||
"title": "Excuse me miSST", | ||
"artist": "Jay-Air", | ||
"album": "@Jayair", | ||
"year": "2023", | ||
"videoId": "tnDh0JhmaFw" | ||
}, | ||
{ | ||
"rank": 4, | ||
"title": "I don't want another CONSOLE-RRY", | ||
"artist": "Dax", | ||
"album": "@thxdr", | ||
"year": "2023", | ||
"videoId": "4JI70_9acgE" | ||
} | ||
{ | ||
"rank": 1, | ||
"title": "I'm never gonna give you up", | ||
"artist": "Rick Astley", | ||
"album": "Hold Me In Your Arms", | ||
"year": "1965", | ||
"videoId": "dQw4w9WgXcQ" | ||
}, | ||
{ | ||
"rank": 2, | ||
"title": "My Wang", | ||
"artist": "Frank Wangnatra", | ||
"album": "@franjiewang", | ||
"year": "2023", | ||
"videoId": "qQzdAsjWGPg" | ||
}, | ||
{ | ||
"rank": 3, | ||
"title": "Excuse me miSST", | ||
"artist": "Jay-Air", | ||
"album": "@Jayair", | ||
"year": "2023", | ||
"videoId": "tnDh0JhmaFw" | ||
}, | ||
{ | ||
"rank": 4, | ||
"title": "I don't want another CONSOLE-RRY", | ||
"artist": "Dax", | ||
"album": "@thxdr", | ||
"year": "2023", | ||
"videoId": "4JI70_9acgE" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
"@types/react": "npm:[email protected]", | ||
"@types/react-dom": "npm:[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.