@fourdigit/stylelint-config-fourdigit
v5.0.0
Published
The shareable stylelint config for Fourdigit production.
Downloads
1,033
Readme
@fourdigit/stylelint-config-fourdigit
The shareable stylelint config for Fourdigit production.
Extends
Plugins
Requirements
- Node.js >= 18.12.0
- stylelint >= 16.8.0
Installation
# peerDependencies
npm i -D stylelint stylelint-config-standard-scss stylelint-config-recess-order @stylistic/stylelint-plugin
npm i -D @fourdigit/stylelint-config-fourdigitUsage
If you've installed @fourdigit/stylelint-config-fourdigit locally within your project, just set your stylelint config to:
.stylelintrc.json
{
"extends": "@fourdigit/stylelint-config-fourdigit"
}stylelint.config.js
module.exports = {
extends: ["@fourdigit/stylelint-config-fourdigit"],
};Using on Vscode extension
If you use vscode-stylelint extension.
Add options on workspace or user settings
.vscode/settings.json
{
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss"]
}Migration from v4.x
v5.0.0 upgrades to stylelint 16 and introduces breaking changes:
Breaking Changes
- Node.js requirement: >= 18.12.0
- stylelint version: >= 16.8.0
- New peer dependency:
@stylistic/stylelint-pluginis now required - Removed:
stylelint-config-prettier(no longer needed) - Removed rule:
selector-no-qualifying-type(removed from stylelint)
Stylistic Rules
Stylistic rules (indentation, quotes, spacing, etc.) have been migrated to @stylistic/stylelint-plugin. The behavior remains the same.
Update Steps
# Remove old packages
npm uninstall stylelint-config-prettier
# Update peer dependencies
npm i -D stylelint@^16.8.0 stylelint-config-standard-scss@^13.0.0 stylelint-config-recess-order@^4.6.0 @stylistic/stylelint-plugin@^3.0.0
# Update this package
npm i -D @fourdigit/stylelint-config-fourdigit@^5.0.0