|
| 1 | +import path from "node:path"; |
| 2 | +import { fileURLToPath } from "node:url"; |
| 3 | +import js from "@eslint/js"; |
| 4 | +import { FlatCompat } from "@eslint/eslintrc"; |
| 5 | + |
| 6 | +const __filename = fileURLToPath(import.meta.url); |
| 7 | +const __dirname = path.dirname(__filename); |
| 8 | +const compat = new FlatCompat({ |
| 9 | + baseDirectory: __dirname, |
| 10 | + recommendedConfig: js.configs.recommended, |
| 11 | + allConfig: js.configs.all, |
| 12 | +}); |
| 13 | + |
| 14 | +export default [ |
| 15 | + ...compat.extends("airbnb", "prettier"), |
| 16 | + { |
| 17 | + settings: { |
| 18 | + "import/external-module-folders": ["assets", "config", "ui", "lib"], |
| 19 | + }, |
| 20 | + |
| 21 | + rules: { |
| 22 | + camelcase: ["off"], |
| 23 | + "import/no-extraneous-dependencies": ["off"], |
| 24 | + "import/prefer-default-export": ["off"], |
| 25 | + "import/no-unresolved": ["off"], |
| 26 | + "jsx-a11y/anchor-is-valid": ["off"], |
| 27 | + "no-undef": ["off"], |
| 28 | + "react/destructuring-assignment": ["off"], |
| 29 | + "react/forbid-prop-types": ["off"], |
| 30 | + |
| 31 | + "react/jsx-filename-extension": [ |
| 32 | + 1, |
| 33 | + { |
| 34 | + extensions: [".js", ".jsx"], |
| 35 | + }, |
| 36 | + ], |
| 37 | + |
| 38 | + "react/jsx-one-expression-per-line": ["off"], |
| 39 | + "react/jsx-props-no-spreading": ["off"], |
| 40 | + "react/no-array-index-key": ["off"], |
| 41 | + "react/no-danger": ["off"], |
| 42 | + "react/no-typos": ["off"], |
| 43 | + "react/require-default-props": ["off"], |
| 44 | + }, |
| 45 | + }, |
| 46 | +]; |
0 commit comments