1.0.6 • Published 5 years ago
stylelint-config-nahid v1.0.6
stylelint-config-nahid
My sharable and pluggable Stylelint configuration.
Contents
stylelintstylelint-config-prettierstylelint-config-sass-guidelinesstylelint-config-standardstylelint-config-wordpressstylelint-prettierstylelint-scss
Features
Requirements
Installation
- If your project doesn't have a
package.jsonfile already, create one using thenpm initcommand. - Run the command:
npx install-peerdeps --dev stylelint-config-nahid - Create a file named
.stylelintrcand insert the following there:
{
"extends": [ "stylelint-config-nahid" ]
}This object can also be added in your package.json file instead under the stylelint property.
Learn more about using shareable Stylelint config here.
Usage
- You can try running the following command
stylelint .to run Stylelint. Look at Stylelint's command-line interface guide here. - I prefer adding two scripts to the
package.jsonfile:
"scripts": {
"lint-css": "stylelint \"**/*.{css,scss,sass}\"",
"lint-css:fix": "stylelint \"**/*.{css,scss,sass}\" --fix"
}That way, I can run npm run lint-css and npm run lint-css:fix to lint and lint/fix all the CSS & SCSS files in the codebase.
The documentation for Stylelint as a whole can be found here.