|
| 1 | +{ |
| 2 | + "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + "plugins": ["import", "jsx-a11y", "nextjs", "react", "typescript", "unicorn"], |
| 4 | + "ignorePatterns": [ |
| 5 | + "**/.next", |
| 6 | + "**/.swc", |
| 7 | + "**/node_modules", |
| 8 | + "**/out", |
| 9 | + "**/public", |
| 10 | + "**/assets", |
| 11 | + "README.md", |
| 12 | + "next-env.d.ts" |
| 13 | + ], |
| 14 | + "rules": { |
| 15 | + "curly": "error", |
| 16 | + "eqeqeq": [ |
| 17 | + "error", |
| 18 | + "always", |
| 19 | + { |
| 20 | + "null": "ignore" |
| 21 | + } |
| 22 | + ], |
| 23 | + "func-style": ["error", "declaration"], |
| 24 | + "no-unused-expressions": [ |
| 25 | + "error", |
| 26 | + { |
| 27 | + "allowShortCircuit": true, |
| 28 | + "enforceForJSX": true |
| 29 | + } |
| 30 | + ], |
| 31 | + "no-unused-vars": [ |
| 32 | + "error", |
| 33 | + { |
| 34 | + "vars": "all", |
| 35 | + "args": "none", |
| 36 | + "ignoreRestSiblings": true, |
| 37 | + "caughtErrors": "all", |
| 38 | + "caughtErrorsIgnorePattern": "^_" |
| 39 | + } |
| 40 | + ], |
| 41 | + "no-useless-computed-key": "error", |
| 42 | + "no-useless-concat": "error", |
| 43 | + "no-useless-constructor": "error", |
| 44 | + "no-useless-return": "error", |
| 45 | + "no-void": [ |
| 46 | + "error", |
| 47 | + { |
| 48 | + "allowAsStatement": true |
| 49 | + } |
| 50 | + ], |
| 51 | + "prefer-promise-reject-errors": "error", |
| 52 | + "prefer-rest-params": "error", |
| 53 | + "prefer-spread": "error", |
| 54 | + |
| 55 | + "import/consistent-type-specifier-style": ["error", "prefer-inline"], |
| 56 | + "import/default": "error", |
| 57 | + "import/namespace": "error", |
| 58 | + "import/no-cycle": [ |
| 59 | + "error", |
| 60 | + { |
| 61 | + "maxDepth": 3, |
| 62 | + "disableScc": true |
| 63 | + } |
| 64 | + ], |
| 65 | + "import/no-duplicates": "error", |
| 66 | + "import/no-named-as-default": "error", |
| 67 | + "import/no-named-as-default-member": "error", |
| 68 | + "import/no-self-import": "error", |
| 69 | + "jsx-a11y/alt-text": "error", |
| 70 | + "jsx-a11y/anchor-has-content": "error", |
| 71 | + "jsx-a11y/anchor-is-valid": "error", |
| 72 | + "jsx-a11y/aria-props": "error", |
| 73 | + "jsx-a11y/heading-has-content": "error", |
| 74 | + "jsx-a11y/img-redundant-alt": "error", |
| 75 | + "jsx-a11y/no-noninteractive-tabindex": "error", |
| 76 | + "jsx-a11y/no-redundant-roles": "error", |
| 77 | + "jsx-a11y/prefer-tag-over-role": "off", |
| 78 | + "nextjs/google-font-display": "error", |
| 79 | + "nextjs/google-font-preconnect": "error", |
| 80 | + "nextjs/inline-script-id": "error", |
| 81 | + "nextjs/next-script-for-ga": "error", |
| 82 | + "nextjs/no-assign-module-variable": "error", |
| 83 | + "nextjs/no-async-client-component": "error", |
| 84 | + "nextjs/no-before-interactive-script-outside-document": "error", |
| 85 | + "nextjs/no-css-tags": "error", |
| 86 | + "nextjs/no-document-import-in-page": "error", |
| 87 | + "nextjs/no-duplicate-head": "error", |
| 88 | + "nextjs/no-head-element": "error", |
| 89 | + "nextjs/no-head-import-in-document": "error", |
| 90 | + "nextjs/no-html-link-for-pages": "error", |
| 91 | + "nextjs/no-img-element": "off", |
| 92 | + "nextjs/no-page-custom-font": "error", |
| 93 | + "nextjs/no-script-component-in-head": "error", |
| 94 | + "nextjs/no-styled-jsx-in-document": "error", |
| 95 | + "nextjs/no-sync-scripts": "error", |
| 96 | + "nextjs/no-title-in-document-head": "error", |
| 97 | + "nextjs/no-typos": "error", |
| 98 | + "nextjs/no-unwanted-polyfillio": "error", |
| 99 | + "react-hooks/rules-of-hooks": "error", |
| 100 | + "react/jsx-boolean-value": ["error"], |
| 101 | + "react/jsx-curly-brace-presence": ["error"], |
| 102 | + "react/jsx-fragments": ["error", "syntax"], |
| 103 | + "react/jsx-key": [ |
| 104 | + "error", |
| 105 | + { |
| 106 | + "checkFragmentShorthand": true, |
| 107 | + "checkKeyMustBeforeSpread": true, |
| 108 | + "warnOnDuplicates": true |
| 109 | + } |
| 110 | + ], |
| 111 | + "react/jsx-no-duplicate-props": "error", |
| 112 | + "react/jsx-no-undef": "error", |
| 113 | + "react/no-did-mount-set-state": "error", |
| 114 | + "react/no-direct-mutation-state": "error", |
| 115 | + "react/no-redundant-should-component-update": "error", |
| 116 | + "react/no-this-in-sfc": "error", |
| 117 | + "react/no-unknown-property": "error", |
| 118 | + "react/no-will-update-set-state": "error", |
| 119 | + "react/self-closing-comp": "error", |
| 120 | + "typescript/await-thenable": "error", |
| 121 | + "typescript/ban-ts-comment": [ |
| 122 | + "error", |
| 123 | + { |
| 124 | + "minimumDescriptionLength": 3, |
| 125 | + "ts-check": false, |
| 126 | + "ts-expect-error": "allow-with-description", |
| 127 | + "ts-ignore": true, |
| 128 | + "ts-nocheck": true |
| 129 | + } |
| 130 | + ], |
| 131 | + "typescript/consistent-type-imports": [ |
| 132 | + "error", |
| 133 | + { |
| 134 | + "fixStyle": "inline-type-imports" |
| 135 | + } |
| 136 | + ], |
| 137 | + "typescript/no-confusing-non-null-assertion": "error", |
| 138 | + "typescript/no-extra-non-null-assertion": "error", |
| 139 | + "typescript/no-misused-promises": [ |
| 140 | + "error", |
| 141 | + { |
| 142 | + "checksVoidReturn": false |
| 143 | + } |
| 144 | + ], |
| 145 | + "typescript/no-restricted-types": "error", |
| 146 | + "typescript/no-unnecessary-boolean-literal-compare": "error", |
| 147 | + "typescript/no-unnecessary-type-arguments": "error", |
| 148 | + "typescript/no-unnecessary-type-assertion": "error", |
| 149 | + "typescript/no-unsafe-enum-comparison": "error", |
| 150 | + "typescript/prefer-includes": "error", |
| 151 | + "typescript/prefer-readonly": "error", |
| 152 | + "typescript/return-await": ["error", "error-handling-correctness-only"], |
| 153 | + "typescript/unbound-method": "off", |
| 154 | + "unicorn/prefer-array-find": "error", |
| 155 | + "unicorn/prefer-array-flat": "error", |
| 156 | + "unicorn/prefer-array-flat-map": "error", |
| 157 | + "unicorn/prefer-array-some": "error", |
| 158 | + "unicorn/prefer-node-protocol": "error" |
| 159 | + } |
| 160 | +} |
0 commit comments