-
Notifications
You must be signed in to change notification settings - Fork 35
/
.eslintrc.js
74 lines (74 loc) · 1.88 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
74
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: 'seek',
plugins: ['jsdoc', 'unicorn'],
rules: {
'jsdoc/check-alignment': 2,
'jsdoc/check-types': 2,
'jsdoc/no-multi-asterisks': ['error', { allowWhitespace: true }],
'jsdoc/require-asterisk-prefix': ['error', 'always'],
'no-console': 'off',
'no-process-exit': 'off',
'no-sync': 'off',
'import/no-unresolved': [
'error',
{
commonjs: true,
amd: true,
ignore: [
'__sku_alias__renderEntry',
'__sku_alias__serverEntry',
'__sku_alias__clientEntry',
'__sku_alias__webpackStats',
],
},
],
'one-var': ['error', 'never'],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'unicorn/prefer-node-protocol': 'error',
},
settings: {
// react isn't a dependency of the monorepo, so we need to tell ESLint which version to use
react: {
version: require('./packages/sku/node_modules/react/package.json')
.version,
},
'import/resolver': {
node: {
moduleDirectory: ['node_modules'],
},
},
},
overrides: [
{
files: ['tests/**', 'test-utils/**'],
env: {
jest: true,
},
globals: {
browser: true,
},
},
],
globals: {
__SKU_SRC_PATHS_0__: true,
__SKU_SRC_PATHS_1__: true,
__SKU_SRC_PATHS_2__: true,
__SKU_SRC_PATHS_3__: true,
__SKU_SRC_PATHS_4__: true,
__SKU_SRC_PATHS_5__: true,
__SKU_SRC_PATHS_6__: true,
__SKU_SRC_PATHS_7__: true,
__SKU_SRC_PATHS_8__: true,
__SKU_SRC_PATHS_9__: true,
__SKU_CLIENT_PATH__: true,
__SKU_PUBLIC_PATH__: true,
__SKU_CSP__: true,
__SKU_DEV_HTTPS__: true,
__SKU_DEV_MIDDLEWARE_ENABLED__: true,
__SKU_DEV_MIDDLEWARE_PATH__: true,
__SKU_LIBRARY_NAME__: true,
__SKU_LIBRARY_FILE__: true,
},
};