{"id":15383736,"url":"https://github.com/knownasilya/eslint-plugin-doc-code-blocks","last_synced_at":"2025-04-15T19:38:42.486Z","repository":{"id":65993510,"uuid":"81699613","full_name":"knownasilya/eslint-plugin-doc-code-blocks","owner":"knownasilya","description":"Lint JavaScript in fenced code blocks inside of your block comments","archived":false,"fork":false,"pushed_at":"2017-02-15T15:19:44.000Z","size":182,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T00:12:52.419Z","etag":null,"topics":["code-blocks","comments","eslint","eslint-plugin","jsdoc","lint","yuidoc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knownasilya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2017-02-12T03:12:25.000Z","updated_at":"2024-07-28T03:53:07.000Z","dependencies_parsed_at":"2023-03-10T23:27:18.988Z","dependency_job_id":null,"html_url":"https://github.com/knownasilya/eslint-plugin-doc-code-blocks","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"442626a4d4ab65e20224b92a75a167e9cb9991aa"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Feslint-plugin-doc-code-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Feslint-plugin-doc-code-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Feslint-plugin-doc-code-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Feslint-plugin-doc-code-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knownasilya","download_url":"https://codeload.github.com/knownasilya/eslint-plugin-doc-code-blocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249139906,"owners_count":21219194,"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":["code-blocks","comments","eslint","eslint-plugin","jsdoc","lint","yuidoc"],"created_at":"2024-10-01T14:39:30.188Z","updated_at":"2025-04-15T19:38:42.441Z","avatar_url":"https://github.com/knownasilya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-doc-code-blocks\n\nLint JavaScript in block comment code blocks\n\n[![Build Status](https://travis-ci.org/knownasilya/eslint-plugin-doc-code-blocks.svg?branch=master)](https://travis-ci.org/knownasilya/eslint-plugin-doc-code-blocks)\n\n![Screenshot](screenshot.png)\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-doc-code-blocks`:\n\n```\n$ npm install eslint-plugin-doc-code-blocks --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-doc-code-blocks` globally.\n\n## Usage\n\nAdd `doc-code-blocks` to the plugins section of your `.eslintrc.js` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```js\nmodule.exports = {\n  plugins: [\n    'doc-code-blocks'\n  ]\n};\n```\n\n## Configuration\n\nBy default, the `doc-code-blocks` plugin uses the default ESLint rules, and the values for these could change\nfrom one ESLint release to another. So you'd want to lock in your rules, or you might want different rules\nthen your code base. This is how you'd do that.\n\nIn a file like `.doc.eslintrc.js` or equivalent, set something like:\n\n```js\nmodule.exports = {\n  extends: [\n    'plugin:doc-code-blocks/recommended'\n  ],\n  plugins: [\n    'doc-code-blocks'\n  ],\n  rules: {\n    'quotes': ['error', 'single']\n  }\n};\n```\n\nYou can now call this via `eslint --config .doc.eslintrc.js your_files`, basically you'd have to calls to `esslint`, one for your code\nand one for the comments.\n\nYou can use all of the default ESLint rules here, like `quotes` above.\n\n*Note: This plugin doesn't currently provide any rules of it's own.*\n\n### Available Extends\n\n- `'plugin:doc-code-blocks/all'` - This is essentially `eslint:all`, and can break your build from release to release, since all rules are enabled,\n  even new ones. Make sure to turn off rules you don't want, if using this mode.\n- `'plugin:doc-code-blocks/recommended'` - This is essentially `eslint:recommended`, and shouldn't break within a major version of ESLint.\n\n## Attribution\n\nThanks to @locks for the idea, and thanks to @ilyavolodin and @platinumazure from the ESLint gitter channel.\nAlso took inspiration from https://github.com/eslint/eslint-plugin-markdown\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknownasilya%2Feslint-plugin-doc-code-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknownasilya%2Feslint-plugin-doc-code-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknownasilya%2Feslint-plugin-doc-code-blocks/lists"}