From 8247e338a2d689f2e16010b0db225fbce7760f97 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 4 Dec 2017 10:11:35 +0100 Subject: [PATCH] [eslint config] [base] [patch] Set import/extensions to ignorePackages This allows to import non-JavaScript files through the main export of a dependency's package.json. The following would trigger an error before, but is fine with the new configuration: ```js import 'roboto-fontface'; ``` --- packages/eslint-config-airbnb-base/rules/imports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb-base/rules/imports.js b/packages/eslint-config-airbnb-base/rules/imports.js index 005656e6..4a83126e 100644 --- a/packages/eslint-config-airbnb-base/rules/imports.js +++ b/packages/eslint-config-airbnb-base/rules/imports.js @@ -132,7 +132,7 @@ module.exports = { // Ensure consistent use of file extension within the import path // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - 'import/extensions': ['error', 'always', { + 'import/extensions': ['error', 'ignorePackages', { js: 'never', mjs: 'never', jsx: 'never',