mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Exclude eslint-plugin-node rules from customRulesLintJavaScript test due to inconsistent behavior on Node 10.
This commit is contained in:
parent
e1eb81cd21
commit
0f4745efe3
2 changed files with 1 additions and 11 deletions
|
|
@ -3945,16 +3945,6 @@ tape("customRulesLintJavaScript", (test) => {
|
||||||
test.ifError(err);
|
test.ifError(err);
|
||||||
const expected = {
|
const expected = {
|
||||||
"test/lint-javascript.md": [
|
"test/lint-javascript.md": [
|
||||||
{
|
|
||||||
"lineNumber": 8,
|
|
||||||
"ruleNames": [ "lint-javascript" ],
|
|
||||||
"ruleDescription": "Rule that lints JavaScript code",
|
|
||||||
"ruleInformation": null,
|
|
||||||
"errorDetail":
|
|
||||||
"Definition for rule 'node/handle-callback-err' was not found.",
|
|
||||||
"errorContext": "\"use strict\";",
|
|
||||||
"errorRange": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"lineNumber": 10,
|
"lineNumber": 10,
|
||||||
"ruleNames": [ "lint-javascript" ],
|
"ruleNames": [ "lint-javascript" ],
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const languageJavaScript = /js|javascript/i;
|
||||||
function cleanJsdocRulesFromEslintConfig(config) {
|
function cleanJsdocRulesFromEslintConfig(config) {
|
||||||
const cleanedConfig = { ...config };
|
const cleanedConfig = { ...config };
|
||||||
for (const rule in config.rules) {
|
for (const rule in config.rules) {
|
||||||
if (/^jsdoc\//.test(rule)) {
|
if (/^(jsdoc|node)\//.test(rule)) {
|
||||||
delete cleanedConfig.rules[rule];
|
delete cleanedConfig.rules[rule];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue