generated from spknetwork/js-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
50 lines (50 loc) · 2.13 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
40
41
42
43
44
45
46
47
48
49
50
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md
// TODO - we want react hooks / exhaustive deps eslint rule...figure out why I have to import to get those
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
plugins: ['@typescript-eslint', 'prettier', 'unused-imports'],
ignorePatterns: ['**/*.test.ts', '**/*.spec.ts'],
rules: {
'prettier/prettier': 'warn',
'@typescript-eslint/camelcase': 'off',
'unused-imports/no-unused-imports-ts': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/unbound-method': 'off',
'prefer-const': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'no-async-promise-executor': 'warn',
'no-empty': 'warn',
'no-prototype-builtins': 'off',
},
}