-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (51 loc) · 1.32 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
module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
presets: ["@babel/preset-env"],
},
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
modules: true,
impliedStrict: true,
},
},
plugins: [
'import',
],
extends: [
'eslint:recommended',
'plugin:import/recommended', // this is shorthand for 'plugin:import/errors' and 'plugin:import/warnings'
'plugin:eslint-comments/recommended',
],
env: {
es6: true,
browser: true,
commonjs: true,
},
ignorePatterns: [
'dist/',
'node_modules/'
],
rules: {
// https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/
'eslint-comments/no-duplicate-disable': 'error',
'eslint-comments/no-unlimited-disable': 'error',
// https://www.npmjs.com/package/eslint-plugin-import
'import/no-unresolved': ['error', {commonjs: true}],
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/no-namespace': 'error',
'import/no-mutable-exports': 'warn',
'import/no-absolute-path': 'error',
'import/no-dynamic-require': 'off',
'import/no-unused-modules': 'error',
},
};