muenzpraeger / eslint-plugin-inclusive-language

An ESLint plugin to raise awareness for using inclusive language not only in your codebase, but in life.
MIT License
57 stars 10 forks source link

feat: Allow inline configuration in addition to JSON files #7

Closed sarayourfriend closed 4 years ago

sarayourfriend commented 4 years ago

Currently the only way to pass additional configuration is by passing a JSON file path. However, this means that folks have to introduce another configuration file to their projects, even for the smallest changes to the default configuration. It also means that it is not possible to run JavaScript over the config if using .eslintrc.js.

It should be simple enough to change the customRuleConfig function to just return the parameter if it's an object and to only construct a path for and parse JSON when it is a string.

This would also ease testing different configurations as the configurations could live inline with the tests rather than needing multiple files.

muenzpraeger commented 4 years ago

Good idea. At the end it'll be anyway a fatigue - either a long eslint config file or yet another config file. ;-)

I'm taking a stab via #9.

muenzpraeger commented 4 years ago

@saramarcondes v1.2.0 published to npm! Thanks again for the contribution!