mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 11:07:58 -05:00
[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'; ```
This commit is contained in:
committed by
Jordan Harband
parent
a100a3957f
commit
8247e338a2
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user