Skip to content

Commit

Permalink
feat: add stylelint as my css linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Silent-Watcher committed Sep 26, 2023
1 parent b16ff5c commit f3d9590
Show file tree
Hide file tree
Showing 8 changed files with 7,081 additions and 9,311 deletions.
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"pnpm prettier",
"pnpm lint:language"
],
"*.(html|css|md)": ["pnpm prettier", "pnpm lint:language"]
"*.(html|css|md)": ["pnpm prettier", "pnpm lint:language"],
"*.(css|scss|sass)": ["pnpm css:lint", "pnpm css:fix"]
}
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/*.scss
8 changes: 8 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"selector-id-pattern": null,
"selector-class-pattern": null,
"rule-empty-line-before": null
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"cSpell.words": ["Swal", "sweetalert"]
"cSpell.words": ["stylelint", "Swal", "sweetalert"]
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"prettier": "npx prettier --write .",
"prettier:check": "npx prettier --check .",
"lint:language": "npx alex ./*.*",
"prepare": "husky install"
"prepare": "husky install",
"css:lint": "npx stylelint ./src/sass/*.scss",
"css:fix": "npx stylelint --fix ./src/sass/*.scss"
},
"devDependencies": {
"@cspell/eslint-plugin": "^7.3.6",
Expand All @@ -29,6 +31,8 @@
"lint-staged": "^14.0.1",
"prettier": "3.0.3",
"sass": "^1.68.0",
"stylelint": "^15.10.3",
"stylelint-config-standard-scss": "^11.0.0",
"vite": "^4.4.5"
},
"config": {
Expand Down
Loading

0 comments on commit f3d9590

Please sign in to comment.