-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scaffolding): replaced eslint with biome, set up pre-commit hooks
- Loading branch information
Showing
12 changed files
with
489 additions
and
1,593 deletions.
There are no files selected for viewing
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
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 @@ | ||
pnpm lint-staged |
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
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,109 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
// Note: UNIX-like glob patterns {a,b,c} aren't supported yet. | ||
"files": { | ||
"ignore": ["./**/node_modules/**", "./public/**", "./build/**"], | ||
"include": ["./app/**/", "./*.ts", "./*.js", "./*.json", "./*.jsonc"] | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"formatter": { | ||
"enabled": true, | ||
"indentWidth": 2, | ||
"indentStyle": "space", | ||
"lineWidth": 120 | ||
}, | ||
"javascript": { | ||
"globals": [ | ||
"React", | ||
|
||
// We need to manually list every test global variable. | ||
// See: https://github.com/biomejs/biome/discussions/283. | ||
"describe", | ||
"test", | ||
"testIf", | ||
"it", | ||
"expect" | ||
], | ||
"linter": { | ||
"enabled": true | ||
}, | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"semicolons": "asNeeded" | ||
} | ||
}, | ||
"css": { | ||
"linter": { | ||
"enabled": true | ||
} | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"complexity": { | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noWith": "error" | ||
}, | ||
"nursery": { | ||
"useSortedClasses": "error" | ||
}, | ||
"style": { | ||
"noParameterAssign": "off", | ||
"noNonNullAssertion": "off" | ||
}, | ||
"correctness": { | ||
"noConstAssign": "error", | ||
"noConstantCondition": "error", | ||
"noEmptyCharacterClassInRegex": "error", | ||
"noEmptyPattern": "error", | ||
"noGlobalObjectCalls": "error", | ||
"noInnerDeclarations": "error", | ||
"noInvalidConstructorSuper": "error", | ||
"noNewSymbol": "error", | ||
"noNonoctalDecimalEscape": "error", | ||
"noPrecisionLoss": "error", | ||
"noSelfAssign": "error", | ||
"noSetterReturn": "error", | ||
"noSwitchDeclarations": "error", | ||
"noUndeclaredVariables": "error", | ||
"noUnreachable": "error", | ||
"noUnreachableSuper": "error", | ||
"noUnsafeFinally": "error", | ||
"noUnsafeOptionalChaining": "error", | ||
"noUnusedLabels": "error", | ||
"noUnusedVariables": "error", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"suspicious": { | ||
"noApproximativeNumericConstant": "off", | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCompareNegZero": "error", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "error", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noUnsafeNegation": "error", | ||
"useGetterReturn": "error", | ||
"useValidTypeof": "error" | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,34 +6,34 @@ | |
}, | ||
"scripts": { | ||
"build": "turbo run build", | ||
"clean": "turbo run clean", | ||
"watch": "turbo run watch", | ||
"prettier-check": "turbo run prettier-check", | ||
"prettier-write": "turbo run prettier-write", | ||
"typecheck": "turbo run typecheck", | ||
"eslint-check": "turbo run eslint-check", | ||
"prepare": "cd .. && husky install", | ||
"lint-staged": "turbo run lint-staged --concurrency=1", | ||
"lint:ci": "turbo run lint:ci", | ||
"lint": "turbo run lint", | ||
"test": "turbo run test", | ||
"test:unit": "turbo run test:unit", | ||
"test:integration": "turbo run test:integration", | ||
"test:ci": "turbo run test:ci" | ||
"test:ci": "turbo run test:ci", | ||
"prepare": "husky" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.9.0", | ||
"@types/jest": "^29.1.2", | ||
"@types/node": "20.9.0", | ||
"@typescript-eslint/eslint-plugin": "^5.21.0", | ||
"@typescript-eslint/parser": "^5.21.0", | ||
"eslint": "^8.25.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jest": "^26.1.5", | ||
"husky": "^7.0.4", | ||
"husky": "^9.1.6", | ||
"jest": "^29.2.0", | ||
"prettier": "^2.7.1", | ||
"lint-staged": "^15.2.10", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "29.0.3", | ||
"turbo": "^2.1.2", | ||
"typescript": "^4.8.4" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"pre-commit": "lint-staged", | ||
"lint-staged": { | ||
"*.{js,ts,cjs,mjs,md,json,jsonc}": "biome ci" | ||
} | ||
} |
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
Oops, something went wrong.