-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
89 lines (89 loc) · 3.18 KB
/
.eslintrc.cjs
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: [
"./.examples/tic-tac-toe/tsconfig.json",
"./tsconfig.tsup.json",
"./tsconfig.base.json",
"./packages/commitlint-config/tsconfig.json",
"./packages/sandbox/tsconfig.tsup.json",
"./packages/sandbox/tsconfig.json",
"./packages/logger/tsconfig.json",
"./packages/logger/tsconfig.tsup.json",
"./packages/eslint-plugin-theseus/tsconfig.json",
"./tsconfig.json",
],
ecmaVersion: 2018,
sourceType: "module",
tsconfigRootDir: "./",
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:theseus/recommended",
"plugin:require-extensions/recommended",
],
settings: {
"import/resolver": {
node: {
paths: ["eslint-rules"],
},
},
},
plugins: ["unused-imports", "@stylistic", "require-extensions"],
rules: {
indent: ["error", "tab", { SwitchCase: 1 }],
quotes: [2, "double", { avoidEscape: true }],
"unused-imports/no-unused-imports": "error",
"no-async-promise-executor": "off",
"@stylistic/object-property-newline": ["error"],
"@stylistic/object-curly-newline": [
"error",
{
ObjectExpression: { multiline: true, minProperties: 1 },
ObjectPattern: { multiline: true, minProperties: 3 },
ImportDeclaration: { multiline: true, minProperties: 3 },
ExportDeclaration: { multiline: true, minProperties: 2 },
},
],
"@typescript-eslint/no-floating-promises": [
"error",
{
checkThenables: true,
},
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
semi: ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
"array-bracket-spacing": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"max-len": ["error", { code: 180, ignoreUrls: true, ignoreTemplateLiterals: true, ignoreStrings: true }],
"arrow-parens": ["error", "always"],
"no-tabs": "off", // Since you're using tabs
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
"keyword-spacing": ["error", { before: true, after: true }],
"brace-style": ["error", "allman", { allowSingleLine: true }],
},
overrides: [
{
files: ["**/*.test.ts"],
rules: {
"@typescript-eslint/no-unused-vars": ["off"],
},
},
],
};