forked from api-platform/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
82 lines (82 loc) · 2.31 KB
/
.eslintrc
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"root": true,
"parser": "babel-eslint",
"extends": [
"airbnb",
"airbnb/hooks",
"prettier",
"prettier/react"
],
"settings": {
"import/resolver": {
"alias": [
["@components", "./src/components"],
["@images", "./src/images"],
["@styles", "./src/styles"]
]
}
},
"plugins": ["prettier"],
"env": {
"browser": true,
"es6": true,
"node": true
},
"overrides": [
{
"files": ["**/*.tsx"],
"parser": "@typescript-eslint/parser",
"rules": {
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"]
},
"extends": [
"plugin:@typescript-eslint/recommended"
]
}
],
"rules": {
"prettier/prettier": ["error"],
"object-curly-newline": 0,
// We don't force static function
"class-methods-use-this": 0,
// We authorize import of assets
"import/no-extraneous-dependencies": 0,
// We authorize webpack alias
"import/no-unresolved": 0,
// We authorize skipping extensions
"import/extensions": 0,
// We use the 'import' plugin which allows for cases "flow" awareness.
"no-duplicate-imports": 0,
// We authorize _ for private variables
"no-underscore-dangle": 0,
// We authorize chained declaration
"one-var": 0,
// We only accept yoda style for conditions
"yoda": [2, "always"],
// A .jsx extension is not required for files containing jsx.
"react/jsx-filename-extension": 0,
// We authorize binded function
"react/jsx-no-bind": 0,
// We authorize props spreading.
"react/jsx-props-no-spreading": 0,
// This rule struggles with flow and class properties.
"react/sort-comp": 0,
// We authorize all kind of prop types
"react/forbid-prop-types": 0,
// We authorize no unused prop types
"react/no-unused-prop-types": 0,
// We authorize index keys
"react/no-array-index-key": 0,
// We authorize dynamic HTML in JSX
"react/no-danger": 0,
// We authorize empty anchor
"jsx-a11y/anchor-has-content": 0,
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/anchor-is-valid": 0
}
}