diff --git a/index.js b/index.js index 424b75b..e4d995d 100644 --- a/index.js +++ b/index.js @@ -106,6 +106,7 @@ export default function createConfig({ const templateData = { styleGuide, + needsPrettier, fileExtensions, configsBeforeVuePlugin, configsAfterVuePlugin, diff --git a/templates/_editorconfig.ejs b/templates/_editorconfig.ejs index 9cdd5ec..f72a9a2 100644 --- a/templates/_editorconfig.ejs +++ b/templates/_editorconfig.ejs @@ -4,12 +4,13 @@ indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true -<%_ if (styleGuide === 'airbnb') { _%> -<%# // standard doesn't have an opinion on line endings +<%_ if (styleGuide !== 'standard' || needsPrettier) { _%> +<%# +// standard doesn't have an opinion on line endings // https://github.com/standard/standard/issues/140 // or maximum line length // https://github.com/standard/standard/issues/1559 -// so we only configure them for airbnb style +// Prettier enforces these things, though. %> end_of_line = lf max_line_length = 100