From 3318ea516586eb7db747075e4f960edce0832271 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Tue, 25 Apr 2017 13:54:06 +0300 Subject: [PATCH] doc, tools: add doc linting to CI Fixes: https://github.com/nodejs/node/issues/12635 Refs: https://github.com/nodejs/node/pull/12563 --- Makefile | 2 +- tools/jslint.js | 4 +++- vcbuild.bat | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 497ec976eaf391..0a217bd8932d92 100644 --- a/Makefile +++ b/Makefile @@ -861,7 +861,7 @@ jslint: 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 diff --git a/tools/jslint.js b/tools/jslint.js index 5aa6079dea9fa5..245a5c570b7a90 100644 --- a/tools/jslint.js +++ b/tools/jslint.js @@ -1,6 +1,7 @@ 'use strict'; const rulesDirs = ['tools/eslint-rules']; +const extensions = ['.js', '.md']; // This is the maximum number of files to be linted per worker at any given time const maxWorkload = 40; @@ -14,7 +15,8 @@ const glob = require('./eslint/node_modules/glob'); const cwd = process.cwd(); const cliOptions = { - rulePaths: rulesDirs + rulePaths: rulesDirs, + extensions: extensions, }; // Check if we should fix errors that are fixable diff --git a/vcbuild.bat b/vcbuild.bat index 392f89909c07e6..582d8a398e5619 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -426,7 +426,7 @@ goto exit :jslint-ci echo running jslint-ci -%config%\node tools\jslint.js -J -f tap -o test-eslint.tap benchmark lib test tools +%config%\node tools\jslint.js -J -f tap -o test-eslint.tap benchmark doc lib test tools goto exit :no-lint