-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrecommended.js
53 lines (51 loc) · 2.04 KB
/
recommended.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
'use strict'
const airbnbConfiguration = require('./airbnb')
module.exports = {
...airbnbConfiguration,
rules: {
...airbnbConfiguration.rules,
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
allowExpressions: true,
allowHigherOrderFunctions: true,
allowTypedFunctionExpressions: true,
},
],
'@typescript-eslint/no-unused-vars': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-duplicates': 'error',
'import/no-default-export': 'error',
'prettier/prettier': 'warn',
'simple-import-sort/imports': [
'warn',
{
groups: [
// Node.js builtins generated from a regex (ref: https://git.io/JMJfU)
[`^(${require('module').builtinModules.join('|')})(/|$)`],
// Third-party modules (side effects)
['^\\u0000'],
// Third-party stylesheets (side effects)
['^\\u0000@?\\w.*\\.(s?css|less)$'],
// Internal stylesheets (side effects)
['^\\u0000\\..*\\.(s?css|less)$'],
// React and related modules
['^@?\\w'],
// Internal parent-level modules
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Internal same-level modules
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
// Internal CSS Modules
['^.*\\.module\\.css$'],
// Internal type imports as a separate group
// (sorting like non-type imports are grouped)
['^@?\\w.*\\u0000$', '^[^.].*\\u0000$', '^\\..*\\u0000$'],
],
},
],
'simple-import-sort/exports': 'warn',
},
}