Skip to content

Commit

Permalink
add comma-dangle rule
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar committed Oct 26, 2019
1 parent 7b66fe8 commit b076cb3
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
},
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 6
ecmaVersion: 6,
},
extends: [
'eslint:recommended',
Expand All @@ -17,15 +17,15 @@ module.exports = {
'plugin:node/recommended',
'plugin:vue/recommended',
'plugin:nextcloud/recommended',
'standard'
'standard',
],
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.vue']
}
}
extensions: ['.js', '.vue'],
},
},
},
plugins: ['vue', 'node'],
rules: {
Expand All @@ -48,10 +48,10 @@ module.exports = {
// force proper JSDocs
'valid-jsdoc': ['error', {
prefer: {
return: 'returns'
return: 'returns',
},
requireReturn: false,
requireReturnDescription: false
requireReturnDescription: false,
}],
// disallow use of "var"
'no-var': 'error',
Expand All @@ -66,23 +66,25 @@ module.exports = {
// force name
'vue/match-component-file-name': ['error', {
extensions: ['jsx', 'vue', 'js'],
shouldMatchCase: true
shouldMatchCase: true,
}],
// space before self-closing elements
'vue/html-closing-bracket-spacing': 'error',
// no ending html tag on a new line
'vue/html-closing-bracket-newline': ['error', { multiline: 'never' }],
// check vue files too
'node/no-missing-import': ['error', {
tryExtensions: ['.js', '.vue']
tryExtensions: ['.js', '.vue'],
}],
// code spacing with attributes
'vue/max-attributes-per-line': ['error', {
singleline: 3,
multiline: {
max: 1,
allowFirstLine: true
}
}]
}
};
allowFirstLine: true,
},
}],
// always add a trailing comma (for diff readability)
'comma-dangle': ['warn', 'always-multiline'],
},
}

0 comments on commit b076cb3

Please sign in to comment.