|
| 1 | +/** @type {import("eslint").Linter.Config} */ |
| 2 | +const config = { |
| 3 | + parser: "@typescript-eslint/parser", |
| 4 | + parserOptions: { |
| 5 | + project: true, |
| 6 | + }, |
| 7 | + plugins: [ |
| 8 | + // "@typescript-eslint" |
| 9 | + ], |
| 10 | + extends: [ |
| 11 | + "next/core-web-vitals", |
| 12 | + "plugin:@typescript-eslint/recommended-type-checked", |
| 13 | + "plugin:@typescript-eslint/stylistic-type-checked", |
| 14 | + ], |
| 15 | + rules: { |
| 16 | + "@typescript-eslint/no-empty-object-type": "off", |
| 17 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 18 | + "@typescript-eslint/no-explicit-any": "off", |
| 19 | + "@typescript-eslint/array-type": "off", |
| 20 | + "@typescript-eslint/no-unsafe-member-access": "warn", |
| 21 | + "@typescript-eslint/no-unnecessary-type-assertion": "warn", |
| 22 | + "@typescript-eslint/no-unsafe-argument": "warn", |
| 23 | + "@typescript-eslint/no-unused-expressions": "warn", |
| 24 | + "@typescript-eslint/consistent-type-definitions": "off", |
| 25 | + "@typescript-eslint/await-thenable": "off", |
| 26 | + "@typescript-eslint/consistent-type-imports": [ |
| 27 | + "warn", |
| 28 | + { |
| 29 | + prefer: "type-imports", |
| 30 | + fixStyle: "inline-type-imports", |
| 31 | + }, |
| 32 | + ], |
| 33 | + "@typescript-eslint/no-unused-vars": [ |
| 34 | + "warn", |
| 35 | + { |
| 36 | + argsIgnorePattern: "^_", |
| 37 | + }, |
| 38 | + ], |
| 39 | + "@typescript-eslint/require-await": "off", |
| 40 | + "@typescript-eslint/no-misused-promises": [ |
| 41 | + "error", |
| 42 | + { |
| 43 | + checksVoidReturn: { |
| 44 | + attributes: false, |
| 45 | + }, |
| 46 | + }, |
| 47 | + ], |
| 48 | + "@typescript-eslint/prefer-nullish-coalescing": "warn", |
| 49 | + "@next/next/no-img-element": "off", |
| 50 | + }, |
| 51 | +}; |
| 52 | +module.exports = config; |
0 commit comments