mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Update dependency: eslint to 3.9.1.
This commit is contained in:
parent
f077e4c393
commit
ba3614868b
5 changed files with 10 additions and 9 deletions
|
|
@ -129,6 +129,7 @@
|
||||||
"no-useless-constructor": "error",
|
"no-useless-constructor": "error",
|
||||||
"no-useless-escape": "error",
|
"no-useless-escape": "error",
|
||||||
"no-useless-rename": "error",
|
"no-useless-rename": "error",
|
||||||
|
"no-useless-return": "error",
|
||||||
"no-void": "error",
|
"no-void": "error",
|
||||||
"no-var": "off",
|
"no-var": "off",
|
||||||
"no-warning-comments": "error",
|
"no-warning-comments": "error",
|
||||||
|
|
|
||||||
12
lib/rules.js
12
lib/rules.js
|
|
@ -8,15 +8,15 @@ var atxClosedHeaderSpaceRe = /(?:^#+\s\s+?\S)|(?:\S\s\s+?#+\s*$)/;
|
||||||
var atxHeaderSpaceRe = /^#+\s*\S/;
|
var atxHeaderSpaceRe = /^#+\s*\S/;
|
||||||
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/;
|
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/;
|
||||||
var dollarCommandRe = /^(\s*)(\$\s)/;
|
var dollarCommandRe = /^(\s*)(\$\s)/;
|
||||||
var emptyLinkRe = /\[[^\]]*\](?=(?:\((?:#?|(?:<>))\))|(?:\[[^\]]*\]))/;
|
var emptyLinkRe = /\[[^\]]*](?=(?:\((?:#?|(?:<>))\))|(?:\[[^\]]*]))/;
|
||||||
var htmlRe = /<[^>]*>/;
|
var htmlRe = /<[^>]*>/;
|
||||||
var listItemMarkerRe = /^[\s>]*(?:[\*\+\-]|\d+\.)\s+/;
|
var listItemMarkerRe = /^[\s>]*(?:[*+-]|\d+\.)\s+/;
|
||||||
var reversedLinkRe = /\([^)]+\)\[[^\]^][^\]]*\]/;
|
var reversedLinkRe = /\([^)]+\)\[[^\]^][^\]]*]/;
|
||||||
var spaceAfterBlockQuote = />\s+\S/;
|
var spaceAfterBlockQuote = />\s+\S/;
|
||||||
var spaceBeforeHeaderRe = /^\s+\S/;
|
var spaceBeforeHeaderRe = /^\s+\S/;
|
||||||
var spaceInsideCodeRe = /`(?:(?:\s[^`]*)|(?:[^`]*\s))`/;
|
var spaceInsideCodeRe = /`(?:(?:\s[^`]*)|(?:[^`]*\s))`/;
|
||||||
var spaceInsideEmphasisRe = /(\*\*?|__?)(?:(?:\s.+)|(?:.+\s))\1/;
|
var spaceInsideEmphasisRe = /(\*\*?|__?)(?:(?:\s.+)|(?:.+\s))\1/;
|
||||||
var spaceInsideLinkRe = /\[(?:(?:\s[^\]]*)|(?:[^\]]*\s))\](?=\(\S*\))/;
|
var spaceInsideLinkRe = /\[(?:(?:\s[^\]]*)|(?:[^\]]*\s))](?=\(\S*\))/;
|
||||||
var tabRe = /\t+/;
|
var tabRe = /\t+/;
|
||||||
var trailingPunctuationRe = /.$/;
|
var trailingPunctuationRe = /.$/;
|
||||||
var trailingSpaceRe = /\s+$/;
|
var trailingSpaceRe = /\s+$/;
|
||||||
|
|
@ -28,7 +28,7 @@ function longLineReFunc(options) {
|
||||||
|
|
||||||
// Escapes a string for use in a RegExp
|
// Escapes a string for use in a RegExp
|
||||||
function escapeForRegExp(str) {
|
function escapeForRegExp(str) {
|
||||||
return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
return str.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the indent for a token
|
// Returns the indent for a token
|
||||||
|
|
@ -704,7 +704,7 @@ module.exports = [
|
||||||
if (!list.unordered) {
|
if (!list.unordered) {
|
||||||
var number = 1;
|
var number = 1;
|
||||||
list.items.forEach(function forItem(item) {
|
list.items.forEach(function forItem(item) {
|
||||||
var match = /^[\s>]*([^\.)]*)[\.)]/.exec(item.line);
|
var match = /^[\s>]*([^.)]*)[.)]/.exec(item.line);
|
||||||
errors.addDetailIf(item.lineNumber,
|
errors.addDetailIf(item.lineNumber,
|
||||||
String(number), !match || match[1]);
|
String(number), !match || match[1]);
|
||||||
if (style === "ordered") {
|
if (style === "ordered") {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ module.exports.frontMatterRe = /^---$[^]*?^---$(\r\n|\r|\n)/m;
|
||||||
|
|
||||||
// Regular expression for matching inline disable/enable comments
|
// Regular expression for matching inline disable/enable comments
|
||||||
module.exports.inlineCommentRe =
|
module.exports.inlineCommentRe =
|
||||||
/<!--\s*markdownlint-(dis|en)able((?:\s+[a-z0-9_\-]+)*)\s*-->/ig;
|
/<!--\s*markdownlint-(dis|en)able((?:\s+[a-z0-9_-]+)*)\s*-->/ig;
|
||||||
|
|
||||||
// readFile options for reading with the UTF-8 encoding
|
// readFile options for reading with the UTF-8 encoding
|
||||||
module.exports.utf8Encoding = { "encoding": "utf8" };
|
module.exports.utf8Encoding = { "encoding": "utf8" };
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^13.1.1",
|
"browserify": "^13.1.1",
|
||||||
"cpy-cli": "^1.0.1",
|
"cpy-cli": "^1.0.1",
|
||||||
"eslint": "^3.8.1",
|
"eslint": "^3.9.1",
|
||||||
"glob": "^7.1.1",
|
"glob": "^7.1.1",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"nodeunit": "^0.10.2",
|
"nodeunit": "^0.10.2",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ var configSchema = require("../schema/markdownlint-config-schema.json");
|
||||||
function createTestForFile(file) {
|
function createTestForFile(file) {
|
||||||
return function testForFile(test) {
|
return function testForFile(test) {
|
||||||
test.expect(1);
|
test.expect(1);
|
||||||
var detailedResults = /[\/\\]detailed-results-/.test(file);
|
var detailedResults = /[/\\]detailed-results-/.test(file);
|
||||||
var resultsFile = file.replace(/\.md$/, ".results.json");
|
var resultsFile = file.replace(/\.md$/, ".results.json");
|
||||||
var configFile = file.replace(/\.md$/, ".json");
|
var configFile = file.replace(/\.md$/, ".json");
|
||||||
var actualPromise = Q.nfcall(fs.stat, configFile)
|
var actualPromise = Q.nfcall(fs.stat, configFile)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue