ember-template-lint / eslint-plugin-hbs

Plugin for eslint which checks inline hbs templates
ISC License
18 stars 8 forks source link

Allow rule config to be passed directly instead of by filename #30

Open elidupuis opened 5 years ago

elidupuis commented 5 years ago

With ember-template-lint using .template-lintrc.js as the default configuration file (a JS module, not a JSON file), I think it makes sense to allow the configuration for this plugin to be passed in directly—instead of by filename.

For example, instead of the current example in the readme:

{'ConfigFile': __dirname + '/.eslint-template-lintrc.json'}

we could do something like this:

{ ConfigFile: require('.template-lintrc.js') },

Thoughts?

jaydgruber commented 4 years ago

https://github.com/ember-template-lint/eslint-plugin-hbs/pull/32 somewhat addressed this. At least you can do a .js file now, anyways

rwjblue commented 4 years ago

Ya, though I’d still want to allow an actual JSON string for config as well as a path to a config file.