forked from antonarbus/web-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
39 lines (39 loc) · 1.29 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 = {
root: true,
env: { browser: true, es2020: true },
extends: [
'standard-with-typescript',
'prettier',
],
ignorePatterns: [
'dist',
'build',
'.eslintrc.cjs',
'vite.config.ts',
'node_modules',
'test-setup.ts',
],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@typescript-eslint'],
parserOptions: {
project: ['./tsconfig.json'],
ecmaFeatures: { jsx: true },
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
},
rules: {
'jsx-quotes': ['error', 'prefer-single'],
'no-console': ['error', { allow: ['error', 'warn', 'info'] }], // no console.log(), but allow console.error/warn()
'comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/no-misused-promises': [ 'error', { checksVoidReturn: false }],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
}