Skip to content

Commit

Permalink
Move to Biome (#48)
Browse files Browse the repository at this point in the history
* Bump

* Fix snapshots

* Update package.json

* Update xxhash32.ts

* Fix function hoisting
  • Loading branch information
lxsmnsyc authored Jan 10, 2024
1 parent b473100 commit 45187bc
Show file tree
Hide file tree
Showing 21 changed files with 2,834 additions and 2,051 deletions.
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

264 changes: 264 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
{
"$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",
"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",
"useValidAriaValues": "error",
"useValidLang": "error"
},
"complexity": {
"noBannedTypes": "error",
"noExcessiveCognitiveComplexity": "error",
"noExtraBooleanCast": "error",
"noForEach": "error",
"noMultipleSpacesInRegularExpressionLiterals": "warn",
"noStaticOnlyClass": "error",
"noThisInStatic": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessEmptyExport": "error",
"noUselessFragments": "error",
"noUselessLabel": "error",
"noUselessRename": "error",
"noUselessSwitchCase": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noVoid": "off",
"noWith": "error",
"useArrowFunction": "error",
"useFlatMap": "error",
"useLiteralKeys": "error",
"useOptionalChain": "warn",
"useSimpleNumberKeys": "error",
"useSimplifiedLogicExpression": "error"
},
"correctness": {
"noChildrenProp": "error",
"noConstantCondition": "error",
"noConstAssign": "error",
"noConstructorReturn": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noInvalidNewBuiltin": "error",
"noNewSymbol": "error",
"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",
"noUnusedLabels": "error",
"noUnusedVariables": "error",
"noVoidElementsWithChildren": "error",
"noVoidTypeReturn": "error",
"useExhaustiveDependencies": "error",
"useHookAtTopLevel": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"performance": {
"noAccumulatingSpread": "error",
"noDelete": "off"
},
"security": {
"noDangerouslySetInnerHtml": "error",
"noDangerouslySetInnerHtmlWithChildren": "error"
},
"style": {
"noArguments": "error",
"noCommaOperator": "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",
"useConst": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useExponentiationOperator": "error",
"useFragmentSyntax": "error",
"useLiteralEnumMembers": "error",
"useNamingConvention": "off",
"useNumericLiterals": "error",
"useSelfClosingElements": "error",
"useShorthandArrayType": "error",
"useShorthandAssign": "error",
"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",
"noEmptyInterface": "error",
"noExplicitAny": "warn",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalIsFinite": "error",
"noGlobalIsNan": "error",
"noImportAssign": "error",
"noLabelVar": "error",
"noMisleadingInstantiator": "error",
"noMisrefactoredShorthandAssign": "off",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noRedundantUseStrict": "error",
"noSelfCompare": "off",
"noShadowRestrictedNames": "error",
"noSparseArray": "off",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useDefaultSwitchClauseLast": "error",
"useGetterReturn": "error",
"useIsArray": "error",
"useNamespaceKeyword": "error",
"useValidTypeof": "error"
},
"nursery": {
"noAriaHiddenOnFocusable": "off",
"noDefaultExport": "off",
"noDuplicateJsonKeys": "off",
"noEmptyBlockStatements": "error",
"noImplicitAnyLet": "off",
"noUnusedImports": "error",
"noUnusedPrivateClassMembers": "error",
"noUselessLoneBlockStatements": "error",
"useAwait": "error",
"useGroupedTypeImport": "error",
"useImportRestrictions": "off",
"useRegexLiterals": "error",
"useValidAriaRole": "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",
"trailingComma": "all"
},
"globals": [],
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80
},
"parser": {
"allowComments": false,
"allowTrailingCommas": false
}
}
}
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,30 @@
"scripts": {
"build": "rollup -c",
"test": "vitest",
"test:CI": "vitest --no-threads",
"prepublishOnly": "npm run build",
"format": "prettier -w \"{tests,src}/**/*.{js,ts}\""
"test:CI": "vitest",
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/core": "^7.23.6",
"@biomejs/biome": "^1.4.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.5",
"@types/babel__core": "^7.20.3",
"@types/babel__generator": "^7.6.6",
"@types/babel__traverse": "^7.20.3",
"@types/node": "^20.8.8",
"prettier": "^3.0.3",
"rollup": "^4.1.4",
"solid-js": "^1.8.3",
"@types/babel__core": "^7.20.5",
"@types/babel__generator": "^7.6.8",
"@types/babel__traverse": "^7.20.4",
"@types/node": "^20.10.5",
"rollup": "^4.9.1",
"solid-js": "^1.8.7",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
"typescript": "^5.3.3",
"vitest": "^1.1.0"
},
"peerDependencies": {
"solid-js": "^1.3"
},
"dependencies": {
"@babel/generator": "^7.23.0",
"@babel/generator": "^7.23.6",
"@babel/helper-module-imports": "^7.22.15",
"@babel/types": "^7.23.0"
"@babel/types": "^7.23.6"
}
}
}
Loading

0 comments on commit 45187bc

Please sign in to comment.