2019-05-29 12:16:40 +02:00
|
|
|
module.exports = {
|
|
|
|
parser: 'babel-eslint',
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
|
|
|
'plugin:redux-saga/recommended',
|
2019-07-08 20:27:38 +02:00
|
|
|
|
2019-05-29 12:16:40 +02:00
|
|
|
'prettier',
|
|
|
|
],
|
2019-07-08 20:27:38 +02:00
|
|
|
plugins: ['react', 'redux-saga', 'react-hooks'],
|
2019-05-29 12:16:40 +02:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
commonjs: true,
|
|
|
|
es6: true,
|
|
|
|
node: true,
|
|
|
|
jest: true,
|
2019-05-29 16:08:43 +02:00
|
|
|
mocha: true,
|
2019-05-29 12:16:40 +02:00
|
|
|
},
|
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 2018,
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
|
|
|
// all readonly
|
|
|
|
globals: {
|
|
|
|
strapi: false,
|
|
|
|
window: false,
|
|
|
|
cy: false,
|
|
|
|
Cypress: false,
|
|
|
|
expect: false,
|
|
|
|
assert: false,
|
|
|
|
chai: false,
|
2019-05-29 16:08:43 +02:00
|
|
|
// TODO: put all this in process.env in webpack to avoid having to set them here
|
|
|
|
REMOTE_URL: true,
|
|
|
|
BACKEND_URL: true,
|
|
|
|
PUBLIC_PATH: true,
|
|
|
|
MODE: true,
|
|
|
|
NODE_ENV: true,
|
2019-05-29 12:16:40 +02:00
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'generator-star-spacing': 0,
|
|
|
|
'no-console': 0,
|
2019-07-19 11:58:20 +02:00
|
|
|
'require-atomic-updates': 0,
|
2019-07-08 20:27:38 +02:00
|
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
|
|
'react-hooks/exhaustive-deps': 'warn',
|
2019-05-29 12:16:40 +02:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: '16.5.2',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|