Skip to content

Commit

Permalink
build, doc, tools: add eslint-plugin-markdown
Browse files Browse the repository at this point in the history
* Install [email protected]
* Add doc/.eslintrc.yaml
* Add `plugins: [markdown]` to the main .eslintrc.yaml
* .js files in doc folder added to .eslintignore
* Update Makefile, vcbuild.bat, and tools/jslint.js

Refs: #12563
Refs: #12640
Refs: #14047

PR-URL: #14067
Reviewed-By: James Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
vsemozhetbyt authored and MylesBorins committed Jul 21, 2017
1 parent 19ff807 commit ce4718f
Show file tree
Hide file tree
Showing 208 changed files with 19,279 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test/tmp*/
tools/eslint
node_modules
benchmark/tmp/
doc/**/*.js
3 changes: 3 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
root: true

plugins:
- markdown

env:
node: true
es6: true
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,13 @@ bench-idle:

jslint:
@echo "Running JS linter..."
$(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules \
benchmark lib test tools
$(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.md \
benchmark doc lib test tools

jslint-ci:
@echo "Running JS linter..."
$(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
benchmark lib test tools
benchmark doc lib test tools

CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_root_certs.h
Expand Down
12 changes: 12 additions & 0 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Docs-specific linter rules

rules:
# ease some restrictions in doc examples
no-restricted-properties: 0
no-undef: 0
no-unused-vars: 0
strict: 0

# add new ECMAScript features gradually
no-var: 2
prefer-const: 2
22 changes: 22 additions & 0 deletions tools/eslint/node_modules/bail/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tools/eslint/node_modules/bail/history.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions tools/eslint/node_modules/bail/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 103 additions & 0 deletions tools/eslint/node_modules/bail/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions tools/eslint/node_modules/bail/readme.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions tools/eslint/node_modules/character-entities-legacy/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ce4718f

Please sign in to comment.