-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
74 lines (74 loc) · 2.33 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
module.exports = {
extends: ['plugin:import/typescript', 'prettier'],
env: {
browser: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
plugins: [
'@typescript-eslint',
//"@typescript-eslint/tslint",
'react',
'react-hooks',
'import',
'prettier',
'@stylistic/js',
],
rules: {
'prettier/prettier': 'error',
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'class',
format: ['PascalCase'],
},
],
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/webpack.*', '**/test/*', '**/*.test.js', '**/*.spec.js', '**/*.test.ts'] },
],
'no-restricted-imports': [
'error',
{
patterns: [
'@atlassianlabs/guipi-core-components/*',
'@atlassianlabs/guipi-core-controller/*',
'@atlassianlabs/guipi-jira-components/*',
'@atlassianlabs/jira-metaui-client/*',
'@atlassianlabs/jira-metaui-transformer/*',
'@atlassianlabs/jira-pi-client/*',
'@atlassianlabs/jira-pi-common-models/*',
'@atlassianlabs/pi-client-common/*',
],
},
],
'brace-style': 'off',
curly: 'error',
eqeqeq: ['error', 'always'],
semi: 'off',
'@stylistic/js/semi': ['error', 'always'],
'no-throw-literal': 'error',
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
};