From 8c8df4ad3e525b7bd40b4c9bc4af0e8a5bd9f472 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 9 Feb 2022 11:03:24 -0800 Subject: [PATCH] Add import extension rule Signed-off-by: Christopher Ng --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index b41e94d3..7dabc482 100644 --- a/index.js +++ b/index.js @@ -111,5 +111,10 @@ module.exports = { }], // require object literal shorthand syntax 'object-shorthand': ['error', 'always'], + // Disallow file extensions on imports by default + 'import/extensions': ['error', 'never', { + // Require file extension for json imports + json: 'always', + }], }, }