Skip to content

Commit

Permalink
ci: replace eslint and prettier with biome
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Jun 15, 2024
1 parent 75bc8d5 commit 16ccd2b
Show file tree
Hide file tree
Showing 15 changed files with 708 additions and 6,624 deletions.
86 changes: 0 additions & 86 deletions .eslintrc

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["stylelint-config-standard", "stylelint-prettier/recommended"]
"extends": ["stylelint-config-standard"]
}
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"recommendations": [
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"biomejs.biome",
"streetsidesoftware.code-spell-checker"
]
}
11 changes: 1 addition & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"yaml",
"github-actions-workflow" // for GitHub Actions workflow files
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ See [LICENSE](LICENSE) for more information.
## Acknowledgements

- [r/personalfinance](https://www.reddit.com/r/personalfinance/wiki/budgeting/)
- [Eslint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Biome](https://biomejs.dev/)
- [Stylelint](https://stylelint.io/)
- [semantic-release](https://semantic-release.gitbook.io/semantic-release/)
- [testing-library](https://github.com/testing-library)
Expand Down
202 changes: 202 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": {
"noAccessKey": "warn",
"noAriaUnsupportedElements": "warn",
"noBlankTarget": "warn",
"noDistractingElements": "warn",
"noHeaderScope": "warn",
"noRedundantAlt": "warn",
"noRedundantRoles": "warn",
"useAltText": "warn",
"useAnchorContent": "warn",
"useAriaActivedescendantWithTabindex": "warn",
"useAriaPropsForRole": "warn",
"useHeadingContent": "warn",
"useIframeTitle": "warn",
"useValidAnchor": "warn",
"useValidAriaProps": "warn",
"useValidAriaRole": {
"level": "warn",
"options": { "allowInvalidRoles": [], "ignoreNonDom": true }
},
"useValidAriaValues": "warn"
},
"complexity": {
"noMultipleSpacesInRegularExpressionLiterals": "warn",
"noUselessConstructor": "warn",
"noUselessLabel": "warn",
"noUselessLoneBlockStatements": "warn",
"noUselessRename": "warn",
"noWith": "warn"
},
"correctness": {
"noConstAssign": "warn",
"noEmptyCharacterClassInRegex": "warn",
"noEmptyPattern": "warn",
"noGlobalObjectCalls": "warn",
"noInvalidUseBeforeDeclaration": "warn",
"noNewSymbol": "warn",
"noSelfAssign": "warn",
"noUndeclaredVariables": "error",
"noUnreachable": "warn",
"noUnreachableSuper": "warn",
"noUnusedLabels": "warn",
"noUnusedVariables": "warn",
"useArrayLiterals": "warn",
"useExhaustiveDependencies": "warn",
"useHookAtTopLevel": "error",
"useIsNan": "warn",
"useYield": "warn"
},
"security": {
"noDangerouslySetInnerHtmlWithChildren": "warn",
"noGlobalEval": "warn"
},
"style": {
"noCommaOperator": "warn",
"noRestrictedGlobals": {
"level": "error",
"options": {
"deniedGlobals": [
"addEventListener",
"blur",
"close",
"closed",
"confirm",
"defaultStatus",
"defaultstatus",
"event",
"external",
"find",
"focus",
"frameElement",
"frames",
"history",
"innerHeight",
"innerWidth",
"length",
"location",
"locationbar",
"menubar",
"moveBy",
"moveTo",
"name",
"onblur",
"onerror",
"onfocus",
"onload",
"onresize",
"onunload",
"open",
"opener",
"opera",
"outerHeight",
"outerWidth",
"pageXOffset",
"pageYOffset",
"parent",
"print",
"removeEventListener",
"resizeBy",
"resizeTo",
"screen",
"screenLeft",
"screenTop",
"screenX",
"screenY",
"scroll",
"scrollbars",
"scrollBy",
"scrollTo",
"scrollX",
"scrollY",
"self",
"status",
"statusbar",
"stop",
"toolbar",
"top"
]
}
}
},
"suspicious": {
"noAssignInExpressions": "warn",
"noCatchAssign": "warn",
"noCommentText": "warn",
"noConfusingLabels": "warn",
"noControlCharactersInRegex": "warn",
"noDoubleEquals": "warn",
"noDuplicateCase": "warn",
"noDuplicateClassMembers": "warn",
"noDuplicateJsxProps": "warn",
"noDuplicateObjectKeys": "warn",
"noDuplicateParameters": "warn",
"noFallthroughSwitchClause": "warn",
"noFunctionAssign": "warn",
"noGlobalAssign": "warn",
"noLabelVar": "warn",
"noRedeclare": "warn",
"noSelfCompare": "warn",
"noShadowRestrictedNames": "warn",
"noUnsafeNegation": "warn",
"useGetterReturn": "warn",
"useValidTypeof": "warn"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "double",
"attributePosition": "auto"
}
},
"overrides": [
{
"include": ["**/*.ts?(x)"],
"linter": {
"rules": {
"complexity": { "noUselessConstructor": "warn" },
"correctness": {
"noInvalidUseBeforeDeclaration": "warn",
"noUndeclaredVariables": "off",
"noUnusedVariables": "warn",
"useArrayLiterals": "off"
},
"suspicious": {
"noDuplicateClassMembers": "off",
"noRedeclare": "warn"
}
}
}
}
]
}
1 change: 0 additions & 1 deletion e2e/happyPath.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable testing-library/prefer-screen-queries */
import { expect, test } from "@playwright/test";

test("should complete the happy path", async ({ page, isMobile }) => {
Expand Down
3 changes: 1 addition & 2 deletions e2e/settingsHappyPath.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable testing-library/prefer-screen-queries */
import { expect, test } from "@playwright/test";
import fs from "fs";
import { expect, test } from "@playwright/test";

test("should complete the settings happy path", async ({ page, isMobile }) => {
await page.goto("/");
Expand Down
Loading

0 comments on commit 16ccd2b

Please sign in to comment.