forked from technologiestiftung/giessdenkiez-de
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
51 lines (50 loc) · 1.47 KB
/
.eslintrc.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
43
44
45
46
47
48
49
50
51
/* eslint-disable @typescript-eslint/no-var-requires */
const config = require('@inpyjamas/scripts/dist/config/eslint/typescript');
const { merge } = require('@inpyjamas/scripts/dist/utlities/merge');
module.exports = merge(config, {
env: {
'jest/globals': true,
node: true,
browser: true,
},
settings: {
react: {
version: 'detect',
},
},
// parser: 'babel-eslint',
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
modules: true,
jsx: true,
},
allowImportExportEverywhere: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
'plugin:jest/recommended',
'prettier',
],
rules: {
'require-top-level-describe': 'off',
'jest/no-hooks': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'react/prop-types': 'off',
'no-var': 'error',
'prettier/prettier': 'error',
'jest/consistent-test-it': [
'error',
{ fn: 'test', withinDescribe: 'test' },
],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
},
plugins: ['promise', 'react', 'jest', 'prettier', 'react-hooks'],
});