forked from styletron/styletron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (55 loc) · 1.4 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
module.exports = {
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 2017,
jsx: true,
},
extends: [
require.resolve("eslint-config-cup"),
require.resolve("eslint-config-cup-recommended"),
],
plugins: [
"eslint-plugin-flowtype",
"eslint-plugin-react",
"eslint-plugin-prettier",
],
rules: {
"flowtype/define-flow-type": 1,
"prettier/prettier": [
"error",
{},
{
usePrettierrc: true,
},
],
"no-unused-vars": ["error", {argsIgnorePattern: "^_"}],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
},
overrides: [
{
"files": [
"**/*.ts",
"**/*.tsx",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
},
"plugins": ["@typescript-eslint"],
"rules": {
// should be replaced with @typescript-eslint/no-unused-vars,
// but there is apparently a bug when importing type namespaces
"no-unused-vars": "off",
"no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error",
// cup does not support typescript
"cup/no-undef": "off",
// todo: weird rule… should "void 0" be used instead?
"no-undefined": "off",
// does not work correctly for function type annotations
"no-shadow": "off"
}
}
],
};