forked from opencollective/opencollective-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
36 lines (36 loc) · 1.06 KB
/
.eslintrc.json
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
{
"extends": ["plugin:@typescript-eslint/recommended", "plugin:import/typescript", "opencollective"],
"parser": "@typescript-eslint/parser",
"env": { "mocha": true },
"plugins": ["mocha"],
"rules": {
// console logs are OK in Node
"no-console": "off",
"mocha/no-exclusive-tests": "error",
// use es6 module imports and exports
"import/no-commonjs": "error",
// common warnings in the codebase
"no-process-exit": "off",
"node/shebang": "off",
"no-useless-escape": "off",
// relaxing because we have many errors
"require-atomic-updates": "warn",
// typescript
"node/no-missing-import": ["error", { "tryExtensions": [".js", ".ts"] }]
},
// Disable typescript checks in JS
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/indent": "off"
}
}
],
"settings": {
// Ignore .d.ts files for import (they just define the types)
"import/ignore": [".d.ts$"]
}
}