{"name":"stylelint-order","version":"7.0.0","keywords":["stylelint-plugin","stylelint","css","lint","order"],"author":{"name":"Aleks Hudochenkov","email":"aleks@hudochenkov.com"},"license":"MIT","_id":"stylelint-order@7.0.0","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":"ef129101fcc61f5376a2f89f464829cf1e2e349f","tarball":"http://registry-npm.ywwl.com/stylelint-order/download/stylelint-order-7.0.0.tgz","fileCount":52,"integrity":"sha512-rSWxx0KscYfxU02wEskKXES9lkRzuuONMMNkZ7SUc6uiF3tDKm7e+sE0Ax/SBlG4TUf1sp1R6f3/SlsPGmzthg==","signatures":[{"sig":"MEUCIQCsM6LKGUwTEZD5+qcb09xV6QZdGA86HkqRrRuzYs2MxAIgJHqmt7e5+20f8sPde9fVJ0hpkWlp0/YfReEVIQXcWeg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82900,"size":18785,"noattachment":false,"key":"/stylelint-order/-/stylelint-order-7.0.0.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":"bac91dbe46838d110e3b4e0afd01e4520dc658ff","scripts":{"fix":"eslint . --fix --max-warnings 0 && prettier '**/*.js' --write","lint":"eslint . --max-warnings 0 && prettier '**/*.js' --check","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","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.1.0","description":"A collection of order related linting rules for Stylelint.","directories":{},"lint-staged":{"*.js":["eslint --fix --max-warnings 0","prettier --write"]},"_nodeVersion":"22.11.0","dependencies":{"postcss":"^8.5.3","postcss-sorting":"^9.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.24.0","globals":"^16.0.0","prettier":"~3.5.3","stylelint":"^16.18.0","lint-staged":"^15.5.1","postcss-html":"^1.8.0","postcss-less":"^6.0.0","jest-light-runner":"^0.7.4","jest-watch-typeahead":"^2.2.2","jest-preset-stylelint":"^7.3.0","postcss-styled-syntax":"^0.7.1","eslint-config-prettier":"^10.1.2","eslint-config-hudochenkov":"^11.0.0","prettier-config-hudochenkov":"^0.4.0"},"peerDependencies":{"stylelint":"^16.18.0"},"_npmOperationalInternal":{"tmp":"tmp/stylelint-order_7.0.0_1745011712375_0.4641902043885384","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":1745011712569,"_cnpm_publish_time":1745011712569,"dist-tags":{"latest":"8.1.3"}}