forked from graphile/crystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
75 lines (72 loc) · 1.9 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
//project: 'tsconfig.json',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
//'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'prettier/@typescript-eslint',
'prettier/react',
],
plugins: ['jest'],
env: {
jest: true,
node: true,
es6: true,
},
globals: {
jasmine: false,
},
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
},
],
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
args: 'after-used',
ignoreRestSiblings: true,
},
],
'no-confusing-arrow': 0,
'no-else-return': 0,
'no-underscore-dangle': 0,
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'jest/no-focused-tests': 2,
'jest/no-identical-title': 2,
// Rules that we should enable:
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/no-inferrable-types': 'warn',
'no-inner-declarations': 'warn',
},
overrides: [
// Rules for tests only
{
files: ['**/__tests__/**/*.{js,ts}'],
rules: {
// Disable these to enable faster test writing
'prefer-const': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
// We don't normally care about race conditions in tests
'require-atomic-updates': 'warn',
},
},
],
};