{"id":19652997,"url":"https://github.com/csstools/stylelint-tape","last_synced_at":"2025-04-28T17:31:06.955Z","repository":{"id":50523710,"uuid":"150912022","full_name":"csstools/stylelint-tape","owner":"csstools","description":"Test stylelint plugins","archived":false,"fork":false,"pushed_at":"2024-03-06T16:50:47.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-21T21:41:05.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2018-09-29T23:47:14.000Z","updated_at":"2023-01-17T00:27:02.000Z","dependencies_parsed_at":"2024-04-13T21:36:26.389Z","dependency_job_id":null,"html_url":"https://github.com/csstools/stylelint-tape","commit_stats":{"total_commits":9,"total_committers":3,"mean_commits":3.0,"dds":0.4444444444444444,"last_synced_commit":"dc7fb1f560711162d0c7d65da2800e4d0de0d3d8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-tape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-tape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-tape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fstylelint-tape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/stylelint-tape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251219040,"owners_count":21554442,"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":[],"created_at":"2024-11-11T15:12:52.477Z","updated_at":"2025-04-28T17:31:06.936Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylelint-tape [\u003cimg src=\"https://jonathantneal.github.io/stylelint-logo.svg\" alt=\"stylelint\" width=\"90\" height=\"90\" align=\"right\"\u003e][stylelint]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[stylelint-tape] lets you test [stylelint] plugins.\n\n## Usage\n\nAdd [stylelint-tape] to your project:\n\n```bash\nnpm install stylelint-tape --save-dev\n```\n\nAdd a `.tape.js` file with tests:\n\n```js\nmodule.exports = {\n  'your/rule': [\n    // test the # of warnings\n    {\n      source: 'body { top: 0 }',\n      warnings: 1\n    },\n    // test for specific warnings\n    {\n      source: 'body { top: 0; left: 0 }',\n      warnings: [\n        'Unexpected \"top\" property.',\n        'Unexpected \"left\" property.'\n      ]\n    },\n    // test with arguments\n    {\n      source: 'body { top: 0 }',\n      args: \"always\",\n      warnings: 1\n    },\n    {\n      source: 'body { top: 0 }',\n      args: [ \"always\", { except: \"top\" } ]\n    },\n    // test autofixes\n    {\n      source: 'body { top: 0 }',\n      expect: 'body { inset-block-start: 0 }'\n    }\n  ]\n}\n```\n\nUse [stylelint-tape] in `package.json` to test your plugin:\n\n```json\n{\n  \"scripts\": {\n    \"test:plugin\": \"stylelint-tape\"\n  }\n}\n```\n\n```bash\nnpm run test:plugin\n```\n\nOr, use it within Node.\n\n```js\nconst stylelintTape = require('stylelint-tape');\nconst plugin = require('path/to/plugin');\n\nstylelintTape({ plugin: 'path/to/plugin.js' }, {\n  'your/rule': [\n    {\n      source: 'body { top: 0 }',\n      warnings: 1\n    }\n  ]\n}).then(\n  () =\u003e console.log('tests passed'),\n  error =\u003e console.error('tests failed', error)\n);\n```\n\n[cli-img]: https://img.shields.io/travis/csstools/stylelint-tape.svg\n[cli-url]: https://travis-ci.org/csstools/stylelint-tape\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/stylelint/stylelint\n[npm-img]: https://img.shields.io/npm/v/stylelint-tape.svg\n[npm-url]: https://www.npmjs.com/package/stylelint-tape\n\n[stylelint]: https://github.com/stylelint/stylelint\n[stylelint-tape]: https://github.com/csstools/stylelint-tape\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fstylelint-tape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fstylelint-tape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fstylelint-tape/lists"}