|
| 1 | +import eslint from "@eslint/js"; |
| 2 | +import eslintConfigPrettier from "eslint-config-prettier/flat"; |
| 3 | +import tseslint from "typescript-eslint"; |
| 4 | + |
| 5 | +export default tseslint.config( |
| 6 | + eslint.configs.recommended, |
| 7 | + tseslint.configs.strictTypeChecked, |
| 8 | + eslintConfigPrettier, |
| 9 | + { |
| 10 | + languageOptions: { |
| 11 | + parserOptions: { |
| 12 | + projectService: true, |
| 13 | + tsconfigRootDir: import.meta.dirname, |
| 14 | + }, |
| 15 | + }, |
| 16 | + rules: { |
| 17 | + "@typescript-eslint/explicit-function-return-type": "error", |
| 18 | + "@typescript-eslint/no-empty-object-type": "off", |
| 19 | + "@typescript-eslint/no-floating-promises": [ |
| 20 | + "error", |
| 21 | + { |
| 22 | + ignoreVoid: true, |
| 23 | + }, |
| 24 | + ], |
| 25 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 26 | + "@typescript-eslint/no-require-imports": "off", |
| 27 | + "@typescript-eslint/no-unused-vars": [ |
| 28 | + "error", |
| 29 | + { |
| 30 | + argsIgnorePattern: "^_", |
| 31 | + }, |
| 32 | + ], |
| 33 | + "@typescript-eslint/no-unsafe-argument": "off", |
| 34 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 35 | + "@typescript-eslint/no-unsafe-call": "off", |
| 36 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 37 | + "@typescript-eslint/no-unsafe-return": "off", |
| 38 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 39 | + "@typescript-eslint/prefer-nullish-coalescing": [ |
| 40 | + "error", |
| 41 | + { |
| 42 | + ignoreConditionalTests: true, |
| 43 | + ignoreMixedLogicalExpressions: true, |
| 44 | + }, |
| 45 | + ], |
| 46 | + }, |
| 47 | + }, |
| 48 | +); |
0 commit comments