-
Notifications
You must be signed in to change notification settings - Fork 31
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
Switch to biome from eslint #672
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
{ | ||
"extends": "stylelint-config-standard-scss", | ||
"plugins": [ | ||
"stylelint-use-logical-spec" | ||
], | ||
"rules": { | ||
"at-rule-empty-line-before": null, | ||
"declaration-empty-line-before": null, | ||
"custom-property-empty-line-before": null, | ||
"comment-empty-line-before": null, | ||
"scss/double-slash-comment-empty-line-before": null, | ||
"scss/dollar-variable-colon-space-after": null, | ||
"extends": "stylelint-config-standard-scss", | ||
"plugins": ["stylelint-use-logical-spec"], | ||
"rules": { | ||
"at-rule-empty-line-before": null, | ||
"declaration-empty-line-before": null, | ||
"custom-property-empty-line-before": null, | ||
"comment-empty-line-before": null, | ||
"scss/double-slash-comment-empty-line-before": null, | ||
"scss/dollar-variable-colon-space-after": null, | ||
|
||
"custom-property-pattern": null, | ||
"declaration-block-no-duplicate-properties": null, | ||
"declaration-block-no-redundant-longhand-properties": null, | ||
"declaration-block-no-shorthand-property-overrides": null, | ||
"declaration-block-single-line-max-declarations": null, | ||
"font-family-no-duplicate-names": null, | ||
"function-url-quotes": null, | ||
"keyframes-name-pattern": null, | ||
"no-descending-specificity": null, | ||
"no-duplicate-selectors": null, | ||
"scss/at-extend-no-missing-placeholder": null, | ||
"scss/at-import-partial-extension": null, | ||
"scss/at-mixin-pattern": null, | ||
"scss/comment-no-empty": null, | ||
"scss/dollar-variable-pattern": null, | ||
"scss/double-slash-comment-whitespace-inside": null, | ||
"scss/no-global-function-names": null, | ||
"scss/operator-no-unspaced": null, | ||
"selector-class-pattern": null, | ||
"selector-id-pattern": null, | ||
"custom-property-pattern": null, | ||
"declaration-block-no-duplicate-properties": null, | ||
"declaration-block-no-redundant-longhand-properties": null, | ||
"declaration-block-no-shorthand-property-overrides": null, | ||
"declaration-block-single-line-max-declarations": null, | ||
"font-family-no-duplicate-names": null, | ||
"function-url-quotes": null, | ||
"keyframes-name-pattern": null, | ||
"no-descending-specificity": null, | ||
"no-duplicate-selectors": null, | ||
"scss/at-extend-no-missing-placeholder": null, | ||
"scss/at-import-partial-extension": null, | ||
"scss/at-mixin-pattern": null, | ||
"scss/comment-no-empty": null, | ||
"scss/dollar-variable-pattern": null, | ||
"scss/double-slash-comment-whitespace-inside": null, | ||
"scss/no-global-function-names": null, | ||
"scss/operator-no-unspaced": null, | ||
"selector-class-pattern": null, | ||
"selector-id-pattern": null, | ||
|
||
"liberty/use-logical-spec": "always" | ||
} | ||
"liberty/use-logical-spec": "always" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"$schema": "node_modules/@biomejs/biome/configuration_schema.json", | ||
"organizeImports": { "enabled": true }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"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", | ||
"useAltText": "error", | ||
"useAnchorContent": "error", | ||
"useAriaActivedescendantWithTabindex": "error", | ||
"useAriaPropsForRole": "error", | ||
"useHeadingContent": "error", | ||
"useHtmlLang": "error", | ||
"useIframeTitle": "error", | ||
"useKeyWithClickEvents": "error", | ||
"useKeyWithMouseEvents": "error", | ||
"useMediaCaption": "error", | ||
"useValidAnchor": "off", | ||
"useValidAriaProps": "error", | ||
"useValidAriaRole": "error", | ||
"useValidAriaValues": "error" | ||
}, | ||
"complexity": { | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noUselessConstructor": "error", | ||
"noUselessFragments": "error", | ||
"noUselessLoneBlockStatements": "error", | ||
"noUselessRename": "error", | ||
"noUselessTernary": "error", | ||
"noVoid": "error", | ||
"noWith": "error", | ||
"useLiteralKeys": "error", | ||
"useRegexLiterals": "error" | ||
}, | ||
"correctness": { | ||
"noChildrenProp": "error", | ||
"noConstAssign": "error", | ||
"noConstantCondition": "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", | ||
"noUnusedLabels": "error", | ||
"noUnusedVariables": "error", | ||
"useArrayLiterals": "error", | ||
"useExhaustiveDependencies": "error", | ||
"useHookAtTopLevel": "error", | ||
"useIsNan": "error", | ||
"useJsxKeyInIterable": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"security": { | ||
"noDangerouslySetInnerHtmlWithChildren": "error", | ||
"noGlobalEval": "error" | ||
}, | ||
"style": { | ||
"noCommaOperator": "error", | ||
"noImplicitBoolean": "error", | ||
"noVar": "error", | ||
"useBlockStatements": "off", | ||
"useConst": "error", | ||
"useFragmentSyntax": "error", | ||
"useSingleVarDeclarator": "error" | ||
}, | ||
"suspicious": { | ||
"noAssignInExpressions": "error", | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCommentText": "error", | ||
"noCompareNegZero": "error", | ||
"noConfusingLabels": "error", | ||
"noConsoleLog": "off", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDoubleEquals": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateJsxProps": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "error", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noSelfCompare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noUnsafeNegation": "error", | ||
"useDefaultSwitchClauseLast": "error", | ||
"useGetterReturn": "error", | ||
"useValidTypeof": "error" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"globals": ["require", "module", "document", "navigator", "window"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is unnecessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was imported from the eslint config |
||
}, | ||
"formatter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use spaces: {
"formatter": {
"indentStyle": "space"
}
} And possibly add |
||
"indentStyle":"space", | ||
"indentWidth":4 | ||
}, | ||
"overrides": [{ "include": ["**/*.ts", "**/*.tsx"] }], | ||
"files": { | ||
"ignore": ["node_modules/*", "pkg/lib/*", "bots/*"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We won't need this with the git integration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we would see my comment on bots |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does biome not support setting the
env
, we developer for a browser so the linter should know about it like ESLint does?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is maybe something we should fix...