build: update npm install command to use --legacy-peer-deps
This change modifies the build scripts to use --legacy-peer-deps flag when installing npm dependencies to resolve potential peer dependency conflicts during the build process. The change is applied to both bash (build.sh) and batch (build.bat) build scripts.
This commit is contained in:
+40
-70
@@ -10,82 +10,52 @@
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
deprecated: {
|
||||
message: "Formatting rules are being moved out of ESLint core.",
|
||||
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
|
||||
deprecatedSince: "8.53.0",
|
||||
availableUntil: "11.0.0",
|
||||
replacedBy: [
|
||||
{
|
||||
message:
|
||||
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
||||
url: "https://eslint.style/guide/migration",
|
||||
plugin: {
|
||||
name: "@stylistic/eslint-plugin",
|
||||
url: "https://eslint.style",
|
||||
},
|
||||
rule: {
|
||||
name: "wrap-regex",
|
||||
url: "https://eslint.style/rules/wrap-regex",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
type: "layout",
|
||||
meta: {
|
||||
deprecated: true,
|
||||
replacedBy: [],
|
||||
type: "layout",
|
||||
|
||||
docs: {
|
||||
description: "Require parenthesis around regex literals",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/wrap-regex",
|
||||
},
|
||||
docs: {
|
||||
description: "Require parenthesis around regex literals",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/wrap-regex"
|
||||
},
|
||||
|
||||
schema: [],
|
||||
fixable: "code",
|
||||
schema: [],
|
||||
fixable: "code",
|
||||
|
||||
messages: {
|
||||
requireParens:
|
||||
"Wrap the regexp literal in parens to disambiguate the slash.",
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
requireParens: "Wrap the regexp literal in parens to disambiguate the slash."
|
||||
}
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
return {
|
||||
Literal(node) {
|
||||
const token = sourceCode.getFirstToken(node),
|
||||
nodeType = token.type;
|
||||
return {
|
||||
|
||||
if (nodeType === "RegularExpression") {
|
||||
const beforeToken = sourceCode.getTokenBefore(node);
|
||||
const afterToken = sourceCode.getTokenAfter(node);
|
||||
const { parent } = node;
|
||||
Literal(node) {
|
||||
const token = sourceCode.getFirstToken(node),
|
||||
nodeType = token.type;
|
||||
|
||||
if (
|
||||
parent.type === "MemberExpression" &&
|
||||
parent.object === node &&
|
||||
!(
|
||||
beforeToken &&
|
||||
beforeToken.value === "(" &&
|
||||
afterToken &&
|
||||
afterToken.value === ")"
|
||||
)
|
||||
) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "requireParens",
|
||||
fix: fixer =>
|
||||
fixer.replaceText(
|
||||
node,
|
||||
`(${sourceCode.getText(node)})`,
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
if (nodeType === "RegularExpression") {
|
||||
const beforeToken = sourceCode.getTokenBefore(node);
|
||||
const afterToken = sourceCode.getTokenAfter(node);
|
||||
const { parent } = node;
|
||||
|
||||
if (parent.type === "MemberExpression" && parent.object === node &&
|
||||
!(beforeToken && beforeToken.value === "(" && afterToken && afterToken.value === ")")) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "requireParens",
|
||||
fix: fixer => fixer.replaceText(node, `(${sourceCode.getText(node)})`)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user