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
+52
-50
@@ -15,64 +15,66 @@ const astUtils = require("./utils/ast-utils");
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
|
||||
docs: {
|
||||
description: "Disallow labels that share a name with a variable",
|
||||
recommended: false,
|
||||
frozen: true,
|
||||
url: "https://eslint.org/docs/latest/rules/no-label-var",
|
||||
},
|
||||
docs: {
|
||||
description: "Disallow labels that share a name with a variable",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-label-var"
|
||||
},
|
||||
|
||||
schema: [],
|
||||
schema: [],
|
||||
|
||||
messages: {
|
||||
identifierClashWithLabel:
|
||||
"Found identifier with same name as label.",
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
identifierClashWithLabel: "Found identifier with same name as label."
|
||||
}
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//--------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Check if the identifier is present inside current scope
|
||||
* @param {Object} scope current scope
|
||||
* @param {string} name To evaluate
|
||||
* @returns {boolean} True if its present
|
||||
* @private
|
||||
*/
|
||||
function findIdentifier(scope, name) {
|
||||
return astUtils.getVariableByName(scope, name) !== null;
|
||||
}
|
||||
/**
|
||||
* Check if the identifier is present inside current scope
|
||||
* @param {Object} scope current scope
|
||||
* @param {string} name To evaluate
|
||||
* @returns {boolean} True if its present
|
||||
* @private
|
||||
*/
|
||||
function findIdentifier(scope, name) {
|
||||
return astUtils.getVariableByName(scope, name) !== null;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public API
|
||||
//--------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------
|
||||
// Public API
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
return {
|
||||
LabeledStatement(node) {
|
||||
// Fetch the innermost scope.
|
||||
const scope = sourceCode.getScope(node);
|
||||
return {
|
||||
|
||||
/*
|
||||
* Recursively find the identifier walking up the scope, starting
|
||||
* with the innermost scope.
|
||||
*/
|
||||
if (findIdentifier(scope, node.label.name)) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "identifierClashWithLabel",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
LabeledStatement(node) {
|
||||
|
||||
// Fetch the innermost scope.
|
||||
const scope = sourceCode.getScope(node);
|
||||
|
||||
/*
|
||||
* Recursively find the identifier walking up the scope, starting
|
||||
* with the innermost scope.
|
||||
*/
|
||||
if (findIdentifier(scope, node.label.name)) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "identifierClashWithLabel"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user