forked from indico/indico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
84 lines (79 loc) · 2.42 KB
/
.eslintrc.yml
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
83
84
env:
browser: true
jquery: true
es6: true
jest/globals: true
plugins:
- react-hooks
- prettier
- jest
extends:
- 'indico'
- 'indico/babel'
- 'indico/react'
- 'indico/react-hooks'
- 'indico/prettier'
settings:
# we don't use the webpack resolver because it is SLOW (~1s),
# but our custom resolver does the job just fine while still
# being fast.
import/resolver:
alias:
map:
- ['indico/modules/core', './indico/modules/core/client/js']
- ['indico/modules/rb', './indico/modules/rb/client/js']
- ['indico/modules/users', './indico/modules/users/client/js']
- ['indico/modules/search', './indico/modules/search/client/js']
- ['indico/modules/events/reviewing', './indico/modules/events/client/js/reviewing']
- ['indico/modules/events/editing', './indico/modules/events/editing/client/js']
- ['indico/modules/events/management', './indico/modules/events/management/client/js']
- ['indico/modules/events/persons', './indico/modules/events/persons/client/js']
- ['indico/modules/events', './indico/modules/events/client/js']
- ['indico', './indico/web/client/js']
extensions: [.js, .jsx, .json]
import/internal-regex: ^indico/
react:
version: detect
rules:
curly:
- error
- all
import/no-unresolved:
- error
- ignore: ['^indico-url:']
import/no-cycle:
- warn
import/order:
- error
- groups: [builtin, external, internal, parent, sibling, index]
alphabetize:
order: asc
caseInsensitive: true
pathGroups:
- pattern: indico-url:*
group: external
position: before
- pattern: '{.,..,../..,../../..}/**/*.+(css|scss)' # eslint-plugin-import#1239
group: sibling
position: after
pathGroupsExcludedImportTypes: [builtin]
newlines-between: always
new-cap:
- error
- capIsNewExceptionPattern: '\$\.(Event|Deferred|Color)$'
prefer-template: warn
react/jsx-curly-brace-presence:
# remove this override once they fixed this rule (probably in the next update)
# check e.g. with indico/modules/rb/client/js/components/TimeInformation.jsx
# where it should NOT remove the `{', '}` since it's required for proper spacing
- error
- children: ignore
no-restricted-globals:
- error
- event
globals:
Indico: false
IndicoUI: false
global: false
require: false
process: false