forked from strapi/strapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.front.js
42 lines (42 loc) · 904 Bytes
/
.eslintrc.front.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
module.exports = {
parser: '@babel/eslint-parser',
extends: ['@strapi/eslint-config/front'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
mocha: true,
},
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
globals: {
strapi: false,
window: false,
cy: false,
Cypress: false,
expect: false,
assert: false,
chai: false,
ENABLED_EE_FEATURES: false,
// TODO: put all this in process.env in webpack to avoid having to set them here
ADMIN_PATH: true,
BACKEND_URL: true,
PUBLIC_PATH: true,
NODE_ENV: true,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/jsx-no-constructed-context-values': 'warn',
'react/jsx-no-useless-fragment': 'warn',
'react/no-unstable-nested-components': 'warn',
},
};