forked from uber/baseweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
73 lines (73 loc) · 1.72 KB
/
.eslintrc.js
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
module.exports = {
parser: 'babel-eslint',
plugins: [
'flowtype',
'eslint-plugin-react',
'eslint-plugin-import',
'header',
'jsx-a11y',
],
env: {
jest: true,
},
globals: {
page: true,
browser: true,
context: true,
jestPuppeteer: true,
},
extends: [
'plugin:flowtype/recommended',
'plugin:react/recommended',
require.resolve('eslint-config-uber-universal-stage-3'),
'plugin:jsx-a11y/recommended',
],
rules: {
// Enforce flow file declarations
'flowtype/require-valid-file-annotation': ['error', 'always'],
'flowtype/no-weak-types': ['error'],
'flowtype/space-after-type-colon': 'off',
'react/jsx-filename-extension': 0,
'react/prop-types': 0,
// Enforces imports of external modules to be declared in the package.json
'import/no-extraneous-dependencies': [
'error',
{optionalDependencies: false, devDependencies: true},
],
'import/extensions': ['error', 'always', {ignorePackages: true}],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
},
],
'import/prefer-default-export': ['off'],
'header/header': [2, 'LICENSE-HEAD'],
},
overrides: [
{
files: ['*.test.js'],
rules: {
'flowtype/no-weak-types': 'off',
},
},
{
files: ['documentation-site/**/*.js'],
rules: {
'import/extensions': 'off',
'react/display-name': 'off',
},
},
{
files: [
'packages/eslint-plugin-baseui/**/*.js',
'packages/baseweb-vscode-extension/**/*.js',
],
rules: {
'flowtype/require-valid-file-annotation': 'off',
},
},
],
};