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',
|
|
|
|
},
|
|
|
|
},
|
2021-09-29 12:49:29 +02:00
|
|
|
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier'],
|
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
|
|
|
},
|
2021-10-20 15:40:06 +02:00
|
|
|
plugins: ['prettier', 'react', 'react-hooks', '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-10-26 11:45:57 +01:00
|
|
|
'react/self-closing-comp': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
component: true,
|
|
|
|
html: true,
|
|
|
|
},
|
|
|
|
],
|
2021-10-20 15:40:06 +02:00
|
|
|
'react-hooks/rules-of-hooks': 'warn',
|
|
|
|
'react-hooks/exhaustive-deps': 'warn',
|
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',
|
2021-02-09 18:11:53 +01:00
|
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
2021-05-31 13:17:53 +02:00
|
|
|
'no-shadow': 'error',
|
2021-07-01 04:27:36 +02:00
|
|
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
2020-11-25 17:46:49 +01:00
|
|
|
curly: 'error',
|
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: {
|
2021-01-13 00:46:59 +01:00
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
2020-07-08 09:45:23 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-05-13 14:17:00 +02:00
|
|
|
}
|