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:
1 parent
20129a1ac7
commit
ac4f232e5e
787 files changed
+82341
-121690
No files matched your search
+26
-33
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @fileoverview Rule to enforce `default` clauses in `switch` statements to be last
|
||||
* @fileoverview Rule to enforce default clauses in switch statements to be last
|
||||
* @author Milos Djermanovic
|
||||
*/
|
||||
|
||||
@@ -9,43 +9,36 @@
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
|
||||
docs: {
|
||||
description:
|
||||
"Enforce `default` clauses in `switch` statements to be last",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/default-case-last",
|
||||
},
|
||||
docs: {
|
||||
description: "Enforce default clauses in switch statements to be last",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/default-case-last"
|
||||
},
|
||||
|
||||
schema: [],
|
||||
schema: [],
|
||||
|
||||
messages: {
|
||||
notLast: "Default clause should be the last clause.",
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
notLast: "Default clause should be the last clause."
|
||||
}
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
SwitchStatement(node) {
|
||||
const cases = node.cases,
|
||||
indexOfDefault = cases.findIndex(c => c.test === null);
|
||||
create(context) {
|
||||
return {
|
||||
SwitchStatement(node) {
|
||||
const cases = node.cases,
|
||||
indexOfDefault = cases.findIndex(c => c.test === null);
|
||||
|
||||
if (
|
||||
indexOfDefault !== -1 &&
|
||||
indexOfDefault !== cases.length - 1
|
||||
) {
|
||||
const defaultClause = cases[indexOfDefault];
|
||||
if (indexOfDefault !== -1 && indexOfDefault !== cases.length - 1) {
|
||||
const defaultClause = cases[indexOfDefault];
|
||||
|
||||
context.report({
|
||||
node: defaultClause,
|
||||
messageId: "notLast",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
context.report({ node: defaultClause, messageId: "notLast" });
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user