-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
97 lines (96 loc) · 3 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended',
'plugin:import/typescript',
],
plugins: ['@typescript-eslint', 'prettier', 'import'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
globals: {
Class: true,
Event: true,
jest: true,
},
env: {
jest: true,
browser: true,
},
rules: {
'prettier/prettier': 2,
'no-mixed-operators': 0,
'no-console': 2,
'import/default': 2,
'import/export': 2,
'import/named': 2,
'import/no-duplicates': 2,
'import/no-webpack-loader-syntax': 0,
'import/no-internal-modules': 0,
'import/no-named-as-default-member': 2,
'import/no-named-as-default': 0,
'import/no-named-default': 2,
'import/no-extraneous-dependencies': [
2,
{
devDependencies: true,
optionalDependencies: true,
peerDependencies: true,
},
],
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'import/order': [1, { 'newlines-between': 'always-and-inside-groups' }],
'max-lines-per-function': 0,
'prefer-const': 0,
'sort-imports': 0,
'sort-vars': 0,
// These rules are never needed when using Prettier
'array-bracket-newline': 0,
'array-bracket-spacing': 0,
'array-element-newline': 0,
'arrow-parens': 0,
'arrow-spacing': 0,
'block-spacing': 0,
'brace-style': 0,
'comma-dangle': 0,
'comma-spacing': 0,
'comma-style': 0,
'computed-property-spacing': 0,
camelcase: 0,
'dot-location': 0,
'eol-last': 0,
'func-call-spacing': 0,
'function-paren-newline': 0,
'generator-star': 0,
'generator-star-spacing': 0,
'implicit-arrow-linebreak': 0,
// note you must disable the base rule as it can report incorrect errors
// @SEE: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 0,
},
overrides: [
{
files: ['integration-test/**/*', '**/_common/**/*'],
rules: { 'import/no-extraneous-dependencies': ['off'] },
},
],
settings: {
'import/resolver': {
typescript: {},
},
},
};