Skip to content

Commit 7c3417f

Browse files
authored
Merge pull request #22 from hexojs/es6-rule
feat: prefer ES6 syntax
2 parents bc4071a + 2c92a97 commit 7c3417f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

eslint.js

+6
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ module.exports = {
8585
'no-array-constructor': 'error',
8686
'no-extra-label': 'error',
8787
'no-multiple-empty-lines': 'error',
88+
'no-multi-assign': 'error',
8889
'no-nested-ternary': 'error',
8990
'no-new-object': 'error',
9091
'no-trailing-spaces': 'error',
@@ -113,13 +114,18 @@ module.exports = {
113114
'template-tag-spacing': 'error',
114115
'unicode-bom': 'error',
115116
// ECMAScript 6
117+
'arrow-parens': ['error', 'as-needed'],
116118
'arrow-spacing': 'error',
117119
'generator-star-spacing': ['error', 'after'],
118120
'no-confusing-arrow': ['error', { allowParens: true }],
121+
'no-const-assign': 'error',
119122
'no-duplicate-imports': 'error',
120123
'no-useless-computed-key': 'error',
121124
'no-useless-constructor': 'error',
122125
'no-useless-rename': 'error',
126+
'no-var': 'error',
127+
'prefer-arrow-callback': 'error',
128+
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
123129
'rest-spread-spacing': 'error',
124130
'template-curly-spacing': 'error',
125131
'yield-star-spacing': 'error',

0 commit comments

Comments
 (0)