-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
46 lines (45 loc) · 1.05 KB
/
eslint.config.mjs
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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import jest from "eslint-plugin-jest";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
{
ignores: [
"node_modules/",
"dist/",
"build/",
"coverage/",
"src/globals.d.ts",
"*.config.js",
],
},
{
files: [
"src/**/*.{js,mjs,cjs,ts}",
"src/*.{js,mjs,cjs,ts}",
"src/__tests__/**/*.{js,mjs,cjs,ts}",
],
},
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/__tests__/**/*.{js,mjs,cjs,ts}"],
...jest.configs["flat/recommended"],
// Jest Rules
rules: {
...jest.configs["flat/recommended"].rules,
"jest/prefer-expect-assertions": "off",
},
},
// Eslint Rules
{
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
// Prettier
eslintConfigPrettier,
];