forked from opennextjs/opennextjs-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): move to biome instead of eslint (opennextjs#538)
- Loading branch information
1 parent
44f3678
commit 4da249a
Showing
9 changed files
with
222 additions
and
1,989 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
tab_width = 2 | ||
insert_final_newline = true | ||
end_of_line = lf |
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 |
---|---|---|
@@ -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,96 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }, | ||
"files": { | ||
"ignoreUnknown": true | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"formatter": { "enabled": true, "useEditorconfig": true }, | ||
"css": { "formatter": { "quoteStyle": "single" } }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"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" | ||
}, | ||
"a11y": { | ||
"useIframeTitle": "warn", | ||
"useButtonType": "warn", | ||
"useAltText": "warn", | ||
"useKeyWithClickEvents": "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
Oops, something went wrong.