Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to no-unassigned-import for allowed glob #671

Closed
kentcdodds opened this issue Nov 18, 2016 · 3 comments · Fixed by #737 or renovatebot/renovate#217
Closed

Add option to no-unassigned-import for allowed glob #671

kentcdodds opened this issue Nov 18, 2016 · 3 comments · Fixed by #737 or renovatebot/renovate#217

Comments

@kentcdodds
Copy link
Contributor

When using the style and css webpack loaders, sometimes I want to be able to import a CSS file which will result in injecting the styles in the DOM (a side-effect) but this is acceptable in some use cases (I realize there are CSS modules, but importing things like bootstrap etc.)

So I suggest:

"import/no-unassigned-import": [2, {
  "allowed": ["*.css"]
}]

Thoughts?

@jfmengels
Copy link
Collaborator

jfmengels commented Nov 18, 2016

Sounds good to me 👍.

Do you feel like adding this by any chance?

@kentcdodds
Copy link
Contributor Author

I'd be happy to. I'll see when I can find the time. I'll add a comment in here when I've started working on it... Anyone else can feel free before me though :)

@jfmengels
Copy link
Collaborator

That'd be awesome! I'm pretty sure similar work has been made in no-extraneous-dependencies (at least regarding globs) FYI.

kevin940726 added a commit to kevin940726/eslint-plugin-import that referenced this issue Feb 5, 2017
kevin940726 added a commit to kevin940726/eslint-plugin-import that referenced this issue Apr 11, 2017
ljharb pushed a commit to kevin940726/eslint-plugin-import that referenced this issue Jun 1, 2017
ljharb added a commit that referenced this issue Jun 1, 2017
[New] Support `allow` option in `no-unassigned-import`, fix #671
sompylasar added a commit to sompylasar/eslint-plugin-import that referenced this issue Jun 4, 2017
…h_in_parser_options

* commit '3c46d308ccb462a52554257c49c374045d1a6cf7':
  rollback utils dependency to 2.0.0
  add yank note to utils change log
  add yanking note to root change log
  Upgrade debug version of eslint-module-utils (import-js#844)
  remove obsolete dad joke
  update utils changelog
  bump eslint-module-utils to v2.1.0
  bump v2.4.0
  fix typos, enforce type of array of strings in allow option
  update CHANGELOG.md
  eslint-module-utils: filePath in parserOptions (import-js#840)
  write doc, add two more tests
  add allow glob for rule no-unassigned-import, fix import-js#671

# Conflicts:
#	utils/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment