-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
44 lines (44 loc) · 1.4 KB
/
Copy path.eslintrc.js
File metadata and controls
44 lines (44 loc) · 1.4 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
module.exports = {
env: {
browser: false,
es2021: true,
},
plugins: ["node", "prettier", "@typescript-eslint"],
extends: [
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:node/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
project: "./tsconfig.eslint.json",
},
rules: {
"prettier/prettier": ["warn"],
indent: 0, // avoid conflict with prettier's indent system
"linebreak-style": ["error", "unix"],
quotes: ["error", "double", { avoidEscape: true }],
semi: ["error", "always"],
curly: ["error", "all"],
"spaced-comment": ["error", "always", { exceptions: ["-", "+"] }],
"no-console": 2,
camelcase: "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-var-requires": "off",
"node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
// Disable warnings for { a, b, ...rest } variables, since this is typically used to remove variables.
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }],
"no-duplicate-imports": "error",
// "require-await": "error",
"@typescript-eslint/no-floating-promises": ["error"],
},
settings: {
node: {
tryExtensions: [".js", ".ts"],
},
},
overrides: [],
};