Skip to content

Commit

Permalink
tools: introduce remark-preset-lint-node
Browse files Browse the repository at this point in the history
PR-URL: #12756
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
watilde authored and gibfahn committed Oct 31, 2017
1 parent 3d499b3 commit 8d62116
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tools/remark-preset-lint-node/index.js
Original file line number Diff line number Diff line change
@@ -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']
];
42 changes: 42 additions & 0 deletions tools/remark-preset-lint-node/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 8d62116

Please sign in to comment.