Skip to content

Commit 2463bd0

Browse files
cjihrigtargos
authored andcommitted
tools: update eslint-plugin-markdown configuration
This commit updates the linting setup to work with [email protected]. This also allows the update-eslint script to continue to function properly without changes. PR-URL: #37549 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent f868fac commit 2463bd0

File tree

15 files changed

+331
-372
lines changed

15 files changed

+331
-372
lines changed

.eslintrc.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ module.exports = {
5353
overrides: [
5454
{
5555
files: [
56-
'doc/api/esm.md',
57-
'doc/api/module.md',
58-
'doc/api/modules.md',
59-
'doc/api/packages.md',
60-
'doc/api/wasi.md',
56+
'doc/api/esm.md/*.js',
57+
'doc/api/module.md/*.js',
58+
'doc/api/modules.md/*.js',
59+
'doc/api/packages.md/*.js',
60+
'doc/api/wasi.md/*.js',
6161
'test/es-module/test-esm-type-flag.js',
6262
'test/es-module/test-esm-type-flag-alias.js',
6363
'*.mjs',
@@ -67,6 +67,10 @@ module.exports = {
6767
},
6868
{
6969
files: ['**/*.md'],
70+
processor: 'markdown/markdown',
71+
},
72+
{
73+
files: ['**/*.md/*.js'],
7074
parserOptions: { ecmaFeatures: { impliedStrict: true } },
7175
rules: { strict: 'off' },
7276
},

Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ lint-md: lint-js-doc | tools/.mdlintstamp
12221222
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools
12231223

12241224
run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \
1225-
--report-unused-disable-directives --ext=$(EXTENSIONS) $(LINT_JS_TARGETS)
1225+
--report-unused-disable-directives $(LINT_JS_TARGETS)
12261226
run-lint-js-fix = $(run-lint-js) --fix
12271227

12281228
.PHONY: lint-js-fix
@@ -1233,8 +1233,6 @@ lint-js-fix:
12331233
.PHONY: lint-js-doc
12341234
# Note that on the CI `lint-js-ci` is run instead.
12351235
# Lints the JavaScript code with eslint.
1236-
lint-js lint-js-fix: EXTENSIONS=.js,.mjs,.md
1237-
lint-js-doc: EXTENSIONS=.md
12381236
lint-js lint-js-doc:
12391237
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
12401238
echo "Skipping $@ (no crypto)"; \
@@ -1247,7 +1245,7 @@ jslint: lint-js
12471245
$(warning Please use lint-js instead of jslint)
12481246

12491247
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1250-
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
1248+
--report-unused-disable-directives -f tap \
12511249
-o test-eslint.tap $(LINT_JS_TARGETS)
12521250

12531251
.PHONY: lint-js-ci

0 commit comments

Comments
 (0)