Skip to content

Commit 7eeafb8

Browse files
authored
Chore: Update ESLint config and plugins (#143)
This matches ESLint configuration as of the last v6 release. Since this only affects devDependencies, it's a chore rather than an upgrade tag.
1 parent f483343 commit 7eeafb8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/processor.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function traverse(node, callbacks, parent) {
4646
function getComment(html) {
4747
const commentStart = "<!--";
4848
const commentEnd = "-->";
49-
const regex = /^(eslint\b|global\s)/;
49+
const regex = /^(eslint\b|global\s)/u;
5050

5151
if (
5252
html.slice(0, commentStart.length) !== commentStart ||
@@ -66,7 +66,7 @@ function getComment(html) {
6666

6767
// Before a code block, blockquote characters (`>`) are also considered
6868
// "whitespace".
69-
const leadingWhitespaceRegex = /^[>\s]*/;
69+
const leadingWhitespaceRegex = /^[>\s]*/u;
7070

7171
/**
7272
* Gets the offset for the first column of the node's first line in the
@@ -115,7 +115,6 @@ function getIndentText(text, node) {
115115
* suffix of the corresponding line in the Markdown code block. There are no
116116
* differences within the line, so the mapping need only provide the offset
117117
* delta at the beginning of each line.
118-
*
119118
* @param {string} text The text of the file.
120119
* @param {ASTNode} node A Markdown code block AST node.
121120
* @param {comments} comments List of configuration comment strings that will be
@@ -308,7 +307,7 @@ function adjustBlock(block) {
308307
// Apply the mapping delta for this range.
309308
return range + block.rangeMap[i - 1].md;
310309
}),
311-
text: message.fix.text.replace(/\n/g, `\n${block.baseIndentText}`)
310+
text: message.fix.text.replace(/\n/gu, `\n${block.baseIndentText}`)
312311
};
313312
}
314313

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
"devDependencies": {
3939
"chai": "^4.2.0",
4040
"eslint": "^6.8.0",
41-
"eslint-config-eslint": "^5.0.1",
42-
"eslint-plugin-node": "^6.0.1",
41+
"eslint-config-eslint": "^6.0.0",
42+
"eslint-plugin-jsdoc": "^15.9.5",
43+
"eslint-plugin-node": "^9.0.0",
4344
"eslint-release": "^1.2.0",
4445
"mocha": "^6.2.2",
4546
"nyc": "^14.1.1"

0 commit comments

Comments
 (0)