-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.eslintrc.js
More file actions
56 lines (56 loc) · 1.58 KB
/
.eslintrc.js
File metadata and controls
56 lines (56 loc) · 1.58 KB
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
/**
* @type {import("eslint").Linter.Config}
*/
module.exports = {
// TODO: use the new `eslint-config-node`?
extends: ['@commercetools-frontend/eslint-config-mc-app'],
rules: {
// TODO: re-enable after merging the big PR of the new standalone package.
'import/export': 'off', // To avoid the error: `RangeError: Maximum call stack size exceeded`
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
pathGroupsExcludedImportTypes: ['builtin'],
pathGroups: [
{
pattern: '@/core',
group: 'external',
position: 'after',
},
{
pattern: '@/core/test-utils',
group: 'external',
position: 'after',
},
{
pattern: '@/graphql-types',
group: 'external',
position: 'after',
},
{
pattern: '@/models/**',
group: 'external',
position: 'after',
},
{
pattern: '@/utils',
group: 'external',
position: 'after',
},
],
},
],
'import/no-anonymous-default-export': 'off',
},
settings: {
react: {
// That's a lie, we don't use React here. However, the ESLint preset
// comes with the react plugin and `version: detect`, so we pass
// `latest` to avoid logging a warning.
// TODO: maybe we need to ship a more modular ESLint config,
// so that it can be used in a non-react environment.
version: '17',
},
},
};