{"id":13765317,"url":"https://github.com/thibaudcolas/pre-commit-stylelint","last_synced_at":"2025-04-24T02:54:02.068Z","repository":{"id":146981016,"uuid":"456896278","full_name":"thibaudcolas/pre-commit-stylelint","owner":"thibaudcolas","description":"Mirrors all Stylelint releases for the pre-commit hooks framework.","archived":false,"fork":false,"pushed_at":"2025-04-07T06:44:18.000Z","size":83,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T02:53:57.916Z","etag":null,"topics":["pre-commit-hooks","stylelint"],"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/thibaudcolas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-02-08T11:03:04.000Z","updated_at":"2025-04-09T10:20:38.000Z","dependencies_parsed_at":"2024-01-07T18:11:02.372Z","dependency_job_id":"19b58285-1543-4b37-8531-bebbf0525b31","html_url":"https://github.com/thibaudcolas/pre-commit-stylelint","commit_stats":{"total_commits":242,"total_committers":5,"mean_commits":48.4,"dds":"0.037190082644628086","last_synced_commit":"ceb1009b4f0264dd1917e668db43419d706fa38c"},"previous_names":[],"tags_count":245,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fpre-commit-stylelint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fpre-commit-stylelint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fpre-commit-stylelint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fpre-commit-stylelint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thibaudcolas","download_url":"https://codeload.github.com/thibaudcolas/pre-commit-stylelint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552038,"owners_count":21449162,"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":["pre-commit-hooks","stylelint"],"created_at":"2024-08-03T16:00:36.886Z","updated_at":"2025-04-24T02:54:02.050Z","avatar_url":"https://github.com/thibaudcolas.png","language":null,"funding_links":[],"categories":["Tools"],"sub_categories":["Variables and constraints"],"readme":"# Stylelint mirror for pre-commit\n\nMirrors all* [Stylelint](https://stylelint.io/) releases for the [pre-commit](https://pre-commit.com/) hooks framework.\n\n## Usage\n\nAdd the following to your `.pre-commit-config.yaml`:\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n```\n\nChange [rev](https://pre-commit.com/#repos-rev) to the stylelint version you want to use from the [available versions as tags](https://github.com/thibaudcolas/pre-commit-stylelint/tags).\n\n### With additional dependencies\n\nTo use plugins or shared configurations with `stylelint`, declare them (and stylelint) with [`additional_dependencies`](https://pre-commit.com/#config-additional_dependencies):\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n      additional_dependencies:\n        # stylelint itself needs to be here when using additional_dependencies.\n        - stylelint@14.4.0\n        - stylelint-config-standard-scss@3.0.0\n        # Package names starting with `@` need to be quoted.\n        - \"@scope/my-awesome-plugin@0.12.0\"\n```\n\n### With additional stylelint options\n\nUse pre-commit’s [`args`](https://pre-commit.com/#config-args):\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n      args: [--report-needless-disables, --report-invalid-scope-disables]\n```\n\n### Automatically fix issues\n\nStylelint supports a [`--fix`](https://stylelint.io/user-guide/usage/cli#--fix) option that will automatically fix the code. This requires the [`args`](https://pre-commit.com/#config-args) option:\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n      args: [--fix]\n```\n\n### File types\n\nBy default, this hook will run stylelint for the following file extensions: `.css`, `.sass`, `.scss`. If you want to change this, use [`files`](https://pre-commit.com/#config-files):\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n      files: \\.(scss|vue)$\n```\n\n## Migrating from `awebdeveloper/pre-commit-stylelint`\n\nCompared to [awebdeveloper/pre-commit-stylelint](https://github.com/awebdeveloper/pre-commit-stylelint), this repository makes it possible to control the stylelint version with the `rev` property. This tiny difference removes the guesswork of trying to understand how to set up the hook.\n\nSwitching is just a matter of updating the `repo`, and setting a `rev` for the desired version:\n\n```diff\n-- repo: https://github.com/awebdeveloper/pre-commit-stylelint\n-  rev: c4c991cd38b0218735858716b09924f8b20e3812\n+- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n+  rev: v14.4.0\n  hooks:\n    - id: stylelint\n```\n\n### With an unavailable stylelint versions\n\n\\* some versions of stylelint may be missing, though this isn’t the case as of June 2024 (v16.6.1 and below). This repository doesn’t automatically mirror patch releases to older versions of Stylelint, when they get released after another version with a \"bigger\" version number. If this happens, please [open an issue](https://github.com/thibaudcolas/pre-commit-stylelint/issues/new) so we manually add the release to the mirror. \n\nAs a temporary workaround, you can configure pre-commit to install from any arbitrary version of stylelint with [`additional_dependencies`](https://pre-commit.com/#config-additional_dependencies):\n\n```yaml\n- repo: https://github.com/thibaudcolas/pre-commit-stylelint\n  rev: v14.4.0\n  hooks:\n    - id: stylelint\n      additional_dependencies:\n        # v14.16.43 isn’t available as a tag, so we instead load it directly from npm:\n        - stylelint@14.16.43\n```\n\n## Why this mirror exists\n\npre-commit itself has poor support for the Node ecosystem, preferring to install projects with git rather than using packages as published. Setting up a mirror completely sidesteps those issues, and results in [much faster installation times](https://github.com/thibaudcolas/pre-commit-stylelint/discussions/1).\n\nSee:\n\n- [Document pre-commit framework integration stylelint/stylelint#5373](https://github.com/stylelint/stylelint/issues/5373)\n- [Add mirror for stylelint pre-commit/pre-commit#1768](https://github.com/pre-commit/pre-commit/issues/1768)\n- [Suggestion: move pre-commit support to another repo prettier/prettier#8925](https://github.com/prettier/prettier/issues/8925)\n- [Chore: Add .pre-commit-hooks.yaml file eslint/eslint#13628](https://github.com/eslint/eslint/pull/13628)\n\n## Credits\n\nThis repository is based on [mirrors-prettier](https://github.com/pre-commit/mirrors-prettier), with the hook configuration options of [awebdeveloper/pre-commit-stylelint](https://github.com/awebdeveloper/pre-commit-stylelint).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibaudcolas%2Fpre-commit-stylelint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthibaudcolas%2Fpre-commit-stylelint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibaudcolas%2Fpre-commit-stylelint/lists"}