mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 00:28:25 -05:00
[eslint config] [base] [breaking] move comma-dangle to Stylistic Issues
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
module.exports = {
|
||||
rules: {
|
||||
// require trailing commas in multiline object literals
|
||||
'comma-dangle': ['error', {
|
||||
arrays: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
imports: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'always-multiline',
|
||||
}],
|
||||
|
||||
// Enforce “for” loop update clause moving the counter in the right direction
|
||||
// http://eslint.org/docs/rules/for-direction
|
||||
// TODO: enable, semver-major until v3 is dropped; semver-minor otherwise
|
||||
|
||||
@@ -38,6 +38,15 @@ module.exports = {
|
||||
},
|
||||
}],
|
||||
|
||||
// require trailing commas in multiline object literals
|
||||
'comma-dangle': ['error', {
|
||||
arrays: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
imports: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'always-multiline',
|
||||
}],
|
||||
|
||||
// enforce spacing before and after comma
|
||||
'comma-spacing': ['error', { before: false, after: true }],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user