Skip to content

Commit 986bdd1

Browse files
committed
merge config/es6 into config/recommended
1 parent 6e4f49c commit 986bdd1

File tree

4 files changed

+45
-55
lines changed

4 files changed

+45
-55
lines changed

lib/configs/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ module.exports = {
77
'github/no-dataset': 'error',
88
'github/no-then': 'error'
99
},
10-
extends: [require.resolve('./recommended'), require.resolve('./es6'), require.resolve('./browser')]
10+
extends: [require.resolve('./recommended'), require.resolve('./browser')]
1111
}

lib/configs/es6.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

lib/configs/recommended.js

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
module.exports = {
2-
plugins: ['github', 'prettier', 'eslint-comments'],
2+
parserOptions: {
3+
ecmaFeatures: {
4+
ecmaVersion: 6
5+
},
6+
sourceType: 'module'
7+
},
38
env: {
4-
commonjs: true
9+
es6: true
510
},
11+
plugins: ['github', 'prettier', 'eslint-comments', 'import'],
612
rules: {
713
'constructor-super': 'error',
814
'eslint-comments/disable-enable-pair': 'off',
@@ -13,7 +19,31 @@ module.exports = {
1319
'eslint-comments/no-unused-enable': 'error',
1420
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
1521
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
22+
'github/array-foreach': 'error',
1623
'github/no-implicit-buggy-globals': 'error',
24+
'import/default': 'error',
25+
'import/export': 'error',
26+
'import/first': 'error',
27+
'import/named': 'error',
28+
'import/namespace': 'error',
29+
'import/no-absolute-path': 'error',
30+
'import/no-anonymous-default-export': [
31+
'error',
32+
{
33+
allowAnonymousClass: false,
34+
allowAnonymousFunction: false,
35+
allowArray: true,
36+
allowArrowFunction: false,
37+
allowLiteral: true,
38+
allowObject: true
39+
}
40+
],
41+
'import/no-deprecated': 'error',
42+
'import/no-duplicates': 'error',
43+
'import/no-mutable-exports': 'error',
44+
'import/no-named-as-default': 'error',
45+
'import/no-named-as-default-member': 'error',
46+
'import/no-namespace': 'error',
1747
'no-case-declarations': 'error',
1848
'no-class-assign': 'error',
1949
'no-compare-neg-zero': 'error',
@@ -61,13 +91,25 @@ module.exports = {
6191
'no-unused-vars': 'error',
6292
'no-useless-concat': 'error',
6393
'no-useless-escape': 'error',
94+
'no-var': 'error',
6495
'object-shorthand': ['error', 'always', {avoidQuotes: true}],
96+
'prefer-const': 'error',
6597
'prefer-promise-reject-errors': 'error',
98+
'prefer-rest-params': 'error',
99+
'prefer-spread': 'error',
100+
'prefer-template': 'error',
66101
'prettier/prettier': 'error',
67102
'require-yield': 'error',
68103
'use-isnan': 'error',
69104
'valid-typeof': 'error',
70105
camelcase: ['error', {properties: 'always'}],
71106
eqeqeq: ['error', 'smart']
107+
},
108+
settings: {
109+
'import/resolver': {
110+
node: {
111+
extensions: ['.js', '.ts']
112+
}
113+
}
72114
}
73115
}

lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
configs: {
1818
app: require('./configs/app'),
1919
browser: require('./configs/browser'),
20-
es6: require('./configs/es6'),
2120
recommended: require('./configs/recommended'),
2221
typescript: require('./configs/typescript')
2322
}

0 commit comments

Comments
 (0)