-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
41 lines (40 loc) · 1.25 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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import prettier from "eslint-plugin-prettier";
import eslintConfigLove from "eslint-config-love";
export default [
{
languageOptions: {
globals: globals.node,
ecmaVersion: "latest",
sourceType: "module",
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
},
},
},
pluginJs.configs.recommended,
tseslint.configs.recommended,
eslintConfigLove, // use eslint-config-love
prettier.configs.recommended,
{
ignores: ["node_modules/", "dist/", "jest.config.ts", "src/**/*.test.ts"],
rules: {
"prettier/prettier": "error",
camelcase: "error",
"spaced-comment": "error",
quotes: ["error", "single"],
"no-duplicate-imports": "error",
"no-unused-vars": "off",
"no-magic-numbers": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-magic-numbers": "error",
},
},
];