{"name":"stylelint-order","version":"8.1.1","keywords":["stylelint-plugin","stylelint","css","lint","order"],"author":{"name":"Aleks Hudochenkov","email":"aleks@hudochenkov.com"},"license":"MIT","_id":"stylelint-order@8.1.1","maintainers":[{"name":"hudochenkov","email":"aleks@hudochenkov.com"}],"homepage":"https://github.com/hudochenkov/stylelint-order#readme","bugs":{"url":"https://github.com/hudochenkov/stylelint-order/issues"},"dist":{"shasum":"75fa085cf4cce68eab7f438b5df7ef1597908ea2","tarball":"http://registry-npm.ywwl.com/stylelint-order/download/stylelint-order-8.1.1.tgz","fileCount":59,"integrity":"sha512-LqsEB6VggJuu5v10RtkrQsBObcdwBE7GuAOlwfc/LR3VL/w8UqKX2BOLIjhyGt0Gne/njo7gRNGiJAKhfmPMNw==","signatures":[{"sig":"MEUCIQCrDff3QsUyG+w//T+eOTtZoLLWzhrgdaxblgKmO1Gb1gIgBu3XqnDFA/XksVcbP1ZwN8c1TJzrRPJly0l00smaXZI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91888,"size":20457,"noattachment":false,"key":"/stylelint-order/-/stylelint-order-8.1.1.tgz"},"jest":{"preset":"jest-preset-stylelint","runner":"jest-light-runner","testRegex":".*\\.test\\.js$|rules/.*/tests/.*\\.js$","setupFiles":["./jest-setup.js"],"watchPlugins":["jest-watch-typeahead/filename","jest-watch-typeahead/testname"],"testEnvironment":"node"},"type":"module","engines":{"node":">=20.19.0"},"exports":"./index.js","gitHead":"5e0802a3fca92f06b868761a7c7cbaa5044f4c79","scripts":{"fix":"eslint . --fix --max-warnings 0 && prettier '**/*.js' --write","lint":"eslint . --max-warnings 0 && prettier '**/*.js' --check","test":"jest","watch":"npm run test -- --watch","prepare":"husky","coverage":"npm run test -- --coverage"},"_npmUser":{"name":"hudochenkov","email":"aleks@hudochenkov.com"},"prettier":"prettier-config-hudochenkov","repository":{"url":"git+https://github.com/hudochenkov/stylelint-order.git","type":"git"},"_npmVersion":"11.11.0","description":"A collection of order related linting rules for Stylelint.","directories":{},"lint-staged":{"*.js":["eslint --fix --max-warnings 0","prettier --write"]},"_nodeVersion":"24.11.1","dependencies":{"postcss":"^8.5.8","postcss-sorting":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","husky":"^9.1.7","eslint":"^9.39.4","globals":"^17.4.0","prettier":"~3.8.1","stylelint":"^17.4.0","lint-staged":"^16.3.2","postcss-html":"^1.8.1","postcss-less":"^6.0.0","jest-light-runner":"^0.7.11","jest-watch-typeahead":"^3.0.1","jest-preset-stylelint":"^9.1.0","postcss-styled-syntax":"^0.7.1","eslint-config-prettier":"^10.1.8","eslint-config-hudochenkov":"^13.0.0","prettier-config-hudochenkov":"^0.4.0"},"peerDependencies":{"stylelint":"^16.18.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stylelint-order_8.1.1_1773532965399_0.9881323225108909","host":"s3://npm-registry-packages-npm-production"},"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* [`custom-properties-alphabetical-order`](./rules/custom-properties-alphabetical-order/README.md): Specify the alphabetical order of custom properties (CSS variables) 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 [has limited 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","publish_time":1773532965544,"_cnpm_publish_time":1773532965544,"dist-tags":{"latest":"8.1.3"}}