2020-07-08 09:45:23 +02:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
/* global module */
|
|
|
|
|
2020-05-13 14:17:00 +02:00
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
es6: true,
|
2020-06-08 20:34:39 +02:00
|
|
|
'cypress/globals': true,
|
2020-05-13 14:17:00 +02:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect',
|
|
|
|
},
|
|
|
|
},
|
2020-07-28 22:25:24 +02:00
|
|
|
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier/@typescript-eslint'],
|
2020-05-13 14:17:00 +02:00
|
|
|
globals: {
|
|
|
|
Atomics: 'readonly',
|
|
|
|
SharedArrayBuffer: 'readonly',
|
|
|
|
},
|
2020-07-17 19:57:42 +02:00
|
|
|
parser: '@typescript-eslint/parser',
|
2020-05-13 14:17:00 +02:00
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
2020-07-28 22:25:24 +02:00
|
|
|
ecmaVersion: 2018,
|
|
|
|
sourceType: 'module',
|
2020-05-13 14:17:00 +02:00
|
|
|
},
|
2020-07-08 09:45:23 +02:00
|
|
|
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint'],
|
2020-05-13 14:17:00 +02:00
|
|
|
rules: {
|
|
|
|
'react/prop-types': [0],
|
|
|
|
'react/no-unescaped-entities': [0],
|
2020-08-27 14:34:11 +02:00
|
|
|
'react/jsx-no-target-blank': [0],
|
2020-05-13 14:17:00 +02:00
|
|
|
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
|
2020-07-08 09:45:23 +02:00
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
2020-07-28 22:25:24 +02:00
|
|
|
'@typescript-eslint/no-inferrable-types': 'off',
|
2020-05-13 14:17:00 +02:00
|
|
|
},
|
2020-07-08 09:45:23 +02:00
|
|
|
overrides: [
|
2020-07-28 22:25:24 +02:00
|
|
|
{
|
|
|
|
// enable the rule specifically for TypeScript files
|
|
|
|
files: ['*Type.ts', '*Type.tsx'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/no-explicit-any': ['off'],
|
|
|
|
'@typescript-eslint/ban-types': ['off'],
|
|
|
|
},
|
|
|
|
},
|
2020-07-08 09:45:23 +02:00
|
|
|
{
|
|
|
|
// enable the rule specifically for TypeScript files
|
|
|
|
files: ['*.ts', '*.tsx'],
|
|
|
|
rules: {
|
2020-07-28 22:25:24 +02:00
|
|
|
'@typescript-eslint/no-explicit-any': ['off'],
|
|
|
|
'@typescript-eslint/explicit-function-return-type': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
allowExpressions: true,
|
|
|
|
},
|
|
|
|
],
|
2020-10-14 10:42:06 +02:00
|
|
|
'@typescript-eslint/explicit-module-boundary-types': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
allowArgumentsExplicitlyTypedAsAny: true,
|
|
|
|
},
|
|
|
|
],
|
2020-07-08 09:45:23 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['*.js'],
|
|
|
|
rules: {
|
|
|
|
'typescript/no-var-requires': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-05-13 14:17:00 +02:00
|
|
|
}
|