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
+14 -27
View File
@@ -8,14 +8,12 @@ This repository contains the legacy ESLintRC configuration file format for ESLin
You can install the package as follows:
```shell
npm install @eslint/eslintrc -D
```
npm install @eslint/eslintrc --save-dev
# or
yarn add @eslint/eslintrc -D
# or
pnpm install @eslint/eslintrc -D
# or
bun install @eslint/eslintrc -D
```
## Usage (ESM)
@@ -35,14 +33,14 @@ const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname, // optional; default: process.cwd()
resolvePluginsRelativeTo: __dirname, // optional
recommendedConfig: js.configs.recommended, // optional unless you're using "eslint:recommended"
allConfig: js.configs.all, // optional unless you're using "eslint:all"
recommendedConfig: js.configs.recommended, // optional
allConfig: js.configs.all, // optional
});
export default [
// mimic ESLintRC-style extends
...compat.extends("standard", "example", "plugin:react/recommended"),
...compat.extends("standard", "example"),
// mimic environments
...compat.env({
@@ -51,11 +49,11 @@ export default [
}),
// mimic plugins
...compat.plugins("jsx-a11y", "react"),
...compat.plugins("airbnb", "react"),
// translate an entire config
...compat.config({
plugins: ["jsx-a11y", "react"],
plugins: ["airbnb", "react"],
extends: "standard",
env: {
es2020: true,
@@ -79,14 +77,14 @@ const js = require("@eslint/js");
const compat = new FlatCompat({
baseDirectory: __dirname, // optional; default: process.cwd()
resolvePluginsRelativeTo: __dirname, // optional
recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended"
allConfig: js.configs.all, // optional unless using "eslint:all"
recommendedConfig: js.configs.recommended, // optional
allConfig: js.configs.all, // optional
});
module.exports = [
// mimic ESLintRC-style extends
...compat.extends("standard", "example", "plugin:react/recommended"),
...compat.extends("standard", "example"),
// mimic environments
...compat.env({
@@ -95,11 +93,11 @@ module.exports = [
}),
// mimic plugins
...compat.plugins("jsx-a11y", "react"),
...compat.plugins("airbnb", "react"),
// translate an entire config
...compat.config({
plugins: ["jsx-a11y", "react"],
plugins: ["airbnb", "react"],
extends: "standard",
env: {
es2020: true,
@@ -112,17 +110,6 @@ module.exports = [
];
```
## Troubleshooting
**TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor**
The `recommendedConfig` option is required when any config uses `eslint:recommended`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:recommended` config.
**TypeError: Missing parameter 'allConfig' in FlatCompat constructor**
The `allConfig` option is required when any config uses `eslint:all`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:all` config.
## License
MIT License