-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.js
74 lines (74 loc) · 2.07 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: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'prettier'],
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
'import/external-module-folders': ['node_modules'],
},
plugins: ['prettier', '@typescript-eslint', '@atlaskit/design-system'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './ui/tsconfig.json'],
},
rules: {
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false,
},
],
'@typescript-eslint/no-floating-promises': 'error',
},
},
],
rules: {
'max-len': [
'warn',
{
code: 120,
},
],
'import/extensions': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'no-await-in-loop': 'off', // https://softwareteams.atlassian.net/browse/COMPASS-2945
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.ts', '**/*.test.tsx', '**/__tests__/**/*'],
},
],
'import/no-unresolved': 'off', // https://softwareteams.atlassian.net/browse/COMPASS-2948
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': 'off',
'react/require-default-props': 'off',
'import/prefer-default-export': 'off',
'no-console': 'off',
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
tabWidth: 2,
jsxSingleQuote: true,
printWidth: 120,
},
],
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
'@atlaskit/design-system/ensure-design-token-usage': [
'error',
{ domains: ['color'], shouldEnforceFallbacks: true },
],
'@atlaskit/design-system/no-deprecated-imports': 'off',
},
};