eslint-plugin-hbs icon indicating copy to clipboard operation
eslint-plugin-hbs copied to clipboard

Allow rule config to be passed directly instead of by filename

Open elidupuis opened this issue 5 years ago • 2 comments

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?

elidupuis avatar Sep 06 '19 20:09 elidupuis

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

jaydgruber avatar Mar 28 '20 00:03 jaydgruber

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

rwjblue avatar Mar 28 '20 02:03 rwjblue