question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no-unused-styles doesn't work when imporing from file

See original GitHub issue

import styles from './styles'; Should work If I import the styles from a file instead of the same js file? Or is not implemented yet.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:18
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
skovhuscommented, Jan 6, 2018

@Intellicode I would like to help out with this feature.

Could you give me some hints, as I haven’t written any eslint plugins for a while and never something that accessed multiple files.

3reactions
matart15commented, Apr 13, 2022

latest version release

v4.0.0 …
 on Dec 12, 2021

PR merged

 xenokratos merged commit 804e3e1 into master on Feb 16

Waiting to be released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linter showing "no-unused-vars" when importing a style file for ...
I'm using webpack as the bundler, and I import sass styles to be processed during the building process. When I import the style...
Read more >
Automatically Remove Unused Imports From Your JS Projects
To automatically remove unused imports, we will need to add the eslint-plugin-unused-imports plugin. Now, when you run ESLint, you should see ...
Read more >
eslint-plugin-react-native - Bountysource
We using destructuring on your StyleSheet.create object you get a "Unused style detected" warning, even though the style is in use. Example: //This...
Read more >
React Native development tools - Part 1: Linting tools - Pusher
The default configuration has rules for React, plugin imports, and accessibility so ... rules: { // previous rules here "react-native/no-unused-styles": 2, ...
Read more >
eslint-plugin-unused-imports - npm
Find and remove unused es6 module imports. It works by splitting up the no-unused-vars rule depending on it being an import statement in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found