create-nuxt-app
create-nuxt-app copied to clipboard
Define stylelint default config like @nuxtjs/eslint-config and use it
Now, there are no rules defined for stylelint. ^1 I think that some rules should be enabled by default like ESLint.
My idea
@nuxtjs/stylelint-config
:
module.exports = {
extends: [
'stylelint-config-standard'
],
rules: {
// TODO: Define other rules which are compatible with Vue/Nuxt
}
}
template/_stylelint.config.js
of create-nuxt-app
module.exports = {
extends: [
'@nuxtjs/stylelint-config'
],
// add your custom rules here
// https://stylelint.io/user-guide/configuration
rules: {}
}
npm install stylelint-config-standard --save-dev
then add following line to stylelint.config.js
"extends": "stylelint-config-standard"
cc @ricardogobbosouza
I agree that we should have @nuxtjs/stylelint-config however simple it may be! What do you think @clarkdo? Could we have this repository at https://github.com/nuxt/stylelint-config?
Can we add a package in https://github.com/nuxt/eslint-config/tree/master/packages ? If it's necessary, we can even rename the repo to lint-config
Much better :smile: I can create a PR with stylelint-config
It would be nice to know the team's opinion, wouldn't it?
cc @nuxt/core-team
As style-lint depends on project and UI framework does it makes sense / is possible to create general-purpose a preset? (#446 for example).
BTW if we can propose a shared preset, I highly agree with @clarkdo to move eslint-config
into a mono repo for official lint configs.
History: @nuxt/eslint-config
was initially refactored out of core repo to make maintenance easier and also shared across all official and community modules. It is also usable for nuxt project as they usually have shared requirements.