[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:
Remco Haszing
2017-12-04 10:11:35 +01:00
committed by Jordan Harband
parent a100a3957f
commit 8247e338a2

View File

@@ -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',