-
Notifications
You must be signed in to change notification settings - Fork 22
/
.eslintrc.js
68 lines (68 loc) · 1.7 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
module.exports = {
root: true,
parserOptions: {
project: ['tsconfig.json', 'tsconfig.eslint.json'],
tsconfigRootDir: __dirname,
},
env: {
node: true,
browser: true,
jasmine: true,
},
globals: {
_: false,
cy: false,
inject: false,
angular: false,
Cypress: false,
Promise: false,
},
extends: ['plugin:@bitrise/config'],
plugins: ['jasmine', 'lodash'],
rules: {
/** * Import related rules ** */
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.stories.tsx',
'**/*.spec.{ts,tsx}',
'**/*.mocks.ts',
'**/*.mswMocks.ts',
'**/*.utils.ts',
'**/*.factory.ts',
'*rc.js',
'*.config.{js,ts}',
],
},
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'jsx-a11y/anchor-is-valid': 'warn',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-types': ['warn', { types: { '{}': false }, extendDefaults: true }],
'react/no-unescaped-entities': ['error', { forbid: ['>', '"', '}'] }],
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
{
files: ['*.stories.*'],
rules: {
'react-hooks/rules-of-hooks': 'warn',
},
},
{
files: ['*.spec.{ts,tsx}', '*.stories.tsx', '*.mocks.ts', '*.mswMocks.ts', '*.factory.ts', '*.utils.ts'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
};