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:
Luiz Costa
2025-11-18 10:23:55 -03:00
parent 20129a1ac7
commit ac4f232e5e
787 changed files with 82341 additions and 121690 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { pattern } = it;
module.exports = function(it) {
const { pattern } = it;
return `
return `
You are linting "${pattern}", but all of the files matching the glob pattern "${pattern}" are ignored.
If you don't want to lint these files, remove the pattern "${pattern}" from the list of arguments passed to ESLint.
-21
View File
@@ -1,21 +0,0 @@
"use strict";
module.exports = function (it) {
const { pattern } = it;
return `
You are linting "${pattern}", but all of the files matching the glob pattern "${pattern}" are ignored.
If you don't want to lint these files, remove the pattern "${pattern}" from the list of arguments passed to ESLint.
If you do want to lint these files, explicitly list one or more of the files from this glob that you'd like to lint to see more details about why they are ignored.
* If the file is ignored because of a matching ignore pattern, check global ignores in your config file.
https://eslint.org/docs/latest/use/configure/ignore
* If the file is ignored because no matching configuration was supplied, check file patterns in your config file.
https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-with-arbitrary-extensions
* If the file is ignored because it is located outside of the base path, change the location of your config file to be in a parent directory.
`.trimStart();
};
-16
View File
@@ -1,16 +0,0 @@
"use strict";
module.exports = function () {
return `
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.
`.trimStart();
};
-14
View File
@@ -1,14 +0,0 @@
"use strict";
module.exports = function (it) {
const { pluginName, ruleId } = it;
return `
A configuration object specifies rule "${ruleId}", but could not find plugin "${pluginName}".
Common causes of this problem include:
1. The "${pluginName}" plugin is not defined in your configuration file.
2. The "${pluginName}" plugin is not defined within the same configuration object in which the "${ruleId}" rule is applied.
`.trimStart();
};
-30
View File
@@ -1,30 +0,0 @@
"use strict";
module.exports = function ({ key, objectKey }) {
// special case for parsers
const isParser =
objectKey === "parser" && (key === "parse" || key === "parseForESLint");
const parserMessage = `
This typically happens when you're using a custom parser that does not
provide a "meta" property, which is how ESLint determines the serialized
representation. Please open an issue with the maintainer of the custom parser
and share this link:
https://eslint.org/docs/latest/extend/custom-parsers#meta-data-in-custom-parsers
`.trim();
return `
The requested operation requires ESLint to serialize configuration data,
but the configuration key "${objectKey}.${key}" contains a function value,
which cannot be serialized.
${
isParser
? parserMessage
: "Please double-check your configuration for errors."
}
If you still have problems, please stop by https://eslint.org/chat/help to chat
with the team.
`.trimStart();
};
+16 -35
View File
@@ -3,55 +3,44 @@
/* eslint consistent-return: 0 -- no default case */
const messages = {
env: `
env: `
A config object is using the "env" key, which is not supported in flat config system.
Flat config uses "languageOptions.globals" to define global variables for your files.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
If you're not using "env" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
extends: `
extends: `
A config object is using the "extends" key, which is not supported in flat config system.
Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
If you're using "extends" in your config file, please see the following:
Please see the following page for more information:
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
If you're not using "extends" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
globals: `
globals: `
A config object is using the "globals" key, which is not supported in flat config system.
Flat config uses "languageOptions.globals" to define global variables for your files.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
If you're not using "globals" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
ignorePatterns: `
ignorePatterns: `
A config object is using the "ignorePatterns" key, which is not supported in flat config system.
Flat config uses "ignores" to specify files to ignore.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
If you're not using "ignorePatterns" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
noInlineConfig: `
noInlineConfig: `
A config object is using the "noInlineConfig" key, which is not supported in flat config system.
Flat config uses "linterOptions.noInlineConfig" to specify files to ignore.
@@ -60,43 +49,34 @@ Please see the following page for information on how to convert your config obje
https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
`,
overrides: `
overrides: `
A config object is using the "overrides" key, which is not supported in flat config system.
Flat config is an array that acts like the eslintrc "overrides" array.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
If you're not using "overrides" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
parser: `
parser: `
A config object is using the "parser" key, which is not supported in flat config system.
Flat config uses "languageOptions.parser" to override the default parser.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
If you're not using "parser" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
parserOptions: `
parserOptions: `
A config object is using the "parserOptions" key, which is not supported in flat config system.
Flat config uses "languageOptions.parserOptions" to specify parser options.
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
If you're not using "parserOptions" directly (it may be coming from a plugin), please see the following:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
`,
reportUnusedDisableDirectives: `
reportUnusedDisableDirectives: `
A config object is using the "reportUnusedDisableDirectives" key, which is not supported in flat config system.
Flat config uses "linterOptions.reportUnusedDisableDirectives" to specify files to ignore.
@@ -105,13 +85,14 @@ Please see the following page for information on how to convert your config obje
https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
`,
root: `
root: `
A config object is using the "root" key, which is not supported in flat config system.
Flat configs always act as if they are the root config file, so this key can be safely removed.
`,
`
};
module.exports = function ({ key }) {
return messages[key].trim();
module.exports = function({ key }) {
return messages[key].trim();
};
+5 -8
View File
@@ -1,16 +1,13 @@
"use strict";
module.exports = function ({ plugins }) {
const isArrayOfStrings = typeof plugins[0] === "string";
module.exports = function({ plugins }) {
return `
A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}. It looks something like this:
const isArrayOfStrings = typeof plugins[0] === "string";
{
"plugins": ${JSON.stringify(plugins)}
}
return `
A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}.
Flat config requires "plugins" to be an object, like this:
Flat config requires "plugins" to be an object in this form:
{
plugins: {
+3 -3
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { configName, importerName } = it;
module.exports = function(it) {
const { configName, importerName } = it;
return `
return `
ESLint couldn't find the config "${configName}" to extend from. Please check that the name of the config is correct.
The config "${configName}" was referenced from the config file in "${importerName}".
+3 -3
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { path, message } = it;
module.exports = function(it) {
const { path, message } = it;
return `
return `
Failed to read JSON file at ${path}:
${message}
+3 -3
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { pattern, globDisabled } = it;
module.exports = function(it) {
const { pattern, globDisabled } = it;
return `
return `
No files matching the pattern "${pattern}"${globDisabled ? " (with disabling globs)" : ""} were found.
Please check for typing mistakes in the pattern.
`.trimStart();
+2 -2
View File
@@ -2,8 +2,8 @@
const { stringifyValueForError } = require("./shared");
module.exports = function ({ ruleId, value }) {
return `
module.exports = function({ ruleId, value }) {
return `
Configuration for rule "${ruleId}" is invalid. Each rule must have a severity ("off", 0, "warn", 1, "error", or 2) and may be followed by additional options for the rule.
You passed '${stringifyValueForError(value, 4)}', which doesn't contain a valid severity.
+2 -2
View File
@@ -2,8 +2,8 @@
const { stringifyValueForError } = require("./shared");
module.exports = function ({ ruleId, value }) {
return `
module.exports = function({ ruleId, value }) {
return `
Configuration for rule "${ruleId}" is invalid. Expected severity of "off", 0, "warn", 1, "error", or 2.
You passed '${stringifyValueForError(value, 4)}'.
+4 -4
View File
@@ -1,12 +1,12 @@
"use strict";
module.exports = function (it) {
const { directoryPath } = it;
module.exports = function(it) {
const { directoryPath } = it;
return `
return `
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
npm init @eslint/config@latest
npm init @eslint/config
ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory.
+9 -9
View File
@@ -1,22 +1,22 @@
"use strict";
module.exports = function (it) {
const { pluginId, plugins } = it;
module.exports = function(it) {
const { pluginId, plugins } = it;
let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely.
let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely.
`;
for (const { filePath, importerName } of plugins) {
result += `
for (const { filePath, importerName } of plugins) {
result += `
- ${filePath} (loaded in "${importerName}")`;
}
}
result += `
result += `
Please remove the "plugins" setting from either config or remove either plugin installation.
If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
`;
return result;
return result;
};
+4 -4
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { configName, importerName } = it;
module.exports = function(it) {
const { configName, importerName } = it;
return `
return `
"${configName}" is invalid syntax for a config specifier.
* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "${configName}/myConfig".
@@ -11,6 +11,6 @@ module.exports = function (it) {
"${configName}" was referenced from the config file in "${importerName}".
If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
`.trimStart();
};
+4 -4
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { pluginName, resolvePluginsRelativeTo, importerName } = it;
module.exports = function(it) {
const { pluginName, resolvePluginsRelativeTo, importerName } = it;
return `
return `
ESLint couldn't find the plugin "${pluginName}".
(The package "${pluginName}" was not found when loaded as a Node module from the directory "${resolvePluginsRelativeTo}".)
@@ -14,6 +14,6 @@ It's likely that the plugin isn't installed correctly. Try reinstalling by runni
The plugin "${pluginName}" was referenced from the config file in "${importerName}".
If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
`.trimStart();
};
+2 -2
View File
@@ -1,7 +1,7 @@
"use strict";
module.exports = function () {
return `
module.exports = function() {
return `
The '--print-config' CLI option requires a path to a source code file rather than a directory.
See also: https://eslint.org/docs/latest/use/command-line-interface#--print-config
`.trimStart();
+1 -6
View File
@@ -12,12 +12,7 @@
* @returns {string} The value, stringified.
*/
function stringifyValueForError(value, indentation) {
return value
? JSON.stringify(value, null, 4).replace(
/\n/gu,
`\n${" ".repeat(indentation)}`,
)
: `${value}`;
return value ? JSON.stringify(value, null, 4).replace(/\n/gu, `\n${" ".repeat(indentation)}`) : `${value}`;
}
module.exports = { stringifyValueForError };
+3 -3
View File
@@ -1,9 +1,9 @@
"use strict";
module.exports = function (it) {
const { pluginName } = it;
module.exports = function(it) {
const { pluginName } = it;
return `
return `
ESLint couldn't find the plugin "${pluginName}". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name.
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.