You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugin expects extensions overrides to be specified inside pattern property inside the options object if ignorePackages property is also specified. It's not documented here though.
So this configuration works correctly:
{rules: {'import/extensions': ['error','always',{ignorePackages: true,pattern: {// wrap extensions in the `pattern` objectjs: 'never',}}]}}
Either documentation is lacking or pattern property should not be expected in options.
The text was updated successfully, but these errors were encountered:
is because in order to apply the js part - you need to have ingnorePackages to be undefined. So basically if ignorePackages is present in the object - it disables all extension specific options. For me at least this makes very little sense
ignorePackages doesn't do anything when you set it, hence I propose to be removed from the enumValues and left only as boolean property part of the object.
node: v10.14.1
eslint: v5.10.0
eslint-plugin-import: v2.14.0
.eslintrc.js
./src/index.js
Running eslint results in an error:
The problem seems to be here https://github.com/benmosher/eslint-plugin-import/blob/1cd82eb27df85768fbd076e4ff6b7f36d6f652ce/src/rules/extensions.js#L36-L45
Plugin expects extensions overrides to be specified inside
pattern
property inside the options object ifignorePackages
property is also specified. It's not documented here though.So this configuration works correctly:
Either documentation is lacking or
pattern
property should not be expected in options.The text was updated successfully, but these errors were encountered: