Closed domoritz closed 5 years ago
@domoritz The prettier.config.js
is just a JSON dump, it's basically this:
module.exports = JSON.stringify(config);
Since these are auto-generated files, there's no other way around it. If you'd like the config to match your guidelines (I personally gitignore the config files), you can run prettier on it yourself.
beemo prettier ./src && prettier ./*.config.js --write
I see. I personally don't care what the format is and I am ignoring the files. However, the file causes linting errors later. I just ignored it in my eslint config. Would it make sense to ignore the generated config files by default?
@domoritz I usually ignore them, especially if it's a type of config that changes often.
I wish beemo ignored generated files automatically but I don't think it's a big issue so I'll close this.
@domoritz What do you mean exactly by beemo ignoring the generated files?
You can use scaffolding to add ignore patterns to gitignore/npmignore/etc. https://milesj.gitbook.io/beemo/scaffolding
What do you mean exactly by beemo ignoring the generated files?
In my case, beemo generates both the prettier and eslint config files. Therefore, I think prettier and eslint configs should be ignored by prettier and eslint.
@domoritz Not a bad idea, I'll think about it. You can add them to the ignore list manually too.
// configs/prettier.js
module.exports = {
ignore: ['.eslintrc.js', 'prettier.config.js'], // etc
};
My
configs/prettier.js
file only uses'
but the generatedprettier.config.js
has"
. Can the driver be configured to maintain the original quoting or use what is specified in eslint or prettier?