Giter Site home page Giter Site logo

Comments (3)

davidtheclark avatar davidtheclark commented on May 31, 2024

I think that each of the items you've listed are about resolving paths/modules. If cosmiconfig were able to serve each of these projects, I'm thinking it's role would end after resolving those items to absolute paths — then the consumer would decide what to do with those paths.

So the question here is whether the format of these configuration properties and the the means of resolution can be common enough between the projects to justify a shared tool.

I'll detail what stylelint (and stylefmt) does for comparison (cc @jeddy3 if I've made mistakes):

  • plugins is an array of string locators or a single string locator. Each locator is either
    • The name of a module in local node_modules* (have not built in the ability to load global node_modules`, though it's been asked for.
    • An absolute path
    • A relative path, relative to the referencing configuration file — or, if that fails, relative to process.cwd()
  • extends is the same as plugins.
  • ignoreFiles is an array of globs or a single glob. If the globs are relative, we attempt to resolve them relative to the referencing configuration file, and if that fails we try to resolve them relative to process.cwd().

Stylelint has the special situation that you configure a loaded plugin via "rules". Other tools might not have this, so they may need to be able to accept configuration objects alongside lookups in the plugins array.

from cosmiconfig.

azu avatar azu commented on May 31, 2024

I think that there are anthor issue.
Babel and ESLint synchronously load config.
If these project use cosmiconfig, there are breaking change.

from cosmiconfig.

davidtheclark avatar davidtheclark commented on May 31, 2024

I don't think this in issue for cosmiconfig. If you'd like to open issues in other projects discussing this possibility, I think that would be more productive..

from cosmiconfig.

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.