|
| 1 | +{ |
| 2 | + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", |
| 3 | + "files": { |
| 4 | + "ignoreUnknown": false, |
| 5 | + "ignore": [ |
| 6 | + "**/pnpm-lock.yaml", |
| 7 | + "lib/db/migrations", |
| 8 | + "lib/editor/react-renderer.tsx", |
| 9 | + "node_modules", |
| 10 | + ".next", |
| 11 | + "public", |
| 12 | + ".vercel" |
| 13 | + ] |
| 14 | + }, |
| 15 | + "vcs": { |
| 16 | + "enabled": true, |
| 17 | + "clientKind": "git", |
| 18 | + "defaultBranch": "main", |
| 19 | + "useIgnoreFile": true |
| 20 | + }, |
| 21 | + "formatter": { |
| 22 | + "enabled": true, |
| 23 | + "formatWithErrors": false, |
| 24 | + "indentStyle": "space", |
| 25 | + "indentWidth": 2, |
| 26 | + "lineEnding": "lf", |
| 27 | + "lineWidth": 80, |
| 28 | + "attributePosition": "auto" |
| 29 | + }, |
| 30 | + "linter": { |
| 31 | + "enabled": true, |
| 32 | + "rules": { |
| 33 | + "recommended": true, |
| 34 | + "a11y": { |
| 35 | + "useHtmlLang": "warn", // Not in recommended ruleset, turning on manually |
| 36 | + "noHeaderScope": "warn", // Not in recommended ruleset, turning on manually |
| 37 | + "useValidAriaRole": { |
| 38 | + "level": "warn", |
| 39 | + "options": { |
| 40 | + "ignoreNonDom": false, |
| 41 | + "allowInvalidRoles": ["none", "text"] |
| 42 | + } |
| 43 | + }, |
| 44 | + "useSemanticElements": "off", // Rule is buggy, revisit later |
| 45 | + "noSvgWithoutTitle": "off", // We do not intend to adhere to this rule |
| 46 | + "useMediaCaption": "off", // We would need a cultural change to turn this on |
| 47 | + "noAutofocus": "off", // We're highly intentional about when we use autofocus |
| 48 | + "noBlankTarget": "off" // Covered by Conformance |
| 49 | + }, |
| 50 | + "complexity": { |
| 51 | + "noUselessStringConcat": "warn", // Not in recommended ruleset, turning on manually |
| 52 | + "noForEach": "off", // forEach is too familiar to ban |
| 53 | + "noUselessSwitchCase": "off", // Turned off due to developer preferences |
| 54 | + "noUselessThisAlias": "off" // Turned off due to developer preferences |
| 55 | + }, |
| 56 | + "correctness": { |
| 57 | + "noUnusedImports": "warn", // Not in recommended ruleset, turning on manually |
| 58 | + "useArrayLiterals": "warn", // Not in recommended ruleset, turning on manually |
| 59 | + "noNewSymbol": "warn", // Not in recommended ruleset, turning on manually |
| 60 | + "useJsxKeyInIterable": "off", // Rule is buggy, revisit later |
| 61 | + "useExhaustiveDependencies": "off", // Community feedback on this rule has been poor, we will continue with ESLint |
| 62 | + "noUnnecessaryContinue": "off" // Turned off due to developer preferences |
| 63 | + }, |
| 64 | + "security": { |
| 65 | + "noDangerouslySetInnerHtml": "off" // Covered by Conformance |
| 66 | + }, |
| 67 | + "style": { |
| 68 | + "useFragmentSyntax": "warn", // Not in recommended ruleset, turning on manually |
| 69 | + "noYodaExpression": "warn", // Not in recommended ruleset, turning on manually |
| 70 | + "useDefaultParameterLast": "warn", // Not in recommended ruleset, turning on manually |
| 71 | + "useExponentiationOperator": "off", // Obscure and arguably not easily readable |
| 72 | + "noUnusedTemplateLiteral": "off", // Stylistic opinion |
| 73 | + "noUselessElse": "off" // Stylistic opinion |
| 74 | + }, |
| 75 | + "suspicious": { |
| 76 | + "noExplicitAny": "off" // We trust Vercelians to use any only when necessary |
| 77 | + }, |
| 78 | + "nursery": { |
| 79 | + "noStaticElementInteractions": "warn", |
| 80 | + "noHeadImportInDocument": "warn", |
| 81 | + "noDocumentImportInPage": "warn", |
| 82 | + "noDuplicateElseIf": "warn", |
| 83 | + "noIrregularWhitespace": "warn", |
| 84 | + "useValidAutocomplete": "warn" |
| 85 | + } |
| 86 | + } |
| 87 | + }, |
| 88 | + "javascript": { |
| 89 | + "jsxRuntime": "reactClassic", |
| 90 | + "formatter": { |
| 91 | + "jsxQuoteStyle": "double", |
| 92 | + "quoteProperties": "asNeeded", |
| 93 | + "trailingCommas": "all", |
| 94 | + "semicolons": "always", |
| 95 | + "arrowParentheses": "always", |
| 96 | + "bracketSpacing": true, |
| 97 | + "bracketSameLine": false, |
| 98 | + "quoteStyle": "single", |
| 99 | + "attributePosition": "auto" |
| 100 | + } |
| 101 | + }, |
| 102 | + "json": { |
| 103 | + "formatter": { |
| 104 | + "enabled": true, |
| 105 | + "trailingCommas": "none" |
| 106 | + }, |
| 107 | + "parser": { |
| 108 | + "allowComments": true, |
| 109 | + "allowTrailingCommas": false |
| 110 | + } |
| 111 | + }, |
| 112 | + "css": { |
| 113 | + "formatter": { "enabled": false }, |
| 114 | + "linter": { "enabled": false } |
| 115 | + }, |
| 116 | + "organizeImports": { "enabled": false }, |
| 117 | + "overrides": [ |
| 118 | + // Playwright requires an object destructure, even if empty |
| 119 | + // https://github.com/microsoft/playwright/issues/30007 |
| 120 | + { |
| 121 | + "include": ["playwright/**"], |
| 122 | + "linter": { |
| 123 | + "rules": { |
| 124 | + "correctness": { |
| 125 | + "noEmptyPattern": "off" |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + } |
| 130 | + ] |
| 131 | +} |
0 commit comments