{"id":13491967,"url":"https://github.com/hudochenkov/stylelint-order","last_synced_at":"2025-05-13T15:11:48.758Z","repository":{"id":40680436,"uuid":"72451591","full_name":"hudochenkov/stylelint-order","owner":"hudochenkov","description":"A plugin pack of order related linting rules for Stylelint.","archived":false,"fork":false,"pushed_at":"2025-04-18T21:46:50.000Z","size":2226,"stargazers_count":934,"open_issues_count":10,"forks_count":61,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-23T18:59:06.706Z","etag":null,"topics":["hacktoberfest","linting-rules","stylelint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hudochenkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-31T15:45:20.000Z","updated_at":"2025-04-20T08:03:12.000Z","dependencies_parsed_at":"2024-04-17T00:40:23.270Z","dependency_job_id":"ff210730-75da-485b-aa20-4d891067d35d","html_url":"https://github.com/hudochenkov/stylelint-order","commit_stats":{"total_commits":253,"total_committers":20,"mean_commits":12.65,"dds":0.09486166007905139,"last_synced_commit":"7bf797558be74a9aeaf7e7b3dc3fb1ac54a22ad3"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudochenkov%2Fstylelint-order","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudochenkov%2Fstylelint-order/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudochenkov%2Fstylelint-order/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudochenkov%2Fstylelint-order/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hudochenkov","download_url":"https://codeload.github.com/hudochenkov/stylelint-order/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969260,"owners_count":21992263,"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":["hacktoberfest","linting-rules","stylelint"],"created_at":"2024-07-31T19:01:01.989Z","updated_at":"2025-05-13T15:11:43.710Z","avatar_url":"https://github.com/hudochenkov.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# stylelint-order\n\n[![npm version][npm-version-img]][npm] [![npm downloads last month][npm-downloads-img]][npm]\n\nA plugin pack of order-related linting rules for [Stylelint]. Every rule supports autofixing (`stylelint --fix`).\n\n## Installation\n\n1. If you haven't, install [Stylelint]:\n\n```\nnpm install stylelint --save-dev\n```\n\n2.  Install `stylelint-order`:\n\n```\nnpm install stylelint-order --save-dev\n```\n\n## Usage\n\nAdd `stylelint-order` to your Stylelint config `plugins` array, then add rules you need to the rules list. All rules from stylelint-order need to be namespaced with `order`.\n\n```json\n{\n\t\"plugins\": [\n\t\t\"stylelint-order\"\n\t],\n\t\"rules\": {\n\t\t\"order/order\": [\n\t\t\t\"custom-properties\",\n\t\t\t\"declarations\"\n\t\t],\n\t\t\"order/properties-order\": [\n\t\t\t\"width\",\n\t\t\t\"height\"\n\t\t]\n\t}\n}\n```\n\n## Rules\n\n* [`order`](./rules/order/README.md): Specify the order of content within declaration blocks.\n* [`properties-order`](./rules/properties-order/README.md): Specify the order of properties within declaration blocks.\n* [`properties-alphabetical-order`](./rules/properties-alphabetical-order/README.md): Specify the alphabetical order of properties within declaration blocks.\n\n## Autofixing\n\nEvery rule supports autofixing with `stylelint --fix`. [postcss-sorting] is used internally for order autofixing.\n\nAutomatic sorting has some limitations that are described for every rule, if any. Please, take a look at [how comments are handled](https://github.com/hudochenkov/postcss-sorting#handling-comments) by `postcss-sorting`.\n\nCSS-in-JS styles with template interpolation [could be ignored by autofixing](https://github.com/hudochenkov/postcss-sorting#css-in-js) to avoid style corruption.\n\nAutofixing in Less syntax may work but isn't officially supported.\n\n## Example configs\n\nAll these configs have `properties-order` configured  with logical properties groups:\n\n* [`stylelint-config-idiomatic-order`](https://github.com/ream88/stylelint-config-idiomatic-order)\n* [`stylelint-config-hudochenkov/order`](https://github.com/hudochenkov/stylelint-config-hudochenkov/blob/master/order.js)\n* [`stylelint-config-recess-order`](https://github.com/stormwarning/stylelint-config-recess-order)\n* [`stylelint-config-property-sort-order-smacss`](https://github.com/cahamilton/stylelint-config-property-sort-order-smacss)\n* [`stylelint-config-clean-order`](https://github.com/kutsan/stylelint-config-clean-order)\n\n## Thanks\n\n`properties-order` and `properties-alphabetical-order` code and README were based on the `declaration-block-properties-order` rule which was a core rule prior to Stylelint 8.0.0.\n\n[npm-version-img]: https://img.shields.io/npm/v/stylelint-order.svg\n[npm-downloads-img]: https://img.shields.io/npm/dm/stylelint-order.svg\n[npm]: https://www.npmjs.com/package/stylelint-order\n[Stylelint]: https://stylelint.io/\n[postcss-sorting]: https://github.com/hudochenkov/postcss-sorting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudochenkov%2Fstylelint-order","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhudochenkov%2Fstylelint-order","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudochenkov%2Fstylelint-order/lists"}