{"id":15377561,"url":"https://github.com/rstacruz/stylelint-rscss","last_synced_at":"2025-05-12T14:29:14.355Z","repository":{"id":11178880,"uuid":"68639454","full_name":"rstacruz/stylelint-rscss","owner":"rstacruz","description":"Validate CSS with RSCSS conventions","archived":false,"fork":false,"pushed_at":"2022-06-09T05:44:06.000Z","size":162,"stargazers_count":75,"open_issues_count":9,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-03T22:56:13.297Z","etag":null,"topics":["css","rscss","sass","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/rstacruz.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}},"created_at":"2016-09-19T19:33:56.000Z","updated_at":"2023-11-02T04:58:14.000Z","dependencies_parsed_at":"2022-08-18T00:01:10.173Z","dependency_job_id":null,"html_url":"https://github.com/rstacruz/stylelint-rscss","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fstylelint-rscss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fstylelint-rscss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fstylelint-rscss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fstylelint-rscss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstacruz","download_url":"https://codeload.github.com/rstacruz/stylelint-rscss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253337036,"owners_count":21892815,"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","rscss","sass","stylelint"],"created_at":"2024-10-01T14:12:24.871Z","updated_at":"2025-05-12T14:29:14.324Z","avatar_url":"https://github.com/rstacruz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylelint-rscss\n\n\u003e Validate CSS (and SCSS, Less, SugarSS) to RSCSS conventions\n\nstylelint-rscss is a plugin for [stylelint] to validate your code against [RSCSS] conventions. It supports SCSS (Sass), SugarSS and Less, as supported by stylelint.\n\nAs a stylelint plugin, it can be used with stylelint's [hundreds of rules](http://stylelint.io/user-guide/rules/) or other [stylelint configs](https://github.com/stylelint/stylelint-config-standard) to validate other good CSS practices as well.\n\n![](docs/images/cli.png)\n\n[![Status](https://travis-ci.org/rstacruz/stylelint-rscss.svg?branch=master)](https://travis-ci.org/rstacruz/stylelint-rscss \"See test builds\")\n\n\u003cbr\u003e\n\n## Quickstart guide\n\n**Install:** Install [stylelint] and stylelint-rscss to your project.\n\n```sh\nnpm install --save-dev stylelint stylelint-rscss\n```\n\n**Configure:** Create a `.stylelintrc` in your project. Use the `stylelint-rscss/config` configuration, which has defaults for strict RSCSS conventions.\n\n```js\n// .stylelintrc\n{\n  \"extends\": [\n    \"stylelint-rscss/config\"\n  ]\n}\n```\n\n**Add a script:** Add an npm script to your `package.json`.\n\n```js\n// package.json\n{\n  \"scripts\": {\n    \"lint:css\": \"stylelint path/to/css/**/*\"\n  }\n}\n```\n\nRun it!\n\n```sh\nnpm run lint:css\n```\n\n\u003cbr\u003e\n\n## Recommendations\n\nThese steps are not required, but are *highly* recommended:\n\n- Add [stylelint-config-standard](https://www.npmjs.com/package/stylelint-config-standard) as well!\n- Configure your text editor to use stylelint. (See [text editor support](#text-editor-support))\n- Add `npm run lint:css` to your CI script.\n\n\u003cbr\u003e\n\n## Text editor support\n\n![](docs/images/vim.png)\n\nYou need to install stylelint globally (`npm install -g stylelint`) for text editor support.\n\n```sh\nnpm install -g stylelint\n```\n\nAfter that, here are the plugins I'd recommend:\n\n- Neovim: [neomake](https://github.com/neomake/neomake) (no setup needed)\n- Vim: [syntastic](https://github.com/scrooloose/syntastic) (use the `stylelint` checker)\n- Atom: [atom-linter](https://github.com/AtomLinter/atom-linter) + [linter-stylelint](https://atom.io/packages/linter-stylelint)\n\nAlso see stylelint's [complimentary tools](http://stylelint.io/user-guide/complementary-tools/) documentation.\n\n\u003cbr\u003e\n\n## Examples\n\nHere are some valid examples according to [RSCSS] rules.\n\n```scss\n.component-name { }\n  // ✓ Components should be two or more words, separated by dashes.\n.component-name \u003e .element { }\n  // ✓ Elements should be one word. Use `\u003e` to denote markup structure.\n.component-name \u003e .element.-foo { }\n  // ✓ Variant classes begin with a dash (`-`).\n.component-name.-variant { }\n  // ✓ Components can have variants.\n._helper { }\n  // ✓ Helpers start with an underscore (`_`).\n```\n\nSome cases not allowed:\n\n```scss\n.component-name .element { }\n  // ✗ Use `\u003e` to denote markup structure.\n.component-name.variant { }\n  // ✗ Variants must begin with a dash.\n.componentname { }\n  // ✗ Components should be two or more words.\n.component-name.other-component { }\n  // ✗ Only one component name is allowed.\n.component-name \u003e .-foo { }\n.-foo { }\n  // ✗ Variants should be attached to components or elements.\n```\n\nAlso OK:\n\n```scss\nh2 { }\n  // ✓ Bare elements can be styled.\n.component-name \u003e h2 { }\n  // ✓ Bare elements can be styled as elements.\n.component-name \u003e a:hover[aria-hidden=\"false\"] { }\n  // ✓ Pseudo-classes and attributes are OK.\n.component-name:hover \u003e .element { }\n  // ✓ They're ok for components too.\n```\n\nSee [Rules](docs/rules.md) for more examples.\n\n\u003cbr\u003e\n\n## Rules and customization\n\nSee [Rules](docs/rules.md) for a detailed lint of rules and examples of how to customize stylelint-rscss.\n\n\u003cbr\u003e\n\n## Thanks\n\n**stylelint-rscss** © 2016+, Rico Sta. Cruz. Released under the [MIT] License.\u003cbr\u003e\nAuthored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).\n\n\u003e [ricostacruz.com](http://ricostacruz.com) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e GitHub [@rstacruz](https://github.com/rstacruz) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Twitter [@rstacruz](https://twitter.com/rstacruz)\n\n[MIT]: http://mit-license.org/\n[contributors]: http://github.com/rstacruz/stylelint-rscss/contributors\n[stylelint]: http://stylelint.io/\n[RSCSS]: http://rscss.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fstylelint-rscss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstacruz%2Fstylelint-rscss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fstylelint-rscss/lists"}