diff --git a/tools/remark-preset-lint-node/index.js b/tools/remark-preset-lint-node/index.js new file mode 100644 index 00000000000000..132bc7eae24210 --- /dev/null +++ b/tools/remark-preset-lint-node/index.js @@ -0,0 +1,44 @@ +// @see https://github.com/nodejs/node/blob/master/doc/STYLE_GUIDE.md + +'use strict'; + +module.exports.plugins = [ + require('remark-lint'), + require('remark-lint-checkbox-content-indent'), + require('remark-lint-definition-spacing'), + require('remark-lint-fenced-code-flag'), + require('remark-lint-final-definition'), + require('remark-lint-final-newline'), + require('remark-lint-hard-break-spaces'), + require('remark-lint-no-auto-link-without-protocol'), + require('remark-lint-no-blockquote-without-caret'), + require('remark-lint-no-duplicate-definitions'), + require('remark-lint-no-file-name-articles'), + require('remark-lint-no-file-name-consecutive-dashes'), + require('remark-lint-no-file-name-outer-dashes'), + require('remark-lint-no-heading-content-indent'), + require('remark-lint-no-heading-indent'), + require('remark-lint-no-inline-padding'), + require('remark-lint-no-multiple-toplevel-headings'), + require('remark-lint-no-shell-dollars'), + require('remark-lint-no-shortcut-reference-image'), + require('remark-lint-no-table-indentation'), + require('remark-lint-no-tabs'), + require('remark-lint-no-unused-definitions'), + require('remark-lint-rule-style'), + require('remark-lint-table-pipes'), + [require('remark-lint-blockquote-indentation'), 2], + [ + require('remark-lint-checkbox-character-style'), + { + 'checked': 'x', 'unchecked': ' ' + } + ], + [require('remark-lint-code-block-style'), 'fenced'], + [require('remark-lint-fenced-code-marker'), '`'], + [require('remark-lint-file-extension'), 'md'], + [require('remark-lint-first-heading-level'), 1], + [require('remark-lint-heading-style'), 'atx'], + [require('remark-lint-strong-marker'), '*'], + [require('remark-lint-table-cell-padding'), 'padded'] +]; diff --git a/tools/remark-preset-lint-node/package.json b/tools/remark-preset-lint-node/package.json new file mode 100644 index 00000000000000..000a5a2901d4e7 --- /dev/null +++ b/tools/remark-preset-lint-node/package.json @@ -0,0 +1,42 @@ +{ + "private": true, + "name": "remark-preset-lint-node", + "version": "1.0.0", + "description": "remark preset to configure remark-lint with settings for nodejs/node", + "main": "index.js", + "dependencies": { + "remark-lint": "^6.0.0", + "remark-lint-blockquote-indentation": "^1.0.0", + "remark-lint-checkbox-character-style": "^1.0.0", + "remark-lint-checkbox-content-indent": "^1.0.0", + "remark-lint-code-block-style": "^1.0.0", + "remark-lint-definition-spacing": "^1.0.0", + "remark-lint-fenced-code-flag": "^1.0.0", + "remark-lint-fenced-code-marker": "^1.0.0", + "remark-lint-file-extension": "^1.0.0", + "remark-lint-final-definition": "^1.0.0", + "remark-lint-final-newline": "^1.0.0", + "remark-lint-first-heading-level": "^1.0.0", + "remark-lint-hard-break-spaces": "^1.0.1", + "remark-lint-heading-style": "^1.0.0", + "remark-lint-no-auto-link-without-protocol": "^1.0.0", + "remark-lint-no-blockquote-without-caret": "^1.0.0", + "remark-lint-no-duplicate-definitions": "^1.0.0", + "remark-lint-no-file-name-articles": "^1.0.0", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", + "remark-lint-no-file-name-outer-dashes": "^1.0.0", + "remark-lint-no-heading-content-indent": "^1.0.0", + "remark-lint-no-heading-indent": "^1.0.0", + "remark-lint-no-inline-padding": "^1.0.0", + "remark-lint-no-multiple-toplevel-headings": "^1.0.0", + "remark-lint-no-shell-dollars": "^1.0.0", + "remark-lint-no-shortcut-reference-image": "^1.0.0", + "remark-lint-no-table-indentation": "^1.0.0", + "remark-lint-no-tabs": "^1.0.0", + "remark-lint-no-unused-definitions": "^1.0.0", + "remark-lint-rule-style": "^1.0.0", + "remark-lint-strong-marker": "^1.0.0", + "remark-lint-table-cell-padding": "^1.0.0", + "remark-lint-table-pipes": "^1.0.0" + } +}