forked from fremtind/jokul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
33 lines (33 loc) · 1.16 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
module.exports = {
env: {
jest: true,
},
globals: {
page: true,
browser: true,
context: true,
},
settings: {
react: {
version: require("./package.json").dependencies.react,
},
},
parser: "@typescript-eslint/parser",
plugins: ["jsx-a11y"],
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:jsx-a11y/recommended",
],
parserOptions: { ecmaVersion: 2018, sourceType: "module" },
rules: {
"@typescript-eslint/no-empty-interface": [
"error",
{ allowSingleExtends: true }, // In some case you want to extend an empty interface. Example: "interface Props extends RouteComponentProps"
],
"@typescript-eslint/explicit-function-return-type": 0, // Explicit function return type becomes very annoying for React Function Components
"@typescript-eslint/no-use-before-define": ["error", { functions: false }],
"@typescript-eslint/ban-ts-ignore": 0, // We use ts-ignore for modules that don't have type definition files
},
};