From 20c2ca8cc9e1b07e41a3d5b38a4ec86e18ba82f2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 1 Mar 2019 22:47:58 -0800 Subject: [PATCH] tools: apply stricter linting to tools directory Enable ESLint rules for trailing commas and arrow callbacks in tools directory. These rules are also in place in the benchmark directory. PR-URL: https://github.com/nodejs/node/pull/26394 Reviewed-By: Richard Lau Reviewed-By: Anto Aravinth Reviewed-By: Masashi Hirano Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- tools/.eslintrc.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/.eslintrc.yaml b/tools/.eslintrc.yaml index f8b7cc4e41a747..740056235cb01b 100644 --- a/tools/.eslintrc.yaml +++ b/tools/.eslintrc.yaml @@ -1,4 +1,9 @@ rules: - # Variables - # http://eslint.org/docs/rules/#variables + comma-dangle: + - error + - arrays: 'always-multiline' + objects: 'only-multiline' + imports: 'only-multiline' + exports: 'only-multiline' no-unused-vars: [error, { args: 'after-used' }] + prefer-arrow-callback: error