-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.js
47 lines (45 loc) · 1.12 KB
/
eslint.config.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
const enactConfig = require('eslint-config-enact');
const prettierConfig = require('eslint-config-prettier');
const importPlugin = require('eslint-plugin-import');
const prettierPlugin = require('eslint-plugin-prettier');
const globals = require('globals');
module.exports = [
...enactConfig,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node
},
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
plugins: {
import: importPlugin,
prettier: prettierPlugin
},
rules: {
// import plugin rules
'import/no-unresolved': ['error', {commonjs: true, caseSensitive: true}],
'import/named': 'error',
'import/first': 'warn',
'import/no-duplicates': 'error',
'import/extensions': ['warn', 'always', {js: 'never', json: 'always'}],
'import/newline-after-import': 'warn',
'import/order': [
'warn',
{
'newlines-between': 'never',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index']
}
],
// prettier rules
...prettierPlugin.configs.recommended.rules,
...prettierConfig.rules
}
}
];