Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-02-06 16:37:36 +0300
committerRich Trott <rtrott@gmail.com>2021-02-19 20:55:38 +0300
commit1d4c0a35720ab741f0815abf945fa5a2583445e7 (patch)
tree4860528ec27cb043a47b0f4751985315556ca793 /.eslintrc.js
parentb461a1b1259b0b12f6fdbc45851e8b0546ddde84 (diff)
tools: make comma-dangle ESLint rule more stringent …
We've been having a lot of nits lately asking people to add trailing commas, so it's probably time to incrementally make the comma-dangle rule more stringent. PR-URL: https://github.com/nodejs/node/pull/37088 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index ca0e40e4b6c..a9a1761e6ab 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -95,7 +95,13 @@ module.exports = {
ignorePattern: '.*',
},
}],
- 'comma-dangle': ['error', 'only-multiline'],
+ 'comma-dangle': ['error', {
+ arrays: 'always-multiline',
+ exports: 'only-multiline',
+ functions: 'only-multiline',
+ imports: 'only-multiline',
+ objects: 'only-multiline',
+ }],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',