|
| 1 | +import eslint from "@eslint/js"; |
| 2 | +import tseslint from "typescript-eslint"; |
| 3 | + |
| 4 | +export default tseslint.config( |
| 5 | + { |
| 6 | + ignores: ["node_modules/", "out/", "dist/", "*.vsix", ".vscode-test/"] |
| 7 | + }, |
| 8 | + |
| 9 | + eslint.configs.recommended, |
| 10 | + |
| 11 | + ...tseslint.configs.recommended, |
| 12 | + |
| 13 | + { |
| 14 | + files: ["src/**/*.ts"], |
| 15 | + rules: { |
| 16 | + "@typescript-eslint/no-unused-vars": [ |
| 17 | + "warn", |
| 18 | + { |
| 19 | + argsIgnorePattern: "^_", |
| 20 | + varsIgnorePattern: "^_", |
| 21 | + caughtErrorsIgnorePattern: "^_" |
| 22 | + } |
| 23 | + ], |
| 24 | + "@typescript-eslint/no-explicit-any": "warn", |
| 25 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 26 | + "@typescript-eslint/no-non-null-assertion": "warn", |
| 27 | + "@typescript-eslint/consistent-type-imports": "warn", |
| 28 | + |
| 29 | + "no-console": "off", |
| 30 | + "no-debugger": "error", |
| 31 | + "prefer-const": "warn", |
| 32 | + "no-var": "error", |
| 33 | + eqeqeq: ["error", "always"], |
| 34 | + "no-return-await": "error", |
| 35 | + "require-await": "warn" |
| 36 | + } |
| 37 | + }, |
| 38 | + |
| 39 | + { |
| 40 | + files: ["src/tests/*.test.ts"], |
| 41 | + rules: { |
| 42 | + "@typescript-eslint/no-explicit-any": "off", |
| 43 | + "@typescript-eslint/no-non-null-assertion": "off" |
| 44 | + } |
| 45 | + } |
| 46 | +); |
0 commit comments