Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stylelint plugin link and global command #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,19 @@ To see a list of the rules, refer to the [stylelint-config-standard](https://git
- [stylelint-webpack-plugin](https://github.com/webpack-contrib/stylelint-webpack-plugin)
- [stylelint PostCSS plugin](https://stylelint.io/user-guide/postcss-plugin)
- [gulp-stylelint](https://github.com/olegskl/gulp-stylelint)
- [Stylelint plugins for your code editor](https://stylelint.io/user-guide/complementary-tools#editor-plugins)

##### Auto fix errors
Stylelint CLI can autofix as many errors as possible. To use the autofixer append `--fix` to a stylelint command.
```
stylelint "foo/*.scss" --fix
```

You may have to install stylelint globally:
```
npm install stylelint -g
```

Comment on lines +949 to +953
Copy link

@sgengler sgengler Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srayeskyo3 yes I think this is a good note as this will confuse people

Additionally, instead of installing globally you can also add a script in package.json to run it as well, like:

"scripts": {
    "styelint": "stylelint foo/**/*.scss'",
  ...
}

then run with npm run stylelint or yarn stylelint

would probably be good to add a note for that as well.

**All items (Warnings and Errors) should be addressed to be inline with Front-End Standards defined in this document.**

A full breakdown of all available Rules in the SASS Linter are available with the [Documentation](https://stylelint.io/user-guide/rules).
Expand Down