{"id":21403994,"url":"https://github.com/babbel/stylelint-config","last_synced_at":"2026-01-03T01:53:11.583Z","repository":{"id":262904320,"uuid":"888021121","full_name":"babbel/stylelint-config","owner":"babbel","description":"Hierarchical Stylelint configuration collection that intends to be simple to use, layered, and shared with others","archived":false,"fork":false,"pushed_at":"2024-12-02T21:07:52.000Z","size":105,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T03:29:51.275Z","etag":null,"topics":["npm","stylelint","stylelint-config"],"latest_commit_sha":null,"homepage":"","language":null,"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/babbel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-13T17:15:35.000Z","updated_at":"2024-11-29T18:57:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"485d2d29-c1ee-49e2-856d-8dca5ee15314","html_url":"https://github.com/babbel/stylelint-config","commit_stats":null,"previous_names":["babbel/stylelint-config"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fstylelint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fstylelint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fstylelint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fstylelint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babbel","download_url":"https://codeload.github.com/babbel/stylelint-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243901155,"owners_count":20366251,"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":["npm","stylelint","stylelint-config"],"created_at":"2024-11-22T16:11:30.459Z","updated_at":"2026-01-03T01:53:11.542Z","avatar_url":"https://github.com/babbel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# NPM module `@babbel/stylelint-config`\n\nHierarchical Stylelint configuration collection that intends to be simple to use, layered, and shared with others [[maintainers]](./MAINTAINERS.md)\n\n## Stylelint Configurations\n\nIf you're unfamiliar with [Stylelint](https://stylelint.io), it works similarly to [ESLint](https://eslint.org) with some minor but unique changes in configuration syntax. You can read more about those [differences here](https://stylelint.io/user-guide/configure).\n\nThere are multiple configurations you can use in your projects listed below. Please note that the base configuration is used by all the others, so there's no need to include that in your configuration unless it's the only one you're using.\n\nThe configuration names specified below should be used as items in the `extends` array in your Stylelint configuration file. Each configuration string is clickable to bring you to the configuration details.\n\n- [`@babbel/stylelint-config`](./lib/stylelintBaseConfig.json): base configuration that all configurations inherit from\n- [`@babbel/stylelint-config/css`](./lib/stylelintCssConfig.json): for pure CSS-based stylesheets\n- [`@babbel/stylelint-config/css-modules`](./lib/stylelintCssModulesConfig.json): for CSS module-based stylesheets\n- [`@babbel/stylelint-config/scss`](./lib/stylelintScssConfig.json): for SCSS-based stylesheets\n- [`@babbel/stylelint-config/scss-modules`](./lib/stylelintScssModulesConfig.json): for SCSS module-based stylesheets\n- [`@babbel/stylelint-config/styled-components`](./lib/stylelintStyledComponentsConfig.json): for styled-components\n\n## Configuration Assumptions\n\n- Similar to Prettier, these configurations are highly-opinionated, but unlike Prettier they are all customizable\n  - This is meant to minimize decision paralysis and promote a common baseline\n- Modern, performant features are enforced\n- Browser incompatibilities are proactively avoided if you use [browserslist](https://github.com/browserslist/browserslist) with your project\n\n## Example Usage\n\nHere are a few common use cases to get you familiar with using this collection. The following examples should be added to the `.stylelintrc.json` file at the root of your repository.\n\n### CSS-based Stylesheets\n\n```jsonc\n{ \"extends\": \"@babbel/stylelint-config/css\" }\n```\n\nYep. That's it. 😀\n\nOr if you want to add some custom rules:\n\n```jsonc\n{\n  \"extends\": \"@babbel/stylelint-config/css\",\n  \"rules\": {\n    /* add your custom rules here */\n  },\n}\n```\n\n### CSS Module-based Stylesheets\n\n```jsonc\n{ \"extends\": \"@babbel/stylelint-config/css-modules\" }\n```\n\nI think you're getting the hang of it now...\n\n### SCSS-based Stylesheets and a Custom Rule\n\n```jsonc\n{\n  \"extends\": \"@babbel/stylelint-config/scss\",\n  \"rules\": {\n    \"custom-property-pattern\": \"[a-z]+[a-zA-Z]*\",\n  },\n}\n```\n\n## Making Your Own Config From the Base Config 🎓\n\n```jsonc\n{\n  \"extends\": \"@babbel/stylelint-config\",\n  \"rules\": {\n    /* add all your custom rules here */\n  },\n}\n```\n\nThe config export `@babbel/stylelint-config` maps to the base config file `lib/stylelintBaseConfig.json`. You can see how this works by looking for the `\".\"` entry in the `exports` section of `package.json`; that section defines all the config exports rather than using proxy files such as `index.js` at the root of the repository.\n\nFor example, if you want to add an export called `@babbel/stylelint-config/example`, you would do the following:\n\n- Create a new Stylelint configuration file called `./lib/stylelintExampleConfig.json` and set your preferred settings within.\n- For the `/example` package export to work, add a new entry in the `\"exports\"` section in `package.json`:\n\n```jsonc\n{\n  \"exports\": {\n    /* ... */\n    \"example\": \"./lib/stylelintExampleConfig.json\",\n    /* ... */\n  },\n}\n```\n\n- File a pull request. Be sure to at least extend from `lib/stylelintBaseConfig.json` or one of the more specific configs, otherwise the addition of your contribution to the project may be delayed.\n\n## Final Thoughts\n\nThese are just a few examples. Any configuration option in any Stylelint configuration can be overridden, so you can customize these as much as you want. If you find yourself or your team using a configuration set over and over again, consider submitting it to make it part of this collection.\n\n## Feedback Encouraged 🙂\n\nIf you have any suggestions for improvements, please send them our way. We're interested in your ideas. 📫\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabbel%2Fstylelint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabbel%2Fstylelint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabbel%2Fstylelint-config/lists"}