|
| 1 | +import typescriptEslint from "@typescript-eslint/eslint-plugin"; |
| 2 | +import typescriptParser from "@typescript-eslint/parser"; |
| 3 | +import pluginPrettierRecommended from "eslint-plugin-prettier/recommended"; |
| 4 | +import globals from "globals"; |
| 5 | +import {join} from "node:path"; |
| 6 | + |
| 7 | +export default [ |
| 8 | + { |
| 9 | + ignores: [ |
| 10 | + "**/coverage", |
| 11 | + "**/lib", |
| 12 | + "**/dist", |
| 13 | + "processes.config.js", |
| 14 | + "**/snapshots", |
| 15 | + "**/templates", |
| 16 | + "**/docs/**", |
| 17 | + "**/docs-references/**" |
| 18 | + ] |
| 19 | + }, |
| 20 | + { |
| 21 | + files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"], |
| 22 | + languageOptions: { |
| 23 | + ecmaVersion: "latest", |
| 24 | + sourceType: "module", |
| 25 | + parser: typescriptParser, |
| 26 | + parserOptions: { |
| 27 | + ecmaVersion: "latest", |
| 28 | + sourceType: "module", |
| 29 | + tsconfigRootDir: join(import.meta.dirname, "tsconfig.eslint.json") |
| 30 | + }, |
| 31 | + globals: { |
| 32 | + ...globals.node |
| 33 | + } |
| 34 | + }, |
| 35 | + plugins: { |
| 36 | + "@typescript-eslint": typescriptEslint |
| 37 | + }, |
| 38 | + rules: { |
| 39 | + "@typescript-eslint/ban-ts-comment": 0, |
| 40 | + "@typescript-eslint/camelcase": 0, |
| 41 | + "@typescript-eslint/no-inferrable-types": 0, |
| 42 | + "@typescript-eslint/explicit-function-return-type": 0, |
| 43 | + "@typescript-eslint/explicit-module-boundary-types": 0, |
| 44 | + "@typescript-eslint/no-unused-vars": 0, |
| 45 | + "@typescript-eslint/no-explicit-any": 0, |
| 46 | + "@typescript-eslint/no-non-null-assertion": 0 |
| 47 | + } |
| 48 | + }, |
| 49 | + // { |
| 50 | + // files: ["**/*.spec.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"], // or any other pattern |
| 51 | + // ignores: ["docs/**", "docs-references/**"], |
| 52 | + // plugins: { |
| 53 | + // vitest |
| 54 | + // }, |
| 55 | + // rules: { |
| 56 | + // ...vitest.configs.recommended.rules, // you can also use vitest.configs.all.rules to enable all rules |
| 57 | + // "vitest/consistent-test-it": ["error", {fn: "it", withinDescribe: "it"}], |
| 58 | + // "vitest/no-alias-methods": "error", |
| 59 | + // "vitest/expect-expect": "off" |
| 60 | + // } |
| 61 | + // }, |
| 62 | + pluginPrettierRecommended |
| 63 | +]; |
0 commit comments