mirror of
https://github.com/scratchfoundation/eslint-config-scratch.git
synced 2025-08-28 22:40:13 -04:00
BREAKING CHANGE: Enable several rules related to ES6 features, mostly promises and async/await but a few other features as well. One rule, 'require-atomic-updates', was introduced in ESLint 5.3.0 so that's now the minimum specified in peerDependencies.
35 lines
1 KiB
JavaScript
35 lines
1 KiB
JavaScript
module.exports = {
|
|
rules: {
|
|
'arrow-body-style': [2, 'as-needed'],
|
|
'arrow-parens': [2, 'as-needed'],
|
|
'arrow-spacing': [2, {
|
|
before: true,
|
|
after: true
|
|
}],
|
|
'no-confusing-arrow': [2],
|
|
'no-duplicate-imports': [2],
|
|
'no-return-await': [2],
|
|
'no-template-curly-in-string': [2],
|
|
'no-useless-computed-key': [2],
|
|
'no-useless-constructor': [2],
|
|
'no-useless-rename': [2],
|
|
'no-var': [2],
|
|
'prefer-arrow-callback': [2],
|
|
'prefer-const': [2, {destructuring: 'all'}],
|
|
'prefer-promise-reject-errors': [2],
|
|
'prefer-rest-params': [2],
|
|
'prefer-spread': [2],
|
|
'prefer-template': [2],
|
|
'require-atomic-updates': [2],
|
|
'require-await': [2],
|
|
'rest-spread-spacing': [2, 'never'],
|
|
'symbol-description': [2],
|
|
'template-curly-spacing': [2, 'never']
|
|
},
|
|
env: {
|
|
es6: true
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 2018
|
|
}
|
|
};
|