-
Notifications
You must be signed in to change notification settings - Fork 21
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
[PoC] Migrate eslint and prettier to biome #554
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 |
---|---|---|
@@ -0,0 +1,306 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false }, | ||
"files": { "ignoreUnknown": false, "ignore": [] }, | ||
"formatter": { | ||
"enabled": true, | ||
"useEditorconfig": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"indentWidth": 4, | ||
"lineEnding": "lf", | ||
"lineWidth": 140, | ||
"attributePosition": "auto", | ||
"bracketSpacing": true, | ||
"ignore": [ | ||
"lib/consentomatic", | ||
"**/dist", | ||
"**/data", | ||
"**/package.json", | ||
"**/package-lock.json", | ||
"addon/manifest.*.json", | ||
"**/*.md", | ||
"**/*.har", | ||
"lib/filterlist-engine.ts" | ||
] | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"complexity": { | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noUselessConstructor": "error", | ||
"noUselessLoneBlockStatements": "error", | ||
"noUselessRename": "error", | ||
"noUselessTernary": "error", | ||
"noUselessTypeConstraint": "error", | ||
"noUselessUndefinedInitialization": "error", | ||
"noVoid": "error", | ||
"noWith": "error", | ||
"useLiteralKeys": "error", | ||
"useRegexLiterals": "error" | ||
}, | ||
"correctness": { | ||
"noConstAssign": "error", | ||
"noConstantCondition": "error", | ||
"noEmptyCharacterClassInRegex": "error", | ||
"noEmptyPattern": "error", | ||
"noGlobalObjectCalls": "error", | ||
"noInnerDeclarations": "error", | ||
"noInvalidBuiltinInstantiation": "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", | ||
"noUnusedPrivateClassMembers": "error", | ||
"noUnusedVariables": "error", | ||
"useArrayLiterals": "off", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"security": { "noGlobalEval": "error" }, | ||
"style": { | ||
"noCommaOperator": "error", | ||
"noNamespace": "error", | ||
"noVar": "warn", | ||
"noYodaExpression": "error", | ||
"useAsConstAssertion": "error", | ||
"useBlockStatements": "off", | ||
"useConsistentBuiltinInstantiation": "error", | ||
"useConst": "error", | ||
"useSingleVarDeclarator": "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": "off", | ||
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 changed this from error to off, as I'm not sure if you'd like to use this in new code. If yes, then I'd change back to "error" and add inline |
||
"noExtraNonNullAssertion": "error", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noLabelVar": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noMisleadingInstantiator": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noSelfCompare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noSparseArray": "error", | ||
"noUnsafeDeclarationMerging": "error", | ||
"noUnsafeNegation": "error", | ||
"useDefaultSwitchClauseLast": "error", | ||
"useGetterReturn": "error", | ||
"useNamespaceKeyword": "error", | ||
"useValidTypeof": "error" | ||
} | ||
}, | ||
"ignore": ["lib/consentomatic/**/*", "dist/**/*", "lib/filterlist-engine.ts"] | ||
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. The |
||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "all", | ||
"semicolons": "asNeeded", | ||
"arrowParentheses": "always", | ||
"bracketSameLine": false, | ||
"quoteStyle": "single", | ||
"attributePosition": "auto", | ||
"bracketSpacing": true | ||
}, | ||
"globals": [ | ||
"onscrollend", | ||
"onpointerleave", | ||
"oncontextrestored", | ||
"onemptied", | ||
"ongamepaddisconnected", | ||
"onkeypress", | ||
"onloadeddata", | ||
"onmouseup", | ||
"onvolumechange", | ||
"onpaste", | ||
"onstorage", | ||
"onkeyup", | ||
"onabort", | ||
"oncut", | ||
"ontransitionrun", | ||
"onafterprint", | ||
"onblur", | ||
"ondurationchange", | ||
"ontransitionstart", | ||
"oncanplaythrough", | ||
"onanimationend", | ||
"onmouseleave", | ||
"ondragleave", | ||
"onplay", | ||
"onunhandledrejection", | ||
"onbeforeprint", | ||
"onpointercancel", | ||
"onsubmit", | ||
"ondragstart", | ||
"onmessage", | ||
"location", | ||
"onoffline", | ||
"onappinstalled", | ||
"onwheel", | ||
"onended", | ||
"onkeydown", | ||
"onclick", | ||
"onfocus", | ||
"onscroll", | ||
"ongamepadconnected", | ||
"oncanplay", | ||
"onpointerdown", | ||
"ondeviceorientationabsolute", | ||
"onauxclick", | ||
"ondevicemotion", | ||
"onratechange", | ||
"ontransitionend", | ||
"onscrollsnapchanging", | ||
"onchange", | ||
"onselect", | ||
"onbeforeinstallprompt", | ||
"onbeforetoggle", | ||
"onmouseout", | ||
"ontimeupdate", | ||
"ondragover", | ||
"oncuechange", | ||
"ontransitioncancel", | ||
"onprogress", | ||
"onbeforeinput", | ||
"onpointerenter", | ||
"onmouseenter", | ||
"oninvalid", | ||
"onpointerout", | ||
"onpagereveal", | ||
"onpause", | ||
"onanimationstart", | ||
"onwaiting", | ||
"onscrollsnapchange", | ||
"ondeviceorientation", | ||
"onclose", | ||
"onbeforeunload", | ||
"oncancel", | ||
"onseeked", | ||
"onpointerover", | ||
"ongotpointercapture", | ||
"onloadedmetadata", | ||
"onpageshow", | ||
"onstalled", | ||
"oncontextmenu", | ||
"onreset", | ||
"ondrag", | ||
"onbeforematch", | ||
"onload", | ||
"onlostpointercapture", | ||
"onsuspend", | ||
"onselectionchange", | ||
"onpagehide", | ||
"onrejectionhandled", | ||
"onunload", | ||
"onanimationcancel", | ||
"onmousedown", | ||
"onpointerup", | ||
"onmouseover", | ||
"onformdata", | ||
"oncontentvisibilityautostatechange", | ||
"onresize", | ||
"onsearch", | ||
"ontoggle", | ||
"exports", | ||
"onpageswap", | ||
"onbeforexrselect", | ||
"onlanguagechange", | ||
"ondragenter", | ||
"onerror", | ||
"onpointermove", | ||
"onmousemove", | ||
"ondrop", | ||
"onhashchange", | ||
"onsecuritypolicyviolation", | ||
"onslotchange", | ||
"oncopy", | ||
"onanimationiteration", | ||
"ondblclick", | ||
"ondragend", | ||
"onpointerrawupdate", | ||
"onpopstate", | ||
"onplaying", | ||
"oncontextlost", | ||
"onloadstart", | ||
"onseeking", | ||
"oninput", | ||
"onmessageerror", | ||
"onselectstart", | ||
"onmousewheel", | ||
"ononline" | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], | ||
"linter": { | ||
"rules": { | ||
"correctness": { | ||
"noConstAssign": "off", | ||
"noGlobalObjectCalls": "off", | ||
"noInvalidBuiltinInstantiation": "off", | ||
"noInvalidConstructorSuper": "off", | ||
"noNewSymbol": "off", | ||
"noSetterReturn": "off", | ||
"noUndeclaredVariables": "off", | ||
"noUnreachable": "off", | ||
"noUnreachableSuper": "off" | ||
}, | ||
"style": { | ||
"noArguments": "error", | ||
"noVar": "error", | ||
"useConst": "error" | ||
}, | ||
"suspicious": { | ||
"noClassAssign": "off", | ||
"noDuplicateClassMembers": "off", | ||
"noDuplicateObjectKeys": "off", | ||
"noDuplicateParameters": "off", | ||
"noFunctionAssign": "off", | ||
"noImportAssign": "off", | ||
"noRedeclare": "off", | ||
"noUnsafeNegation": "off", | ||
"useGetterReturn": "off" | ||
} | ||
} | ||
} | ||
}, | ||
{ "include": ["addon/**/*"], "javascript": { "globals": [] } }, | ||
{ | ||
"include": ["tests/**/*", "tests-wtr/**/*"], | ||
"javascript": { "globals": ["expect", "before", "should", "assert"] } | ||
} | ||
] | ||
} |
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.
dtto https://github.com/duckduckgo/autoconsent/pull/554/files#r1863358480