-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
60 lines (60 loc) · 2.03 KB
/
.eslintrc.js
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
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
project: "./tsconfig.json",
},
parser: "@typescript-eslint/parser",
env: {
es6: true,
node: true,
},
plugins: ["@typescript-eslint", "simple-import-sort", "node"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:node/recommended-module",
],
rules: {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"sort-imports": "off",
"import/order": "off",
"node/no-missing-require": "off",
"node/no-missing-import": "off",
"node/no-extraneous-import": "off",
"node/no-extraneous-require": "off",
"node/no-unsupported-features/es-syntax": "off",
// Not needed, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/typedef.md#when-not-to-use-it
"@typescript-eslint/typedef": "off",
"import/no-default-export": "error",
"import/no-unresolved": "off",
// Fixes this warning for TS, https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
"no-unused-vars": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
"no-undef": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
},
{
files: ["src/commands/**/*.ts"],
rules: {
"import/no-default-export": "off",
},
},
],
};