chore!: update

This commit is contained in:
Anthony Fu
2020-10-21 14:38:36 +08:00
parent 7ce57bfbf1
commit 9755c28da2
2 changed files with 37 additions and 25 deletions

View File

@@ -4,15 +4,8 @@ module.exports = {
browser: true,
node: true,
},
extends: [
'standard',
'plugin:import/errors',
'plugin:import/warnings',
],
plugins: [
'html',
'unicorn',
],
extends: ['standard', 'plugin:import/errors', 'plugin:import/warnings'],
plugins: ['html', 'unicorn'],
settings: {
'import/resolver': {
node: { extensions: ['.js', '.mjs'] },
@@ -45,7 +38,11 @@ module.exports = {
'no-cond-assign': ['error', 'always'],
'func-call-spacing': ['off', 'never'],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
indent: ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
indent: [
'error',
2,
{ SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 },
],
'no-restricted-syntax': [
'error',
'DebuggerStatement',
@@ -56,22 +53,32 @@ module.exports = {
'no-spaced-func': 'error',
'object-curly-spacing': ['error', 'always'],
'no-return-await': 'off',
'space-before-function-paren': ['error', 'never'],
'space-before-function-paren': 'error',
// es6
'no-var': 'error',
'prefer-const': ['error', {
destructuring: 'any',
ignoreReadBeforeAssign: true,
}],
'prefer-arrow-callback': ['error', {
allowNamedFunctions: false,
allowUnboundThis: true,
}],
'object-shorthand': ['error', 'always', {
ignoreConstructors: false,
avoidQuotes: true,
}],
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: true,
},
],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: false,
allowUnboundThis: true,
},
],
'object-shorthand': [
'error',
'always',
{
ignoreConstructors: false,
avoidQuotes: true,
},
],
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',