-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjsx.mjs
50 lines (42 loc) · 1.05 KB
/
jsx.mjs
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
import stylistic from '@stylistic/eslint-plugin'
import { NORMAL_STYLISTIC_CUSTOMIZE_OPTIONS } from '../constants.mjs'
export default [
stylistic.configs.customize({
...NORMAL_STYLISTIC_CUSTOMIZE_OPTIONS,
jsx: true,
}),
{
rules: {
'@stylistic/jsx-curly-brace-presence': [
1,
{
props: 'never',
children: 'never',
propElementValues: 'always',
},
],
'@stylistic/jsx-first-prop-new-line': [1, 'multiline'],
'@stylistic/jsx-one-expression-per-line': [1, { allow: 'non-jsx' }],
'@stylistic/jsx-props-no-multi-spaces': [1],
'@stylistic/jsx-self-closing-comp': [
1,
{
component: true,
html: true,
},
],
'@stylistic/jsx-sort-props': [
1,
{
ignoreCase: false,
shorthandFirst: true,
shorthandLast: false,
callbacksLast: true,
multiline: 'ignore',
noSortAlphabetically: false,
reservedFirst: true,
},
],
},
},
]