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

Support for different file formats of .stylelintrc #480

Open
christophbuehler opened this issue Mar 31, 2023 · 2 comments
Open

Support for different file formats of .stylelintrc #480

christophbuehler opened this issue Mar 31, 2023 · 2 comments

Comments

@christophbuehler
Copy link

Seems like JSON is hardcoded as the file format of stylelintrc (both the relative file and the root file). Unsure if it is possible to create custom syntax with JSON.
https://github.com/Phillip9587/nx-stylelint/blob/main/packages/nx-stylelint/src/generators/configuration/generator.ts#L86

@Phillip9587
Copy link
Owner

You can use the file format you want to use. Just create your custom config file e.g. .stylelintrc.yaml. The executor will pick it up automatically. Its the same behavior as stylelint has itself. You can also mix json and yaml files for example. You just have to take care of the extends properties.

The generators only supports creating stylelintrc.json files. But you can open a PR to select the file format if you want it as a feature.

@christophbuehler
Copy link
Author

Hi @Phillip9587, thanks for addressing this. I was able to make it work with .stylelintrc.json. If there is some interest by the community to support more file formats (or even .stylelint in package.json), I could draft a PR for this. Cheers, Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants