Skip to content

Commit e5ca046

Browse files
vsemozhetbytMylesBorins
authored andcommitted
build, doc, tools: add eslint-plugin-markdown
* 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]>
1 parent 8c0849d commit e5ca046

File tree

208 files changed

+19279
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+19279
-6
lines changed

β€Ž.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ test/tmp*/
77
tools/eslint
88
node_modules
99
benchmark/tmp/
10+
doc/**/*.js

β€Ž.eslintrc.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
root: true
22

3+
plugins:
4+
- markdown
5+
36
env:
47
node: true
58
es6: true

β€ŽMakefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -751,13 +751,13 @@ bench-idle:
751751

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

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

762762
CPPLINT_EXCLUDE ?=
763763
CPPLINT_EXCLUDE += src/node_root_certs.h

β€Ždoc/.eslintrc.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Docs-specific linter rules
2+
3+
rules:
4+
# ease some restrictions in doc examples
5+
no-restricted-properties: 0
6+
no-undef: 0
7+
no-unused-vars: 0
8+
strict: 0
9+
10+
# add new ECMAScript features gradually
11+
no-var: 2
12+
prefer-const: 2

β€Žtools/eslint/node_modules/bail/LICENSE

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/eslint/node_modules/bail/history.md

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/eslint/node_modules/bail/index.js

+34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/eslint/node_modules/bail/package.json

+103
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/eslint/node_modules/bail/readme.md

+73
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/eslint/node_modules/character-entities-legacy/LICENSE

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)