Giter VIP home page Giter VIP logo

Comments (7)

ljharb avatar ljharb commented on May 28, 2024

Colocation definitely makes this trickier - however, can you try to set src to ['src', '!src/**/*.test.js']?

from eslint-plugin-import.

ziserman avatar ziserman commented on May 28, 2024

@ljharb yes, I tried and got an error

Error: Error while loading rule 'import/no-unused-modules': No files matching '!src/**/*.test.js' were found.

I think negation isn't working in src at all.

from eslint-plugin-import.

ljharb avatar ljharb commented on May 28, 2024

aha, perhaps that's the request. I wouldn't have thought of the need because I think colocation of tests is a bad idea :-)

from eslint-plugin-import.

ziserman avatar ziserman commented on May 28, 2024

Actually, it doesn't matter where you put your tests (or something else), cause ignoring hypothetical tests folder do nothing. The issue with the imports in ignored files, the plugin see them and doesn't throw any warn, if I got your message correctly.

Thank you for labels! :)

from eslint-plugin-import.

ljharb avatar ljharb commented on May 28, 2024

if the test files aren't in src (because they're in test) i don't think the problem will come up.

from eslint-plugin-import.

ziserman avatar ziserman commented on May 28, 2024

it is, I checked it in console, for sure

and here's the screenshot of simple repo
SCR-20240307-cdia

*typo at the screenshot: no warn or error line below the export

from eslint-plugin-import.

ljharb avatar ljharb commented on May 28, 2024

hm, interesting, ok - then this becomes much more important.

from eslint-plugin-import.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.