Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to biome #21

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
run_install: |
- args: [--frozen-lockfile]
run_install: true

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache: "pnpm"

- name: Clean
run: pnpm recursive run clean
env:
Expand Down
4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
strict-peer-dependencies=false
strict-peer-dependencies=false
prefer-workspace-packages=true
link-workspace-packages=true
270 changes: 270 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
{
"$schema": "https://unpkg.com/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["node_modules/**/*"]
},
"vcs": {
"useIgnoreFile": true
},
"linter": {
"enabled": true,
"ignore": ["node_modules/**/*"],
"rules": {
"a11y": {
"noAccessKey": "error",
"noAriaHiddenOnFocusable": "off",
"noAriaUnsupportedElements": "error",
"noAutofocus": "error",
"noBlankTarget": "error",
"noDistractingElements": "error",
"noHeaderScope": "error",
"noInteractiveElementToNoninteractiveRole": "error",
"noNoninteractiveElementToInteractiveRole": "error",
"noNoninteractiveTabindex": "error",
"noPositiveTabindex": "error",
"noRedundantAlt": "error",
"noRedundantRoles": "error",
"noSvgWithoutTitle": "error",
"useAltText": "error",
"useAnchorContent": "error",
"useAriaActivedescendantWithTabindex": "error",
"useAriaPropsForRole": "error",
"useButtonType": "error",
"useHeadingContent": "error",
"useHtmlLang": "error",
"useIframeTitle": "warn",
"useKeyWithClickEvents": "warn",
"useKeyWithMouseEvents": "warn",
"useMediaCaption": "error",
"useValidAnchor": "error",
"useValidAriaProps": "error",
"useValidAriaRole": "error",
"useValidAriaValues": "error",
"useValidLang": "error"
},
"complexity": {
"noBannedTypes": "error",
"noEmptyTypeParameters": "error",
"noExcessiveCognitiveComplexity": "error",
"noExtraBooleanCast": "error",
"noForEach": "error",
"noMultipleSpacesInRegularExpressionLiterals": "warn",
"noStaticOnlyClass": "error",
"noThisInStatic": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessEmptyExport": "error",
"noUselessFragments": "error",
"noUselessLabel": "error",
"noUselessRename": "error",
"noUselessSwitchCase": "error",
"noUselessTernary": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noVoid": "off",
"noWith": "error",
"useArrowFunction": "error",
"useFlatMap": "error",
"useLiteralKeys": "error",
"useOptionalChain": "warn",
"useRegexLiterals": "error",
"useSimpleNumberKeys": "error",
"useSimplifiedLogicExpression": "error"
},
"correctness": {
"noChildrenProp": "error",
"noConstantCondition": "error",
"noConstantMathMinMaxClamp": "error",
"noConstAssign": "error",
"noConstructorReturn": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noFlatMapIdentity": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noInvalidNewBuiltin": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noNodejsModules": "off",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noRenderReturnValue": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noStringCaseMismatch": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnnecessaryContinue": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedImports": "error",
"noUnusedLabels": "error",
"noUnusedPrivateClassMembers": "error",
"noUnusedVariables": "error",
"noVoidElementsWithChildren": "error",
"noVoidTypeReturn": "error",
"useArrayLiterals": "error",
"useExhaustiveDependencies": "error",
"useHookAtTopLevel": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"performance": {
"noAccumulatingSpread": "error",
"noDelete": "off"
},
"security": {
"noDangerouslySetInnerHtml": "error",
"noDangerouslySetInnerHtmlWithChildren": "error",
"noGlobalEval": "off"
},
"style": {
"noArguments": "error",
"noCommaOperator": "off",
"noDefaultExport": "off",
"noImplicitBoolean": "error",
"noInferrableTypes": "error",
"noNamespace": "error",
"noNegationElse": "error",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"noParameterProperties": "off",
"noRestrictedGlobals": "error",
"noShoutyConstants": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noVar": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "error",
"useCollapsedElseIf": "error",
"useConsistentArrayType": "error",
"useConst": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useExponentiationOperator": "error",
"useExportType": "error",
"useFragmentSyntax": "error",
"useFilenamingConvention": "off",
"useForOf": "warn",
"useImportType": "error",
"useLiteralEnumMembers": "error",
"useNamingConvention": "off",
"useNodejsImportProtocol": "warn",
"useNumberNamespace": "error",
"useNumericLiterals": "error",
"useSelfClosingElements": "error",
"useShorthandArrayType": "error",
"useShorthandAssign": "error",
"useShorthandFunctionType": "warn",
"useSingleCaseStatement": "error",
"useSingleVarDeclarator": "error",
"useTemplate": "off",
"useWhile": "error"
},
"suspicious": {
"noApproximativeNumericConstant": "error",
"noArrayIndexKey": "error",
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCommentText": "error",
"noCompareNegZero": "error",
"noConfusingLabels": "error",
"noConfusingVoidType": "error",
"noConsoleLog": "warn",
"noConstEnum": "off",
"noControlCharactersInRegex": "error",
"noDebugger": "off",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noEmptyInterface": "error",
"noExplicitAny": "warn",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noGlobalIsFinite": "error",
"noGlobalIsNan": "error",
"noImplicitAnyLet": "off",
"noImportAssign": "error",
"noLabelVar": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noMisrefactoredShorthandAssign": "off",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noRedundantUseStrict": "error",
"noSelfCompare": "off",
"noShadowRestrictedNames": "error",
"noSparseArray": "off",
"noThenProperty": "warn",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useAwait": "error",
"useDefaultSwitchClauseLast": "error",
"useGetterReturn": "error",
"useIsArray": "error",
"useNamespaceKeyword": "error",
"useValidTypeof": "error"
}
}
},
"formatter": {
"enabled": true,
"ignore": ["node_modules/**/*"],
"formatWithErrors": false,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80
},
"organizeImports": {
"enabled": true,
"ignore": ["node_modules/**/*"]
},
"javascript": {
"formatter": {
"enabled": true,
"arrowParentheses": "asNeeded",
"bracketSameLine": false,
"bracketSpacing": true,
"indentWidth": 2,
"indentStyle": "space",
"jsxQuoteStyle": "double",
"lineEnding": "lf",
"lineWidth": 80,
"quoteProperties": "asNeeded",
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all"
},
"globals": [],
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80
},
"parser": {
"allowComments": false,
"allowTrailingCommas": false
}
}
}
13 changes: 0 additions & 13 deletions examples/comments/.eslintrc.cjs

This file was deleted.

25 changes: 14 additions & 11 deletions examples/comments/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
10 changes: 4 additions & 6 deletions examples/comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@
"serve": "vite preview"
},
"devDependencies": {
"eslint": "^8.51.0",
"eslint-config-lxsmnsyc": "^0.6.5",
"solid-labels": "0.16.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-solid": "^2.7.2",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vite-plugin-solid": "^2.10.2",
"vite-plugin-solid-labels": "0.16.1"
},
"private": true,
"publishConfig": {
"access": "restricted"
},
"dependencies": {
"solid-js": "^1.8.0"
"solid-js": "^1.9.3"
}
}
Loading