{"name":"eslint-plugin-markdown","version":"1.0.0-beta.8","description":"An ESLint plugin to lint JavaScript in Markdown code fences.","license":"MIT","author":{"name":"Brandon Mills","url":"https://github.com/btmills"},"repository":{"type":"git","url":"git+https://github.com/eslint/eslint-plugin-markdown.git"},"bugs":{"url":"https://github.com/eslint/eslint-plugin-markdown/issues"},"homepage":"https://github.com/eslint/eslint-plugin-markdown#readme","keywords":["eslint","eslintplugin","markdown","lint","linter"],"scripts":{"lint":"eslint Makefile.js lib/**/*.js tests/lib/plugin.js","test":"npm run lint && npm run test-cov","test-cov":"istanbul cover _mocha -- -c tests/lib/**/*.js","release":"eslint-release","ci-release":"eslint-ci-release","gh-release":"eslint-gh-release","alpharelease":"eslint-prerelease alpha","betarelease":"eslint-prerelease beta"},"main":"index.js","files":["index.js","lib/index.js","lib/processor.js"],"devDependencies":{"chai":"^3.0.0","eslint":"^2.2.0","eslint-config-eslint":"^3.0.0","eslint-release":"^0.10.2","istanbul":"^0.4.5","mocha":"^2.2.5"},"dependencies":{"object-assign":"^4.0.1","remark-parse":"^3.0.0","unified":"^6.1.2"},"readme":"# eslint-plugin-markdown\n\n![Screenshot](screenshot.png)\n\nAn [ESLint](http://eslint.org/) plugin to lint JavaScript in Markdown.\n\nSupported extensions are `.markdown`, `.mdown`, `.mkdn`, and `.md`.\n\n## Usage\n\nInstall the plugin:\n\n```sh\nnpm install --save-dev eslint eslint-plugin-markdown\n```\n\nAdd it to your `.eslintrc`:\n\n```json\n{\n    \"plugins\": [\n        \"markdown\"\n    ]\n}\n```\n\nRun ESLint on `.md` files:\n\n```sh\neslint --ext md .\n```\n\nIt will lint `js`, `javascript`, `jsx`, or `node` [fenced code blocks](https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks) in your Markdown documents:\n\n    ```js\n    // This gets linted\n    var answer = 6 * 7;\n    console.log(answer);\n    ```\n\n    ```JavaScript\n    // This also gets linted\n\n    /* eslint quotes: [2, \"double\"] */\n\n    function hello() {\n        console.log(\"Hello, world!\");\n    }\n    hello();\n    ```\n\n    ```jsx\n    // This gets linted too\n    var div = <div className=\"jsx\"></div>;\n    ```\n\n    ```node\n    // And this\n    console.log(process.version);\n    ```\n\nBlocks that don't specify either `js`, `javascript`, `jsx`, or `node` syntax are ignored:\n\n    ```\n    This is plain text and doesn't get linted.\n    ```\n\n    ```python\n    print(\"This doesn't get linted either.\")\n    ```\n\n## Configuration Comments\n\nThe processor will convert HTML comments immediately preceding a code block into JavaScript block comments and insert them at the beginning of the source code that it passes to ESLint. This permits configuring ESLint via configuration comments while keeping the configuration comments themselves hidden when the markdown is rendered. Comment bodies are passed through unmodified, so the plugin supports any [configuration comments](http://eslint.org/docs/user-guide/configuring) supported by ESLint itself.\n\nThis example enables the `browser` environment, disables the `no-alert` rule, and configures the `quotes` rule to prefer single quotes:\n\n    <!-- eslint-env browser -->\n    <!-- eslint-disable no-alert -->\n    <!-- eslint quotes: [\"error\", \"single\"] -->\n\n    ```js\n    alert('Hello, world!');\n    ```\n\nEach code block in a file is linted separately, so configuration comments apply only to the code block that immediately follows.\n\n    Assuming `no-alert` is enabled in `.eslintrc`, the first code block will have no error from `no-alert`:\n\n    <!-- eslint-env browser -->\n    <!-- eslint-disable no-alert -->\n\n    ```js\n    alert(\"Hello, world!\");\n    ```\n\n    But the next code block will have an error from `no-alert`:\n\n    <!-- eslint-env browser -->\n\n    ```js\n    alert(\"Hello, world!\");\n    ```\n\n## Skipping Blocks\n\nSometimes it can be useful to have code blocks marked with `js` even though they don't contain valid JavaScript syntax, such as commented JSON blobs that need `js` syntax highlighting. Standard `eslint-disable` comments only silence rule reporting, but ESLint still reports any syntax errors it finds. In cases where a code block should not even be parsed, insert a non-standard `<!-- eslint-skip -->` comment before the block, and this plugin will hide the following block from ESLint. Neither rule nor syntax errors will be reported.\n\n    There are comments in this JSON, so we use `js` syntax for better\n    highlighting. Skip the block to prevent warnings about invalid syntax.\n\n    <!-- eslint-skip -->\n\n    ```js\n    {\n        // This code block is hidden from ESLint.\n        \"hello\": \"world\"\n    }\n    ```\n\n    ```js\n    console.log(\"This code block is linted normally.\");\n    ```\n\n## Unsatisfiable Rules\n\nSince code blocks are not files themselves but embedded inside a Markdown document, some rules do not apply to Markdown code blocks, and messages from these rules are automatically suppressed:\n\n- `eol-last`\n\n## Contributing\n\n```sh\n$ git clone https://github.com/eslint/eslint-plugin-markdown.git\n$ cd eslint-plugin-markdown\n$ npm install\n$ npm test\n```\n\nThis project follows the [ESLint contribution guidelines](http://eslint.org/docs/developer-guide/contributing/).\n","readmeFilename":"README.md","gitHead":"9ab617382b0583dd75a0bf968bca1f7459bb77bc","_id":"eslint-plugin-markdown@1.0.0-beta.8","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"eslint","email":"nicholas+eslint@nczconsulting.com"},"dist":{"integrity":"sha512-prVwlwGQLaBaVGUhSa68KLvZDKc789ezMqY1kbKaGA7KyLN0OW64yBFjnTRRFdWBGx3SQ+BYAvuK2W4dzy9eoA==","shasum":"8d10707fdc551dc28ed9e14bd03c18f776e2fb76","tarball":"http://registry-npm.ywwl.com/eslint-plugin-markdown/download/eslint-plugin-markdown-1.0.0-beta.8.tgz","fileCount":7,"unpackedSize":13082,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4vZsjZd5aJgaqOmy/AUjzJFvsyNoBXYO1LfBdTPToOAiBN+HH16xTvTU8W2Zlo/Woaylvw1PQYNOHDsaGHg3zO1A=="}],"size":5224,"noattachment":false,"key":"/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.0-beta.8.tgz"},"maintainers":[{"email":"mills.brandont@gmail.com","name":"btmills"},{"email":"nicholas+eslint@nczconsulting.com","name":"eslint"},{"email":"ivolodin@gmail.com","name":"ivolodin"},{"email":"nicholas@nczconsulting.com","name":"nzakas"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-markdown_1.0.0-beta.8_1523222288528_0.8478862937408953"},"_hasShrinkwrap":false,"publish_time":1523222288600,"deprecated":"Please use @eslint/markdown instead","_cnpm_publish_time":1523222288600,"dist-tags":{"latest":"5.1.0","next":"2.0.0-rc.2"}}