{"id":15283715,"url":"https://github.com/wikimedia/grunt-stylelint","last_synced_at":"2025-10-07T00:31:27.994Z","repository":{"id":8606042,"uuid":"59021879","full_name":"wikimedia/grunt-stylelint","owner":"wikimedia","description":"Stylelint adapter for the Grunt task runner. Moved to Wikimedia GitLab.","archived":true,"fork":false,"pushed_at":"2024-05-03T14:27:37.000Z","size":967,"stargazers_count":28,"open_issues_count":0,"forks_count":13,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-07-02T17:41:31.990Z","etag":null,"topics":["coding-standards","grunt-plugins","stylelint"],"latest_commit_sha":null,"homepage":"https://gitlab.wikimedia.org/repos/ci-tools/grunt-stylelint","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/wikimedia.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","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":"2016-05-17T12:50:34.000Z","updated_at":"2024-05-03T17:26:07.000Z","dependencies_parsed_at":"2024-05-02T13:00:37.919Z","dependency_job_id":"6c48e9dc-2206-48da-bdae-c501266b1c5a","html_url":"https://github.com/wikimedia/grunt-stylelint","commit_stats":{"total_commits":112,"total_committers":16,"mean_commits":7.0,"dds":0.4732142857142857,"last_synced_commit":"de0b7b3ffe80acbfab2639984fa79c58d1b6a243"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/wikimedia/grunt-stylelint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fgrunt-stylelint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fgrunt-stylelint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fgrunt-stylelint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fgrunt-stylelint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikimedia","download_url":"https://codeload.github.com/wikimedia/grunt-stylelint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fgrunt-stylelint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703582,"owners_count":26031204,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["coding-standards","grunt-plugins","stylelint"],"created_at":"2024-09-30T14:45:02.299Z","updated_at":"2025-10-07T00:31:27.691Z","avatar_url":"https://github.com/wikimedia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/grunt-stylelint.svg)](http://badge.fury.io/js/grunt-stylelint)\n[![NPM Downloads](https://img.shields.io/npm/dm/grunt-stylelint.svg)](https://www.npmjs.org/package/grunt-stylelint)\n\n# grunt-stylelint\nGrunt plugin for running [stylelint](http://stylelint.io/)\n\n## Getting started\n\nIf this is the first time you're using [Grunt](http://gruntjs.com/), the [getting started guide](http://gruntjs.com/getting-started) will show you how to get up and running.\n\nOnce you have that installed, with a [Gruntfile](http://gruntjs.com/sample-gruntfile) set for your code, you can install the plugin with:\n\n\u003cpre lang=shell\u003e\nnpm install grunt-stylelint stylelint --save-dev\n\u003c/pre\u003e\n\nNote that this installs both grunt-stylelint and the stylelint tool itself, which is a peer dependency. If you do not explicitly depend on stylelint in your `package.json` file and do not have it available, grunt-stylelint will not work. Modern versions of npm will warn you of such unmet peer dependencies.\n\nIn your Gruntfile, add the line:\n\n\u003cpre lang=js\u003e\ngrunt.loadNpmTasks( 'grunt-stylelint' );\n\u003c/pre\u003e\n\n## Running and configuring `stylelint` task\n\n_Run this task with the `grunt stylelint` command._\n\nYou can specify the targets and options for the task using the normal Grunt configuration – see Grunt's [guide on how to configure tasks](http://gruntjs.com/configuring-tasks) in general.\n\nFor more explanations of the lint errors stylelint will throw at you please visit http://stylelint.io/.\n\n### Usage examples\n\n#### Example simple config\nIn this example, running `grunt stylelint:all` (or `grunt stylelint` because `stylelint` is a [multi task](http://gruntjs.com/configuring-tasks#task-configuration-and-targets)) will lint the project's CSS and Sass files in the `css` and `sass` directories and their subdirectories, using the default stylelint options or the options specified in the `.stylelintrc` in the root of the project. For an example config see http://stylelint.io/user-guide/example-config/.\n\n```js\n// Project configuration.\ngrunt.initConfig({\n  stylelint: {\n    all: ['css/**/*.css', 'sass/**/*.scss']\n  }\n});\n```\n\n#### Example full config\nA full set of config with default options would be:\n```js\n// Project configuration.\ngrunt.initConfig( {\n  stylelint: {\n    options: {\n      configFile: '.stylelintrc',\n      formatter: 'string',\n      ignoreDisables: false,\n      failOnError: true,\n      outputFile: '',\n      reportNeedlessDisables: false,\n      fix: false,\n      syntax: ''\n    },\n    src: [\n            'src/**/*.{css,less,scss}',\n            …,\n            '!src/badstyles/*.css'\n        ]\n    }\n}\n```\n\n### Options\nThe `options` object is passed through to `stylelint`. Options you may wish to set are:\n\n#### formatter\nType: `function` or `string`\nDefault value: `\"string\"`\nValues: `\"string\"`|`\"verbose\"`|`\"json\"`\n\nIn which output format would you like results. If `grunt` is run with `--verbose` and this is not explicitly set, it will act as though you passed in `\"verbose\"`.\n\n#### ignoreDisables\nType: `boolean`\nDefault value: `false`\n\nWhether to ignore inline comments that disable stylelint.\n\n#### outputFile\nType: `string`\n\nOutput the report to a file.\n\n#### reportNeedlessDisables\nType: `boolean`\nDefault value: `false`\n\nWhether to ignore inline comments that disable stylelint and report which ones did not block a lint warning.\n\n#### failOnError\nType: `boolean`\nDefault value: `true`\n\nWhether to fail if stylelint detects an error.\n\n#### fix\nType: `boolean`\nDefault value: `false`\n\nAutomatically fix, where possible, violations reported by rules. If `grunt` is run with `--fix` and this is not explicitly set, it will be set to `true`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fgrunt-stylelint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikimedia%2Fgrunt-stylelint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fgrunt-stylelint/lists"}