mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Disable ESLint rule func-style.
This commit is contained in:
parent
2056d81682
commit
13e375b281
5 changed files with 1 additions and 12 deletions
|
@ -62,7 +62,7 @@
|
|||
"capitalized-comments": "off",
|
||||
"complexity": "off",
|
||||
"dot-location": ["error", "property"],
|
||||
"func-style": ["error", "declaration"],
|
||||
"func-style": "off",
|
||||
"function-call-argument-newline": "off",
|
||||
"function-paren-newline": "off",
|
||||
"global-require": "off",
|
||||
|
|
|
@ -1451,12 +1451,10 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|||
});
|
||||
}
|
||||
// Call (possibly external) rule function to report errors
|
||||
// eslint-disable-next-line func-style
|
||||
var catchCallsOnError = function (error) { return onError({
|
||||
"lineNumber": 1,
|
||||
"detail": "This rule threw an exception: " + (error.message || error)
|
||||
}); };
|
||||
// eslint-disable-next-line func-style
|
||||
var invokeRuleFunction = function () { return rule.function(params, onError); };
|
||||
if (rule.asynchronous) {
|
||||
// Asynchronous rule, ensure it returns a Promise
|
||||
|
@ -1530,9 +1528,7 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|||
var ruleListAsync = ruleList.filter(function (rule) { return rule.asynchronous; });
|
||||
var ruleListSync = ruleList.filter(function (rule) { return !rule.asynchronous; });
|
||||
var ruleListAsyncFirst = __spreadArray(__spreadArray([], ruleListAsync), ruleListSync);
|
||||
// eslint-disable-next-line func-style
|
||||
var callbackSuccess = function () { return callback(null, formatResults()); };
|
||||
// eslint-disable-next-line func-style
|
||||
var callbackError = function (error) { return callback(error instanceof Error ? error : new Error(error)); };
|
||||
try {
|
||||
var ruleResults = ruleListAsyncFirst.map(forRule);
|
||||
|
@ -3901,7 +3897,6 @@ module.exports = {
|
|||
var matchAny_1 = false;
|
||||
var hasError_1 = false;
|
||||
var anyHeadings_1 = false;
|
||||
// eslint-disable-next-line func-style
|
||||
var getExpected_1 = function () { return requiredHeadings[i_1++] || "[None]"; };
|
||||
forEachHeading(params, function (heading, content) {
|
||||
if (!hasError_1) {
|
||||
|
|
|
@ -586,12 +586,10 @@ function lintContent(
|
|||
});
|
||||
}
|
||||
// Call (possibly external) rule function to report errors
|
||||
// eslint-disable-next-line func-style
|
||||
const catchCallsOnError = (error) => onError({
|
||||
"lineNumber": 1,
|
||||
"detail": `This rule threw an exception: ${error.message || error}`
|
||||
});
|
||||
// eslint-disable-next-line func-style
|
||||
const invokeRuleFunction = () => rule.function(params, onError);
|
||||
if (rule.asynchronous) {
|
||||
// Asynchronous rule, ensure it returns a Promise
|
||||
|
@ -666,9 +664,7 @@ function lintContent(
|
|||
...ruleListAsync,
|
||||
...ruleListSync
|
||||
];
|
||||
// eslint-disable-next-line func-style
|
||||
const callbackSuccess = () => callback(null, formatResults());
|
||||
// eslint-disable-next-line func-style
|
||||
const callbackError =
|
||||
(error) => callback(error instanceof Error ? error : new Error(error));
|
||||
try {
|
||||
|
|
|
@ -20,7 +20,6 @@ module.exports = {
|
|||
let matchAny = false;
|
||||
let hasError = false;
|
||||
let anyHeadings = false;
|
||||
// eslint-disable-next-line func-style
|
||||
const getExpected = () => requiredHeadings[i++] || "[None]";
|
||||
forEachHeading(params, (heading, content) => {
|
||||
if (!hasError) {
|
||||
|
|
|
@ -930,7 +930,6 @@ test.cb("rules", (t) => {
|
|||
let ruleHasAliases = true;
|
||||
let ruleUsesParams = null;
|
||||
const tagAliasParameterRe = /, |: | /;
|
||||
// eslint-disable-next-line func-style
|
||||
const testTagsAliasesParams = (r) => {
|
||||
// eslint-disable-next-line unicorn/prefer-default-parameters
|
||||
r = r || "[NO RULE]";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue