-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
67 lines (67 loc) · 2.27 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
61
62
63
64
65
66
67
module.exports = {
env: {
es2021: true,
jest: true,
node: true,
},
// Unless you have a good reason, keep `extends` in the given order
extends: [
"eslint:recommended",
// Overrides the settings from above ^ which don't apply to Typescript
// Keep these 3 in the same order
// "plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:promise/recommended",
// "airbnb-base",
// "airbnb-typescript/base",
// Overrides AirBnB styles; keep in this order
// "plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.eslint.json",
ecmaVersion: 2021,
},
plugins: ["@typescript-eslint/eslint-plugin", "deprecation" /*"prettier"*/],
rules: {
// // "@typescript-eslint/explicit-function-return-type": "off",
// // "@typescript-eslint/explicit-module-boundary-types": "off",
// // "@typescript-eslint/camelcase": "off",
// "deprecation/deprecation": "warn",
// // This is overridden from AirBnB's guide, since they (subjectively) ban for..of loops.
// // https://github.com/airbnb/javascript/issues/1122#issuecomment-267580623
// "no-restricted-syntax": [
// "error",
// {
// selector: "ForInStatement",
// message:
// "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
// },
// ],
// "no-underscore-dangle": "off",
// "no-continue": "off",
// "prefer-destructuring": "off",
},
overrides: [
{
files: ["*.js", "*.ts"],
rules: {
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
allowExpressions: true,
},
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-ts-comment": "warn",
// We disable the base rule so it doesn't interfere w/ the TS one
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
// Ignore this rule for variables starting with an underscore (eg. _ignoreme)
{ varsIgnorePattern: "^_" },
],
},
},
],
};