forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
64 lines (63 loc) · 1.93 KB
/
.eslintrc.cjs
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
const TAILWIND_DEFAULTS = {
callees: ['mergeClasses'],
classRegex: '^(confirmation|container|icon)?(c|C)lass(Name)?$',
};
module.exports = {
root: true,
extends: ['universe/web', 'plugin:prettier/recommended', 'plugin:@next/next/recommended'],
plugins: ['lodash'],
rules: {
'lodash/import-scope': [2, 'method'],
},
overrides: [
{
files: ['*.jsx', '*.tsx'],
extends: ['plugin:@next/next/recommended', 'plugin:tailwindcss/recommended'],
rules: {
'@next/next/no-img-element': 'off',
'react/jsx-curly-brace-presence': [1, { propElementValues: 'ignore' }],
// https://github.com/emotion-js/emotion/issues/2878
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'tailwindcss/classnames-order': 'off',
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
'tailwindcss/enforces-shorthand': 'warn',
'tailwindcss/no-arbitrary-value': 'off',
'tailwindcss/no-custom-classname': [
'warn',
{
whitelist: [
'diff-.+',
'react-player',
'dark-theme',
'dialog-.+',
'terminal-snippet',
'table-wrapper',
],
cssFiles: ['node_modules/@expo/styleguide/dist/global.css'],
...TAILWIND_DEFAULTS,
},
],
'tailwindcss/no-unnecessary-arbitrary-value': ['warn', TAILWIND_DEFAULTS],
},
},
{
files: ['*.js', '*.cjs', '*.ts'],
extends: ['universe/node'],
},
{
files: ['*.md', '*.mdx'],
extends: ['plugin:mdx/recommended'],
rules: {
'no-unused-expressions': 'off',
'no-useless-escape': 'off',
'no-irregular-whitespace': 'off',
'react/self-closing-comp': 'off',
},
},
{
files: ['**/*-test.[jt]s?(x)'],
plugins: ['testing-library'],
extends: ['plugin:testing-library/react'],
},
],
};