fix: space-before-function-paren allows space in anonymous and asyncArrow function. (#84)

This commit is contained in:
liyujun 2022-04-25 01:02:25 +08:00 committed by GitHub
parent 686f285a37
commit 17670e8e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -183,7 +183,14 @@ module.exports = {
],
'object-curly-spacing': ['error', 'always'],
'no-return-await': 'off',
'space-before-function-paren': ['error', 'never'],
'space-before-function-paren': [
'error',
{
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always'
}
],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
// es6

View File

@ -202,7 +202,14 @@ module.exports = {
'semi': ['error', 'never'],
'semi-spacing': ['error', { before: false, after: true }],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'always'],
'space-before-function-paren': [
'error',
{
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always'
}
],
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
'space-unary-ops': ['error', { words: true, nonwords: false }],