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

New configuration loader #490

Closed
davidtheclark opened this issue Nov 6, 2015 · 8 comments
Closed

New configuration loader #490

davidtheclark opened this issue Nov 6, 2015 · 8 comments
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules
Milestone

Comments

@davidtheclark
Copy link
Contributor

Here's the spec:

  • Look for .stylelintrc, stylelint.config.js, and stylelint properties in package.json files.
  • Starting from process.cwd(), look for these files in ./ ../ ../../ ../../../ etc., all the way to ~ (user home directory), checking first for stylelint in package.json, second for .stylelintrc, third for stylelint.config.js.
  • Stop looking at the first one that is found, and use that one as the config.
  • Built-in YAML support for .stylelintrc.
  • The config can have an extends property, whose value is a single string or an array of strings. Each string must be a lookup that require() would understand, so either:
    • A npm module name
    • An absolute path
    • A relative path, relative to the config file that is extending
  • If config A extends config B, the result is config A's properties merged into config B, with config A taking priority.

The plan right now is to build these features into a standalone module and integrate that module into stylelint.

cc/ #442, #418

@davidtheclark davidtheclark added this to the 3.0.0 milestone Nov 6, 2015
@davidtheclark
Copy link
Contributor Author

This will cause a pretty low-impact breaking change, because the search-and-merge feature of rc will no longer be supported.

@davidtheclark davidtheclark added the type: enhancement a new feature that isn't related to rules label Nov 6, 2015
This was referenced Nov 6, 2015
@davidtheclark
Copy link
Contributor Author

@davidtheclark davidtheclark added the status: wip is being worked on by someone label Nov 8, 2015
@davidtheclark
Copy link
Contributor Author

Mission accomplished in #503

@jeddy3
Copy link
Member

jeddy3 commented Nov 17, 2015

🎉 :)

@keithamus
Copy link

@davidtheclark awesome work on this! Thanks so much! Is it ready to use (released) yet? I'd love to take it for a spin!

@davidtheclark
Copy link
Contributor Author

@keithamus You can try the v3 branch. Let us know if you find problems!

@davidtheclark
Copy link
Contributor Author

@keithamus v3 is now released.

@keithamus
Copy link

🎉 I've been working with it a bit - sadly atom-stylelint hasn't yet been updated but my package.json works well. Thanks for all of your efforts @davidtheclark 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules
Development

No branches or pull requests

3 participants