{"id":20125902,"url":"https://github.com/robole/stylelint-config-roboleary","last_synced_at":"2025-05-06T17:34:50.062Z","repository":{"id":57373577,"uuid":"387682437","full_name":"robole/stylelint-config-roboleary","owner":"robole","description":"My stylelint config for linting CSS and SCSS. You can use it along side Prettier without conflicts.","archived":false,"fork":false,"pushed_at":"2021-11-16T18:11:38.000Z","size":277,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T08:05:19.108Z","etag":null,"topics":["css","lint","lint-css","lint-scss","linting","prettier","prettier-stylelint","scss","stylelint","stylelint-prettier"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/stylelint-config-roboleary","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"funding.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"roboleary"}},"created_at":"2021-07-20T05:29:15.000Z","updated_at":"2023-08-22T23:16:02.000Z","dependencies_parsed_at":"2022-09-17T16:00:51.357Z","dependency_job_id":null,"html_url":"https://github.com/robole/stylelint-config-roboleary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robole%2Fstylelint-config-roboleary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robole%2Fstylelint-config-roboleary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robole%2Fstylelint-config-roboleary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robole%2Fstylelint-config-roboleary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robole","download_url":"https://codeload.github.com/robole/stylelint-config-roboleary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252734449,"owners_count":21796017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","lint","lint-css","lint-scss","linting","prettier","prettier-stylelint","scss","stylelint","stylelint-prettier"],"created_at":"2024-11-13T20:11:41.580Z","updated_at":"2025-05-06T17:34:49.748Z","avatar_url":"https://github.com/robole.png","language":"JavaScript","funding_links":["https://ko-fi.com/roboleary"],"categories":[],"sub_categories":[],"readme":"# stylelint-config-roboleary\n\nMy stylelint config for linting CSS and SCSS. You can use it along side Prettier without conflicts.\n\nIt includes the following:\n- The [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) config gives a core collection of rules (extending [stylelint-config-recommended](https://github.com/stylelint/stylelint-config-recommended)). It is based on the common stylistic conventions found within a handful of CSS styleguides, including: The Idiomatic CSS Principles, Google's CSS Style Guide, Airbnb's Styleguide, and @mdo's Code Guide.\n- The [stylelint-scss](https://github.com/kristerkari/stylelint-scss) plugin to add more specific rules for SCSS (stylelint supports SCSS syntax by default).\n- The [stylelint-order](https://github.com/hudochenkov/stylelint-order) plugin to order properties into groups, used in conjunction with the rules contained in [stylelint-config-idiomatic-order](https://github.com/ream88/stylelint-config-idiomatic-order).\n- The [stylelint-color-format](https://github.com/filipekiss/stylelint-color-format) plugin to format all colors as [HSLA](https://www.w3schools.com/csSref/func_hsla.asp). The color is set as HSL if opacity is 100%.\n- The [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties) checks for property values that are ignored due to another property value in the same rule e.g. using `display: inline` with `width` or `height`.\n- The [stylelint-config-prettier](https://github.com/prettier/stylelint-config-prettier) to disable any conflicting rules with Prettier. This should always be the last referenced config, so that it's rules are not overwritten.\n\n## Rules changed\n\n### [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard)\n\n- [`declaration-empty-line-before`](https://stylelint.io/user-guide/rules/list/declaration-empty-line-before/): Effectively turn off the rule through ignore option. This clears the way for the ordering plugin to add blank lines.\n\n### [stylelint-color-format](https://github.com/filipekiss/stylelint-color-format)\n\n- [`color-format/format`](https://github.com/filipekiss/stylelint-color-format#configuration-1):  Convert HEX colors to either RGB or HSL formats. **Set to `hsla`**.\n\n### [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties)\n\n- `plugin/declaration-block-no-ignored-properties`: This rule needs to be **set to `true` to enable the plugin**.\n\n## Usage\n\n1. Install this package along with *stylelint* `npm install --save-dev stylelint-config-roboleary stylelint` as *devDependencies*.\n1. Create a stylelint config in your project directory e.g. *.stylelintrc*. Add the following to the file:\n\n\t```json\n    {\n      \"extends\": [\"stylelint-config-roboleary\"]\n    }\n\t```\n\n1. You can add scripts to your _package.json_ to lint and fix your code from the command-line:\n\n   ```json\n   {\n        \"scripts\": {\n          \"lint\": \"stylelint **/*.{css,scss}\",\n          \"lint:fix\": \"npm run style-lint -- --fix\",\n        }\n   }\n   ```\n\n1. Additionally, there are [integrations for code editors](https://stylelint.io/user-guide/integrations/editor). I use the [stylelint extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) for VS Code.\n\n## Configuration in VS Code\n\nIf you want to use stylelint and Prettier in VS Code, I recommend installing these 3 extensions: [stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode), and [Format Code Action](https://marketplace.visualstudio.com/items?itemName=rohit-gohri.format-code-action\u0026ssr=false#review-details) to enable Prettier to be run as a code action.\n\nTo format and lint CSS/SCSS code on save, you can update your user settings with the following:\n\n```json\n{\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  \"editor.formatOnSave\": false,\n  \"editor.codeActionsOnSave\": [\n    \"source.formatDocument\",\n    \"source.fixAll\"\n  ],\n}\n```\n\n## Show gratitude\n\nIf this helped you, please [star the repo](https://github.com/robole/stylelint-config-roboleary/) to help others find it. 🌟\n\nYou can [make a donation](https://ko-fi.com/roboleary) to support me to make more great open-source software and tutorials. 🙏\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobole%2Fstylelint-config-roboleary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobole%2Fstylelint-config-roboleary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobole%2Fstylelint-config-roboleary/lists"}