Files
anonklub/biome.jsonc
sripwoud 94eac87e5c chore: replace prettier and eslint by biome (#422)
* chore: replace `prettier` and `eslint` by `biome` (#421)

* chore: replace `prettier` and `eslint` by `biome`

* chore: lint

* changeset
2024-03-30 22:15:54 +00:00

179 lines
4.1 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/1.6.3/schema.json",
"linter": {
"ignore": []
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"ignore": [
"**/node_modules/**",
"**/dist/**",
"**/out/**",
"**/.next/**",
"**/target/**",
"**/.turbo/**",
"**/coverage/**",
"**/*.graphql",
"**/.graphclient/**",
"**/cache/**",
"contracts/lib/forge-std/**",
"contracts/lib/openzeppelin-contracts/**",
"**/package.json"
]
},
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteStyle": "single",
"semicolons": "asNeeded"
},
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
},
"ignore": [
"**/node_modules/**",
"**/dist/**",
"**/out/**",
"**/.next/**",
"**/target/**",
"**/generated/**",
"**/coverage/**",
"**/*.graphql",
"**/.graphclient/**",
"**/cache/**",
"contracts/lib/forge-std/**",
"contracts/lib/openzeppelin-contracts/**",
"**/package.json",
"ui/next.config.js",
"ui/next-env.d.ts",
"ui/public/**",
".turbo/**",
"queries/**"
]
},
"overrides": [
{
"include": [
"discord-bot/src/lib/decorators/tryCatch.ts",
"query-api/src/decorators/handle-dune-credits-error.ts",
"query-api/src/decorators/tryCatchReply.ts"
],
"linter": {
"rules": {
"complexity": { "useArrowFunction": "off" }
}
}
},
{
"include": ["ui/src/**/*.tsx"],
"linter": {
"rules": {
"a11y": {
"useButtonType": "warn"
}
}
}
},
{
// TODO: why a string literal was used to get the env var here?
"include": ["query-api/src/repositories/dune-client/index.ts"],
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "warn"
}
}
}
},
{
"include": [
"discord-bot/src/lib/decorators/*.ts",
"discord-bot/src/events/*.ts",
"pkgs/proof/src/poseidon.ts",
"pkgs/proof/src/ExcludableMerkleTree.ts",
"query-api/src/repositories/dune-client/types.ts",
"query-api/src/repositories/GraphRepository.ts",
"query-api/src/decorators/handle-dune-credits-error.ts",
"ui/src/components/ExternalLink.tsx",
"**/test/**"
],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "warn"
}
}
}
},
{
"include": ["**/test/**"],
"linter": { "rules": { "suspicious": { "noImplicitAnyLet": "off" } } }
},
{
"include": ["ui/src/components/*.tsx"],
"linter": {
"rules": {
"a11y": {
"useValidAnchor": "warn"
}
}
}
},
{
"include": ["ui/src/app/**/error.tsx", "discord-bot/src/events/*.ts"],
"linter": {
"rules": {
"suspicious": {
"noShadowRestrictedNames": "off"
}
}
}
},
{
// FIXME
"include": ["ui/src/**/*.tsx", "ui/src/**/*.ts"],
"linter": {
"rules": {
"correctness": {
"useExhaustiveDependencies": "warn"
}
}
}
},
{
"include": ["pkgs/proof/src/MerkleTree.ts", "pkgs/proof/src/helpers.ts"],
"linter": { "rules": { "style": { "noParameterAssign": "off" } } }
},
// FIXME
{
"include": ["ui/src/**"],
"linter": { "rules": { "complexity": { "noUselessCatch": "warn" } } }
},
{
"include": [
"discord-bot/src/Client/index.ts",
"query-api/src/*.ts",
"discord-bot/src/*.ts"
],
"linter": {
"rules": {
//FIXME
"complexity": { "noForEach": "warn" },
// using import type breaks typeDI Service/Container
"style": { "useImportType": "off" }
}
}
}
]
}