-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.mjs
More file actions
65 lines (64 loc) · 1.36 KB
/
eslint.config.mjs
File metadata and controls
65 lines (64 loc) · 1.36 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettier from "eslint-plugin-prettier";
import eslintConfigPrettier from "eslint-config-prettier";
import globals from "globals";
export default tseslint.config(
{
ignores: [
"**/dist",
"test/*/.next/**",
"test/sourceMapPath/built/index.js",
"test/sourceMapPath/built/index-esm.mjs",
],
},
eslint.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.stylistic,
eslintConfigPrettier,
{
plugins: { prettier },
languageOptions: {
globals: {
...globals.es2021,
...globals.node,
},
},
rules: {
"prettier/prettier": "error",
"no-console": "error",
},
},
{
files: ["test/**"],
rules: {
"no-console": "off",
"@typescript-eslint/no-require-imports": "off",
},
},
{
files: ["test/httpClient/**", "test/jest/**"],
languageOptions: {
globals: globals.jest,
},
},
{
files: ["test/mocha/**"],
languageOptions: {
globals: globals.mocha,
},
},
{
files: ["**/*.{ts,tsx}"],
extends: [
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
);