Skip to content

Commit ee17f59

Browse files
committed
ESLint: enforce trailing commas
1 parent 7f25035 commit ee17f59

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

.eslintrc.cjs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18+
const commaDangle = {
19+
arrays: 'always-multiline',
20+
objects: 'always-multiline',
21+
imports: 'always-multiline',
22+
exports: 'always-multiline',
23+
functions: 'only-multiline',
24+
}
25+
1826
module.exports = {
1927
root: true,
2028
parserOptions: {
@@ -32,40 +40,38 @@ module.exports = {
3240
rules: {
3341
'comma-dangle': [
3442
'error',
35-
{
36-
arrays: 'only-multiline',
37-
objects: 'only-multiline',
38-
imports: 'only-multiline',
39-
exports: 'only-multiline',
40-
functions: 'only-multiline',
41-
},
43+
commaDangle,
44+
],
45+
'vue/comma-dangle': [
46+
'error',
47+
commaDangle,
4248
],
4349
'no-console': [
4450
'error',
4551
{
46-
allow: ['warn', 'error']
47-
}
52+
allow: ['warn', 'error'],
53+
},
4854
],
4955
'template-curly-spacing': [
50-
'off'
56+
'off',
5157
],
5258
'vue/multi-word-component-names': [
53-
'off'
59+
'off',
5460
],
5561
'vue/valid-v-slot': [
5662
'error',
5763
{
58-
allowModifiers: true
59-
}
64+
allowModifiers: true,
65+
},
6066
],
6167
'promise/param-names': [
62-
'error'
68+
'error',
6369
],
6470
'promise/no-return-wrap': [
65-
'error'
71+
'error',
6672
],
6773
'cypress/unsafe-to-chain-command': [
68-
'off'
74+
'off',
6975
],
7076
},
7177
}

0 commit comments

Comments
 (0)