Skip to content

Commit

Permalink
Merge pull request #324 from BootNodeDev/biome
Browse files Browse the repository at this point in the history
chore: migrate eslint and prettier to biome
  • Loading branch information
gabitoesmiapodo authored Sep 26, 2024
2 parents bcf2245 + e85ffcc commit 3c4aa89
Show file tree
Hide file tree
Showing 71 changed files with 891 additions and 2,161 deletions.
121 changes: 0 additions & 121 deletions .eslintrc.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,3 @@ updates:
labels:
- "dependencies"
- "pnpm"
reviewers:
- "fernandomg"
- "luchobonatti"
- "nicosampler"
- "paterson1"
- "tloffler"
- "gabitoesmiapodo"
7 changes: 1 addition & 6 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
export default {
'src/**/*.{ts,tsx}': [
'prettier --write --ignore-unknown',
'eslint --fix',
'stylelint --fix',
'vitest related --run --coverage=false',
],
'*': ['stylelint --fix', 'biome check --write', 'vitest related --run --coverage=false'],
}
19 changes: 0 additions & 19 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

180 changes: 180 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": [
"src/routeTree.gen.ts",
"src/subgraphs/queries/aave",
"src/subgraphs/queries/uniswap"
]
},
"formatter": {
"attributePosition": "multiline",
"indentStyle": "space",
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
},
"linter": {
"rules": {
"a11y": {
"noAccessKey": "error",
"noAriaUnsupportedElements": "error",
"noAutofocus": "error",
"noBlankTarget": "error",
"noDistractingElements": "error",
"noHeaderScope": "error",
"noInteractiveElementToNoninteractiveRole": "error",
"noLabelWithoutControl": "warn",
"noNoninteractiveElementToInteractiveRole": "error",
"noNoninteractiveTabindex": "error",
"noPositiveTabindex": "error",
"noRedundantAlt": "error",
"noRedundantRoles": "error",
"noSvgWithoutTitle": "off",
"useAltText": "error",
"useAnchorContent": "error",
"useAriaActivedescendantWithTabindex": "error",
"useAriaPropsForRole": "error",
"useFocusableInteractive": "error",
"useHeadingContent": "error",
"useHtmlLang": "error",
"useIframeTitle": "error",
"useKeyWithClickEvents": "error",
"useKeyWithMouseEvents": "error",
"useMediaCaption": "error",
"useValidAnchor": "error",
"useValidAriaProps": "error",
"useValidAriaRole": "error",
"useValidAriaValues": "error"
},
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessTypeConstraint": "error",
"noWith": "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": "off",
"useExhaustiveDependencies": "error",
"useHookAtTopLevel": "error",
"useIsNan": "error",
"useJsxKeyInIterable": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"security": {
"noDangerouslySetInnerHtmlWithChildren": "error"
},
"style": {
"noNamespace": "error",
"noRestrictedGlobals": {
"level": "error",
"options": {
"deniedGlobals": ["React"]
}
},
"useAsConstAssertion": "error",
"useBlockStatements": "off"
},
"suspicious": {
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCommentText": "error",
"noCompareNegZero": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noExplicitAny": "warn",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useNamespaceKeyword": "error",
"useValidTypeof": "error"
}
}
},
"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": {
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
}
]
}
24 changes: 18 additions & 6 deletions docs/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import React from 'react'

export default function Footer() {
return (
<div>
<div>Released under the MIT License.</div>
<div style={{display: 'flex', alignItems: 'center', columnGap: '8px'}}>Copyright © 2024-present - <a href="https://www.bootnode.dev/" target="_blank"><img src="/img/footer/logo.svg" alt="BootNode" /></a></div>
return (
<div>
<div>Released under the MIT License.</div>
<div style={{ display: 'flex', alignItems: 'center', columnGap: '8px' }}>
Copyright © 2024-present -{' '}
<a
href="https://www.bootnode.dev/"
target="_blank"
rel="noreferrer"
>
<img
src="/img/footer/logo.svg"
alt="BootNode"
/>
</a>
</div>
)
}
</div>
)
}
Loading

0 comments on commit 3c4aa89

Please sign in to comment.