3.0.0-beta.6
not-required
Create a new Vue app activating ESLint.
Vue CLI should create a .eslintrc.json
or .eslint.js
file, due .eslintrc
file is deprecated according to the ESLint documentation: https://eslint.org/docs/user-guide/configuring#configuration-file-formats
Vue CLI creates a .eslintrc
file
Maybe the option to create a .eslintrc.js
file will be better to place comments and solve conditional rules according to the NODE_ENV
value
.eslintrc.js would also be my pick for the stated reasons.
And Babel 7 support .babelrc.js
, PostCSS support postcss.config.js
currently, the cli creates JSON, not Javascript code. JSON is also easier to augment for 3rd party plugins, since you can simply require the file, change the updated object and save the JSON back to disc, so I would vote for .eslintrc.json
Just to note right now if someone were to do this the typescript plugin will change files that end in .js
and don't contain config
to a .ts
file. If the config was a .eslintrc.js
file it would end up as .eslintrc.ts
which means the config file won't be found.
So .eslintrc.json would probably be a better default in any case.
@ascendancyy the jest plugin is generating jest.config.js
just fine with typescript https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-unit-jest/generator/index.js#L64. My vote would be for .eslintrc.js
for this reason https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-eslint/eslintOptions.js#L6-L7
Most helpful comment
currently, the cli creates JSON, not Javascript code. JSON is also easier to augment for 3rd party plugins, since you can simply require the file, change the updated object and save the JSON back to disc, so I would vote for
.eslintrc.json