This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
generated from E-Edu/microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
102 lines (102 loc) · 2.98 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
98
99
100
101
102
module.exports = {
env: {
browser: true,
es6: true,
'cypress/globals': true,
},
extends: [
'airbnb',
'prettier',
'prettier/react',
/*'prettier/@typescript-eslint',*/
/*'plugin:prettier/recommended',*/
'plugin:react/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
ignorePatterns: [
'node_modules/*',
'generated-sources/*',
'**/vendor/*.js',
'dist/*',
'.nuxt/*',
'.idea/*',
'logs/*',
'coverage/*',
'**/*.config.js',
'spec/**',
'**/*.scss',
'src/css/fonts',
'**/*.json',
'src/lib/schema.gql',
'src/lib/api/*',
'src/react-app-env.d.ts',
'src/store/*',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
'prettier',
'cypress',
'chai-friendly',
],
rules: {
'no-magic-numbers': 'warn',
'no-multi-spaces': 'error',
'no-script-url': 'error',
'prettier/prettier': ['error'],
'eqeqeq': ['error', 'always'],
'no-alert': 'error',
'no-empty-function': 'error',
'camelcase': ['error', { allow: ['de_DE', 'en_US'], ignoreImports: true }],
'no-console': 'error',
'no-debugger': 'error',
'react/jsx-indent': 'off',
'no-use-before-define': 'off',
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx', '.tsx'] }],
'import/extensions': 'off',
'import/no-unresolved': 'off',
'space-infix-ops': 'error',
'no-param-reassign': 'off',
'react/destructuring-assignment': 'off',
'react/no-unused-state': 'off',
'react/prefer-stateless-function': 'off',
'react/no-array-index-key': 'warn',
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': 'off',
'react/prop-types': 'off',
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'no-unused-expressions': 0,
'chai-friendly/no-unused-expressions': 2,
'jsx-a11y/click-events-have-key-events': 'off',
'react/jsx-tag-spacing': ['error', {
'closingSlash': 'never',
'afterOpening': 'never',
'beforeClosing': 'never',
'beforeSelfClosing': 'allow',
}],
'react/jsx-curly-spacing':'off',
'react/state-in-constructor': 'warn',
'@typescript-eslint/no-unused-vars': [
2,
{
'args': 'none',
}
],
'import/prefer-default-export': 'off',
'react/jsx-key':'warn',
},
};