-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
30 lines (30 loc) · 989 Bytes
/
.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
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
rules: {
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/no-unused-vars": ["off"],
},
overrides: [
{
files: ["*.ts", "*.js"],
env: {
jest: true, // now **/*.test.js files' env has both es6 *and* jest
},
plugins: ["jest"],
rules: {
// typescript itself has a no-undef rule https://typescript-eslint.io/docs/linting/troubleshooting/
"no-undef": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md#configuring-in-a-mixed-jsts-codebase
"@typescript-eslint/explicit-module-boundary-types": 2,
},
},
],
};