forked from indico/indico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
101 lines (95 loc) · 2.72 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
env:
browser: true
jquery: true
es6: true
jest/globals: true
plugins:
- react-hooks
- prettier
- jest
- '@typescript-eslint'
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']
- ['axios/unsafe', './node_modules/axios/lib']
extensions: [.js, .jsx, .json, .ts, .tsx]
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/no-unknown-property:
- error
- ignore: [styleName]
no-restricted-globals:
- error
- event
overrides:
- files:
- indico/web/client/js/react/components/**/*
- indico/web/client/js/react/forms/final-form.jsx
- indico/modules/rb/**/*
rules:
import/no-cycle: off
- files:
- '**/*.ts'
- '**/*.tsx'
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
extends:
- 'plugin:@typescript-eslint/strict'
- 'plugin:@typescript-eslint/stylistic'
- 'plugin:import/typescript'
globals:
Indico: false
IndicoUI: false
global: false
require: false
process: false