stylelint-config-nahid

1.0.6 • Public • Published

stylelint-config-nahid

My sharable and pluggable Stylelint configuration.

Contents

Features

  • Lints CSS and SCSS according to latest standards using Stylelint.
  • Formats CSS & SCSS using Prettier.

Requirements

Installation

  1. If your project doesn't have a package.json file already, create one using the npm init command.
  2. Run the command: npx install-peerdeps --dev stylelint-config-nahid
  3. Create a file named .stylelintrc and 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

  1. You can try running the following command stylelint . to run Stylelint. Look at Stylelint's command-line interface guide here.
  2. I prefer adding two scripts to the package.json file:
"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.

Package Sidebar

Install

npm i stylelint-config-nahid

Weekly Downloads

5

Version

1.0.6

License

MIT

Unpacked Size

5.64 kB

Total Files

4

Last publish

Collaborators

  • nfmohit