-
-
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.
feat(repo): implement biome for formatting and lint and remove eslint
- Loading branch information
Showing
30 changed files
with
430 additions
and
328 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,5 @@ | ||
{ | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
{ | ||
"eslint.validate": [ | ||
{ | ||
"language":"vue", | ||
"autoFix":true | ||
}, | ||
{ | ||
"language":"html", | ||
"autoFix":true | ||
}, | ||
{ | ||
"language":"javascript", | ||
"autoFix":true | ||
}, | ||
{ | ||
"language":"typescript", | ||
"autoFix":true | ||
} | ||
], | ||
"eslint.alwaysShowStatus": true, | ||
"eslint.workingDirectories": [ | ||
"./client", | ||
"./server" | ||
], | ||
"editor.useTabStops": false, | ||
"editor.tabSize": 2, | ||
"editor.insertSpaces": true, | ||
"git.ignoreLimitWarning": true, | ||
"god.tsconfig": "./server/tsconfig.json", | ||
} | ||
"[typescript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"editor.codeActionsOnSave": { | ||
"quickfix.biome": "explicit", | ||
"source.organizeImports.biome": "explicit" | ||
}, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"biome.rename": true, | ||
"biome_lsp.trace.server": "messages" | ||
} | ||
|
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,234 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"vcs": { | ||
"clientKind": "git", | ||
"enabled": true, | ||
"useIgnoreFile": true, | ||
"defaultBranch": "master" | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"ignore": [ | ||
"apps/**/*.min.js", | ||
"apps/**/*.min.css", | ||
"apps/**/*-lock.yaml", | ||
"**/*.lock.json", | ||
"**/build/**" | ||
] | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"complexity": { | ||
"noBannedTypes": "warn", | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noUselessConstructor": "error", | ||
"noUselessLabel": "error", | ||
"noUselessLoneBlockStatements": "error", | ||
"noUselessRename": "error", | ||
"noUselessTernary": "error", | ||
"noVoid": "error", | ||
"noWith": "error", | ||
"useLiteralKeys": "error", | ||
"useRegexLiterals": "error" | ||
}, | ||
"correctness": { | ||
"noConstAssign": "error", | ||
"noConstantCondition": "warn", | ||
"noConstructorReturn": "error", | ||
"noEmptyCharacterClassInRegex": "error", | ||
"noEmptyPattern": "error", | ||
"noGlobalObjectCalls": "error", | ||
"noInnerDeclarations": "error", | ||
"noInvalidConstructorSuper": "error", | ||
"noInvalidUseBeforeDeclaration": "error", | ||
"noNewSymbol": "error", | ||
"noNonoctalDecimalEscape": "error", | ||
"noPrecisionLoss": "error", | ||
"noSelfAssign": "error", | ||
"noSetterReturn": "error", | ||
"noSwitchDeclarations": "error", | ||
"noUndeclaredVariables": "error", | ||
"noUnreachable": "error", | ||
"noUnreachableSuper": "error", | ||
"noUnsafeFinally": "error", | ||
"noUnsafeOptionalChaining": "error", | ||
"noUnusedImports": "off", | ||
"noUnusedLabels": "error", | ||
"noUnusedPrivateClassMembers": "off", | ||
"noUnusedVariables": "error", | ||
"useExhaustiveDependencies": "warn", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"security": { "noGlobalEval": "error" }, | ||
"style": { | ||
"noArguments": "error", | ||
"noCommaOperator": "error", | ||
"noDefaultExport": "off", | ||
"noNegationElse": "off", | ||
"noParameterAssign": "error", | ||
"noRestrictedGlobals": { | ||
"level": "error", | ||
"options": { | ||
"deniedGlobals": [ | ||
"isFinite", | ||
"isNaN", | ||
"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" | ||
] | ||
} | ||
}, | ||
"noVar": "error", | ||
"useBlockStatements": "error", | ||
"useCollapsedElseIf": "error", | ||
"useConst": "error", | ||
"useDefaultParameterLast": "error", | ||
"useExponentiationOperator": "error", | ||
"useImportType": "off", | ||
"useNumericLiterals": "error", | ||
"useShorthandAssign": "error", | ||
"useSingleVarDeclarator": "error", | ||
"useTemplate": "error" | ||
}, | ||
"suspicious": { | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCompareNegZero": "error", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDoubleEquals": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "error", | ||
"noExplicitAny": "warn", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noLabelVar": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noSelfCompare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noUnsafeNegation": "error", | ||
"useAwait": "off", | ||
"useDefaultSwitchClauseLast": "error", | ||
"useGetterReturn": "error", | ||
"useValidTypeof": "error" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"trailingComma": "all", | ||
"semicolons": "always", | ||
"enabled": true, | ||
"lineWidth": 120, | ||
"quoteStyle": "single" | ||
}, | ||
"globals": ["Atomics", "SharedArrayBuffer"] | ||
}, | ||
"json": { | ||
"parser": { "allowComments": true }, | ||
"formatter": { "enabled": true, "lineWidth": 120 } | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"], | ||
"linter": { | ||
"rules": { | ||
"correctness": { | ||
"noConstAssign": "off", | ||
"noGlobalObjectCalls": "off", | ||
"noInvalidConstructorSuper": "off", | ||
"noNewSymbol": "off", | ||
"noSetterReturn": "off", | ||
"noUndeclaredVariables": "off", | ||
"noUnreachable": "off", | ||
"noUnreachableSuper": "off" | ||
}, | ||
"suspicious": { | ||
"noDuplicateClassMembers": "off", | ||
"noDuplicateObjectKeys": "off", | ||
"noDuplicateParameters": "off", | ||
"noFunctionAssign": "off", | ||
"noImportAssign": "off", | ||
"noRedeclare": "off", | ||
"noUnsafeNegation": "off", | ||
"useGetterReturn": "off", | ||
"useValidTypeof": "off" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
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,37 +1,43 @@ | ||
{ | ||
"name": "bigcapital-monorepo", | ||
"private": true, | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"dev": "lerna run dev", | ||
"build": "lerna run build", | ||
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"", | ||
"dev:website": "lerna run dev --scope \"@bigcapital/website\"", | ||
"build:server": "lerna run build --scope \"@bigcapital/server\"", | ||
"build:webapp": "lerna run build --scope \"@bigcapital/webapp\"", | ||
"dev": "lerna run dev", | ||
"dev:server": "lerna run dev --scope \"@bigcapital/server\"", | ||
"build:server": "lerna run build --scope \"@bigcapital/server\"", | ||
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"", | ||
"dev:website": "lerna run dev --scope \"@bigcapital/website\"", | ||
"format": "lerna run format --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"", | ||
"lint": "lerna run lint --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"", | ||
"prepare": "husky install", | ||
"serve:server": "lerna run serve --scope \"@bigcapital/server\"", | ||
"test:e2e": "playwright test", | ||
"prepare": "husky install" | ||
"test:e2e": "playwright test" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.7.3", | ||
"@commitlint/cli": "^17.4.2", | ||
"@commitlint/config-conventional": "^17.4.2", | ||
"@commitlint/config-lerna-scopes": "^17.4.2", | ||
"@faker-js/faker": "^8.0.2", | ||
"@playwright/test": "^1.32.3", | ||
"husky": "^8.0.3", | ||
"lerna": "^8.1.2", | ||
"pnpm": "^9.0.5" | ||
"lerna": "^8.1.2" | ||
}, | ||
"engines": { | ||
"node": "16.x || 17.x || 18.x" | ||
"bun": ">=1", | ||
"node": "please-use-bun", | ||
"pnpm": "please-use-bun", | ||
"yarn": "please-use-bun" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
} | ||
"engineStrict": true | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.