@jeffersonwilliammachado/stylelint-config
v0.0.0
Published
Shareable commitlint config
Downloads
2
Maintainers
Readme
@jeffersonwilliammachado/stylelint-config
Shareable stylelint
config.
Install
# pnpm
pnpm i -D @jeffersonwilliammachado/stylelint-config @stylelint/cli
# npm
npm i -D @jeffersonwilliammachado/stylelint-config @stylelint/cli
# Yarn
yarn add -D @jeffersonwilliammachado/stylelint-config @stylelint/cli
Usage
After installing it, apply the config to stylelint
by running the following command:
echo "module.exports = { extends: ['@jeffersonwilliammachado/stylelint-config'] };" > stylelint.config.js
Bonus
To lint commits before they are created, install Husky and use the 'commit-msg' hook.
# npm
pnpm i -D husky
# npm
npm i -D husky
# yarn
yarn add -D husky
After that, you can create a .huskyrc
file or add to your package.json
the following code for
Husky v5:
# .husky/commit-msg
# pnpm
pnpx stylelint --quiet 'src/**/*.{css,scss,tsx}' --fix
# npm
npx stylelint --quiet 'src/**/*.{css,scss,tsx}' --fix
# yarn
yarn stylelint --quiet 'src/**/*.{css,scss,tsx}' --fix
License
MIT License