Skip to content

Commit

Permalink
Move to biome
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Jan 15, 2024
1 parent 698be7b commit 0cd4c0f
Show file tree
Hide file tree
Showing 51 changed files with 1,977 additions and 3,588 deletions.
12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

272 changes: 272 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
{
"$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",
"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",
"useRegexLiterals": "error",
"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",
"noDefaultExport": "off",
"noImplicitBoolean": "off",
"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",
"noImplicitAnyLet": "off",
"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": {
"noDuplicateJsonKeys": "off",
"noEmptyBlockStatements": "error",
"noEmptyTypeParameters": "error",
"noGlobalEval": "off",
"noGlobalAssign": "error",
"noInvalidUseBeforeDeclaration": "error",
"noMisleadingCharacterClass": "error",
"noNodejsModules": "off",
"noThenProperty": "warn",
"noUnusedImports": "error",
"noUnusedPrivateClassMembers": "error",
"noUselessLoneBlockStatements": "error",
"noUselessTernary": "error",
"useAwait": "error",
"useConsistentArrayType": "error",
"useExportType": "error",
"useFilenamingConvention": "off",
"useForOf": "warn",
"useGroupedTypeImport": "error",
"useImportRestrictions": "off",
"useImportType": "error",
"useNodejsImportProtocol": "warn",
"useNumberNamespace": "error",
"useShorthandFunctionType": "warn"
}
}
},
"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
}
}
}
15 changes: 0 additions & 15 deletions examples/astro-demo/.eslintrc.js

This file was deleted.

6 changes: 3 additions & 3 deletions examples/astro-demo/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'astro/config';

// https://astro.build/config
import solidJs from "@astrojs/solid-js";
import solidJs from '@astrojs/solid-js';
import solidStyled from 'unplugin-solid-styled';

// https://astro.build/config
Expand All @@ -14,8 +14,8 @@ export default defineConfig({
filter: {
include: 'src/**/*.tsx',
exclude: 'node_modules/**/*.{ts,js}',
}
},
}),
],
},
});
});
10 changes: 4 additions & 6 deletions examples/astro-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^3.3.2",
"eslint": "^8.54.0",
"eslint-config-lxsmnsyc": "^0.6.5",
"typescript": "^5.3.2",
"astro": "^4.1.2",
"typescript": "^5.3.3",
"unplugin-solid-styled": "0.10.0"
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"solid-js": "^1.8.1",
"@astrojs/solid-js": "^4.0.1",
"solid-js": "^1.8.11",
"solid-styled": "0.10.0"
}
}
3 changes: 2 additions & 1 deletion examples/astro-demo/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createSignal, JSX, Show } from 'solid-js';
import { createSignal, Show } from 'solid-js';
import type { JSX } from 'solid-js';
import { css } from 'solid-styled';

function ShowButton(): JSX.Element {
Expand Down
22 changes: 0 additions & 22 deletions examples/astro-demo/tsconfig.eslint.json

This file was deleted.

15 changes: 0 additions & 15 deletions examples/demo/.eslintrc.js

This file was deleted.

Loading

0 comments on commit 0cd4c0f

Please sign in to comment.