-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
27 lines (25 loc) · 854 Bytes
/
Copy patheslint.config.js
File metadata and controls
27 lines (25 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
export default defineConfig([
{ ignores: ["vitest.config.ts", "dist/", "coverage/"] },
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"] },
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], languageOptions: { globals: globals.node } },
tseslint.configs.recommended,
{
files: ["**/*.{ts,tsx,mts,cts}"],
plugins: { "@typescript-eslint": tseslint.plugin },
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: process.cwd(),
},
},
rules: {
...tseslint.configs.recommended.rules,
"@typescript-eslint/no-floating-promises": "error",
},
},
]);