2019-12-16 12:17:37 -05:00
|
|
|
module.exports = {
|
|
|
|
parser: 'babel-eslint',
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
|
|
|
'plugin:cypress/recommended',
|
|
|
|
'prettier/react',
|
|
|
|
'prettier/babel',
|
|
|
|
'prettier',
|
|
|
|
],
|
|
|
|
env: {
|
|
|
|
es6: true,
|
|
|
|
browser: true,
|
|
|
|
node: true,
|
|
|
|
jest: true,
|
|
|
|
'cypress/globals': true,
|
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
NETLIFY_CMS_VERSION: false,
|
|
|
|
NETLIFY_CMS_APP_VERSION: false,
|
|
|
|
NETLIFY_CMS_CORE_VERSION: false,
|
|
|
|
CMS_ENV: false,
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'no-console': [0],
|
|
|
|
'react/prop-types': [0],
|
|
|
|
'no-duplicate-imports': 'error',
|
|
|
|
'emotion/no-vanilla': 'error',
|
|
|
|
'emotion/import-from-emotion': 'error',
|
|
|
|
'emotion/styled-import': 'error',
|
2019-12-18 18:16:02 +02:00
|
|
|
'require-atomic-updates': [0],
|
|
|
|
'object-shorthand': ['error', 'always'],
|
2019-12-16 12:17:37 -05:00
|
|
|
},
|
|
|
|
plugins: ['babel', 'emotion', 'cypress'],
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect',
|
|
|
|
},
|
|
|
|
},
|
2019-12-18 18:16:02 +02:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.ts', '*.tsx'],
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
|
|
|
'plugin:cypress/recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'prettier/@typescript-eslint',
|
|
|
|
'plugin:import/errors',
|
|
|
|
'plugin:import/warnings',
|
|
|
|
'plugin:import/typescript',
|
|
|
|
],
|
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 2018,
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'require-atomic-updates': [0],
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 0,
|
|
|
|
'@typescript-eslint/no-use-before-define': [
|
|
|
|
'error',
|
|
|
|
{ functions: false, classes: true, variables: true },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2019-12-16 12:17:37 -05:00
|
|
|
};
|