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:
+54
-83
@@ -17,94 +17,65 @@ const anyNonWhitespaceRegex = /\S/u;
|
||||
// Public Interface
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @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: "no-tabs",
|
||||
url: "https://eslint.style/rules/no-tabs",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
type: "layout",
|
||||
meta: {
|
||||
deprecated: true,
|
||||
replacedBy: [],
|
||||
type: "layout",
|
||||
|
||||
docs: {
|
||||
description: "Disallow all tabs",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-tabs",
|
||||
},
|
||||
schema: [
|
||||
{
|
||||
type: "object",
|
||||
properties: {
|
||||
allowIndentationTabs: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
},
|
||||
],
|
||||
docs: {
|
||||
description: "Disallow all tabs",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-tabs"
|
||||
},
|
||||
schema: [{
|
||||
type: "object",
|
||||
properties: {
|
||||
allowIndentationTabs: {
|
||||
type: "boolean",
|
||||
default: false
|
||||
}
|
||||
},
|
||||
additionalProperties: false
|
||||
}],
|
||||
|
||||
messages: {
|
||||
unexpectedTab: "Unexpected tab character.",
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
unexpectedTab: "Unexpected tab character."
|
||||
}
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
const allowIndentationTabs =
|
||||
context.options &&
|
||||
context.options[0] &&
|
||||
context.options[0].allowIndentationTabs;
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
const allowIndentationTabs = context.options && context.options[0] && context.options[0].allowIndentationTabs;
|
||||
|
||||
return {
|
||||
Program(node) {
|
||||
sourceCode.getLines().forEach((line, index) => {
|
||||
let match;
|
||||
return {
|
||||
Program(node) {
|
||||
sourceCode.getLines().forEach((line, index) => {
|
||||
let match;
|
||||
|
||||
while ((match = tabRegex.exec(line)) !== null) {
|
||||
if (
|
||||
allowIndentationTabs &&
|
||||
!anyNonWhitespaceRegex.test(
|
||||
line.slice(0, match.index),
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
while ((match = tabRegex.exec(line)) !== null) {
|
||||
if (allowIndentationTabs && !anyNonWhitespaceRegex.test(line.slice(0, match.index))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
context.report({
|
||||
node,
|
||||
loc: {
|
||||
start: {
|
||||
line: index + 1,
|
||||
column: match.index,
|
||||
},
|
||||
end: {
|
||||
line: index + 1,
|
||||
column: match.index + match[0].length,
|
||||
},
|
||||
},
|
||||
messageId: "unexpectedTab",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
context.report({
|
||||
node,
|
||||
loc: {
|
||||
start: {
|
||||
line: index + 1,
|
||||
column: match.index
|
||||
},
|
||||
end: {
|
||||
line: index + 1,
|
||||
column: match.index + match[0].length
|
||||
}
|
||||
},
|
||||
messageId: "unexpectedTab"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user