-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
39 lines (39 loc) · 1.08 KB
/
.eslintrc.cjs
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
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['formatjs', 'react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'formatjs/enforce-default-message': 'error',
'formatjs/enforce-description': 'error',
'formatjs/no-complex-selectors': [
'error',
{
limit: 3,
},
],
'formatjs/no-id': 'error',
'formatjs/no-literal-string-in-jsx': 'warn',
'react-refresh/only-export-components': 'warn',
'no-unused-vars': ['warn', { args: 'none' }],
'react/prop-types': 'off',
'react/jsx-key': 'warn',
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-constant-condition': 'warn',
'require-await': 'warn',
},
overrides: [
{
files: ['*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
},
],
};