{"id":22533447,"url":"https://github.com/oknoorap/wpcs","last_synced_at":"2025-04-09T18:04:21.065Z","repository":{"id":57399593,"uuid":"92712124","full_name":"oknoorap/wpcs","owner":"oknoorap","description":":page_with_curl: Check WordPress Coding Standards in Node.js","archived":false,"fork":false,"pushed_at":"2018-03-03T06:38:24.000Z","size":1373,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-08T18:49:22.747Z","etag":null,"topics":["nodejs","php-test","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/oknoorap.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}},"created_at":"2017-05-29T06:18:16.000Z","updated_at":"2021-04-28T12:37:30.000Z","dependencies_parsed_at":"2022-09-09T22:21:59.544Z","dependency_job_id":null,"html_url":"https://github.com/oknoorap/wpcs","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oknoorap%2Fwpcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oknoorap%2Fwpcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oknoorap%2Fwpcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oknoorap%2Fwpcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oknoorap","download_url":"https://codeload.github.com/oknoorap/wpcs/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947819,"owners_count":21023058,"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":["nodejs","php-test","wordpress"],"created_at":"2024-12-07T09:08:20.053Z","updated_at":"2025-04-09T18:04:21.036Z","avatar_url":"https://github.com/oknoorap.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :page_with_curl: wpcs\n\u003e Check WordPress Coding Standards quickly with Node.js without installing any PHP dependencies.\n\n## :computer: Install \nUsing NPM  \n```bash\n$ npm install wpcs --save\n```\n\nUsing Yarn\n```bash\n$ yarn add wpcs\n```\n\nIf you want to use CLI version, please install it globally.\n\n```bash\n# NPM\n$ npm install wpcs -g\n\n# Yarn\n$ yarn global add wpcs\n```\n\n## :elephant: PHP Scripts\nThis module depends on these scripts below, using `git subtree` method under `scripts` directory.\n\n* [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)\n* [Wordpress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards)\n\n## :books: Usage Example as Module\n```javascript\nconst WPCS = require('wpcs')\n\nconst wpcs = new WPCS(path, rule)\n\nwpcs.on('start', () =\u003e {\n  // Your script here\n})\n\nwpcs.on('scan', filename =\u003e {\n  // Filename\n})\n\nwpcs.on('error', (filename, info) =\u003e {\n  // Filename, {line: Number, column: Number, message: Number}\n})\n\nwpcs.on('warning', (filename, info) =\u003e {\n  // Filename, {line: Number, column: Number, message: Number}\n})\n\nwpcs.on('done', totals =\u003e {\n  // {errors: Number, warnings: Numbers, files: Numbers}\n})\n\n// Get error process\nwpcs.process.on('error', err =\u003e {\n  console.log(err)\n})\n```\n\n## :zap: CLI\n\n[![https://gyazo.com/e655bf900ae1693d6d98bcbb1d447d5c](https://i.gyazo.com/e655bf900ae1693d6d98bcbb1d447d5c.gif)](https://gyazo.com/e655bf900ae1693d6d98bcbb1d447d5c)\n\n```bash\nwpcs - Check WordPress Coding Standard\n\n  USAGE\n    wpcs [path]\n\n  ARGUMENTS\n    [path]    Script path could be a directory or filename. optional\n\n  OPTIONS\n    --rule \u003crulename\u003e   Default rule is WordPress-Extra + WordPress-Docs. WordPress | WordPress-Core | WordPress-Docs | WordPress-Extra | WordPress-VIP. optional\n    --autofix           Auto fix errors. optional\n    --skip-warning      Skip Warning. optional\n    --excludes          Excludes Path. optional\n```\n\n## License\nMIT © [oknoorap](https://github.com/oknoorap)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foknoorap%2Fwpcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foknoorap%2Fwpcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foknoorap%2Fwpcs/lists"}