feat(eslint-preset)!: migrate to flat config (#2813)

BREAKING CHANGE: ESLint 8.23+ and its new config system is now required

Read more about ESLint's new config system, flat config, here:
https://eslint.org/blog/2022/08/new-config-system-part-2/
This commit is contained in:
Tommy Nguyen 2023-11-24 11:52:09 +01:00 коммит произвёл GitHub
Родитель 0a773b1853
Коммит 2ba27400c9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
51 изменённых файлов: 304 добавлений и 204 удалений

Просмотреть файл

@ -0,0 +1,5 @@
---
"@rnx-kit/eslint-plugin": minor
---
ESLint 8.23+ and its new config system is now required — read more about ESLint's new config system, flat config, here: https://eslint.org/blog/2022/08/new-config-system-part-2/

Просмотреть файл

@ -14,9 +14,6 @@ packageExtensions:
peerDependenciesMeta:
"@types/react":
optional: true
"@microsoft/eslint-plugin-sdl@0.x":
peerDependencies:
eslint: ">=5.16.0"
"@react-native-community/cli-debugger-ui@*":
dependencies:
"@babel/runtime": "^7.20.0"

Просмотреть файл

@ -47,7 +47,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"react": "18.2.0",

Просмотреть файл

@ -38,7 +38,7 @@
"@rnx-kit/eslint-config": "*",
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},

Просмотреть файл

@ -60,7 +60,7 @@
"@types/node": "^20.0.0",
"@types/qrcode": "^1.4.2",
"@types/yargs": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -42,7 +42,7 @@
"@types/mkdirp": "^1.0.1",
"@types/rimraf": "^3.0.0",
"@types/sinon": "^9.0.1",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"sinon": "^9.0.1",

Просмотреть файл

@ -36,7 +36,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -47,7 +47,7 @@
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"@types/yargs": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -37,7 +37,7 @@
"@types/fs-extra": "^9.0.0",
"@types/istextorbinary": "^2.3.0",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -51,7 +51,7 @@
"@types/babel__template": "^7.0.0",
"@types/node": "^20.0.0",
"chalk": "^4.1.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro-config": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -34,7 +34,7 @@
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"@types/yargs": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -36,7 +36,7 @@
"@types/node": "^20.0.0",
"chalk": "^4.1.0",
"deepmerge": "^4.2.2",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"fast-levenshtein": "^3.0.0",
"jest": "^29.2.1",
"p-limit": "^3.1.0",

Просмотреть файл

@ -37,7 +37,7 @@
"@changesets/cli": "^2.22.0",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"metro": "^0.76.5",
"nx": "~17.0.2",
"prettier": "^3.0.0",
@ -49,7 +49,7 @@
},
"packageManager": "yarn@3.7.0",
"resolutions": {
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.26.0",
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.33.0",
"@microsoft/eslint-plugin-sdl/eslint-plugin-security": "^1.4.0",
"@react-native-community/cli": "^11.3.6",
"@react-native-community/cli-platform-android": "^11.3.6",

Просмотреть файл

@ -42,7 +42,7 @@
"@types/yargs": "^16.0.0",
"chalk": "^4.1.0",
"detect-indent": "^6.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"markdown-table": "^3.0.0",
"package-json": "^8.1.1",

Просмотреть файл

@ -32,7 +32,7 @@
"@types/babel__helper-plugin-utils": "^7.0.0",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -48,7 +48,7 @@
"@types/babel__core": "^7.0.0",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -29,7 +29,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -74,7 +74,7 @@
"@types/node": "^20.0.0",
"@types/node-fetch": "^2.6.5",
"@types/qrcode": "^1.4.2",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"memfs": "^4.0.0",
"metro": "^0.76.5",

Просмотреть файл

@ -45,7 +45,7 @@
"@rnx-kit/tools-react-native": "*",
"@types/node": "^20.0.0",
"@types/semver": "^7.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -38,7 +38,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -26,7 +26,7 @@
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"esbuild": "^0.19.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -1,34 +1,23 @@
const { FlatCompat } = require("@eslint/eslintrc");
const js = require("@eslint/js");
const rnx = require("@rnx-kit/eslint-plugin");
const compat = new FlatCompat({
baseDirectory: __dirname,
// Use `@rnx-kit/eslint-plugin` as base directory to ensure we get the same
// plugin instances
baseDirectory: require.resolve("@rnx-kit/eslint-plugin/package.json"),
recommendedConfig: js.configs.recommended,
});
module.exports = [
...rnx.configs.strict,
...compat.extends(
"plugin:@microsoft/sdl/required",
"plugin:@rnx-kit/recommended",
"plugin:@typescript-eslint/stylistic"
),
{
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"no-restricted-exports": [
"error",
{
restrictDefaultExports: {
direct: true,
named: true,
defaultFrom: true,
namedFrom: true,
namespaceFrom: true,
},
},
],
},
},
];

Просмотреть файл

@ -19,16 +19,8 @@
},
"dependencies": {
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.0.0",
"@microsoft/eslint-plugin-sdl": "^0.2.0",
"@react-native/eslint-plugin": "^0.74.0",
"@rnx-kit/eslint-plugin": "workspace:*",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-react": "^7.26.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-security": "^1.4.0"
"@eslint/js": "^8.33.0",
"@rnx-kit/eslint-plugin": "workspace:*"
},
"peerDependencies": {
"eslint": ">=6.0.0"

Просмотреть файл

@ -3,11 +3,12 @@
[![Build](https://github.com/microsoft/rnx-kit/actions/workflows/build.yml/badge.svg)](https://github.com/microsoft/rnx-kit/actions/workflows/build.yml)
[![npm version](https://img.shields.io/npm/v/@rnx-kit/eslint-plugin)](https://www.npmjs.com/package/@rnx-kit/eslint-plugin)
`@rnx-kit/eslint-plugin` is a set of rules that can be extended in your own
shareable ESLint config.
`@rnx-kit/eslint-plugin` is a set of configurations and rules that can be used
as is, or extended in your own ESLint config.
For more details on shareable configs, see
https://eslint.org/docs/developer-guide/shareable-configs.
Note that this plugin requires the
[new ESLint configuration format](https://eslint.org/blog/2022/08/new-config-system-part-2/).
If you still rely on the previous format, use version 0.5.x instead.
## Install
@ -21,33 +22,70 @@ or if you're using npm:
npm add --save-dev @rnx-kit/eslint-plugin
```
## Recommended Configs
## Usage
This ESLint plugin exports
[`@rnx-kit/recommended`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/configs/recommended.js)
configuration. To enable it, add it to the `extends` section of your ESLint
config file:
This ESLint plugin exports multiple configurations. For instance, to use the
[`recommended`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/configs/recommended.js)
configuration, you can re-export it in your
[flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
like below:
```json
{
"extends": ["plugin:@rnx-kit/recommended"]
}
```js
module.exports = require("@rnx-kit/eslint-plugin/recommended");
```
`@rnx-kit/recommended` currently extends:
Alternatively, if you want to add customizations:
- [`eslint:recommended`](https://eslint.org/docs/rules/)
- [`plugin:@typescript-eslint/recommended`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin#supported-rules)
- [`plugin:react-hooks/recommended`](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
- [`plugin:react/recommended`](https://github.com/yannickcr/eslint-plugin-react#recommended)
```js
const rnx = require("@rnx-kit/eslint-plugin");
module.exports = [
...rnx.configs.recommended,
{
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
},
},
];
```
Additionally, it also includes and enables:
If you're just interested in the rules, you can use it as a plugin and enable
the rules you're interested in:
- [`@react-native/eslint-plugin`](https://github.com/facebook/react-native/tree/main/packages/eslint-plugin-react-native#readme)
```js
module.exports = [
{
plugins: {
"@rnx-kit": require("@rnx-kit/eslint-plugin"),
},
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
},
},
];
```
## Recommended Configurations
- [`@rnx-kit/eslint-plugin/recommended`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/configs/recommended.js)
extends:
- [`eslint:recommended`](https://eslint.org/docs/rules/)
- [`plugin:@typescript-eslint/recommended`](https://typescript-eslint.io/linting/configs#recommended)
- [`plugin:react-hooks/recommended`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks#readme)
- [`plugin:react/recommended`](https://github.com/yannickcr/eslint-plugin-react#recommended)
- It also includes and enables the following rules:
- [`@react-native/platform-colors`](https://github.com/facebook/react-native/tree/main/packages/eslint-plugin-react-native#readme)
- [`@rnx-kit/eslint-plugin/strict`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/configs/strict.js)
extends `@rnx-kit/eslint-plugin/recommended` with rules that enables better
tree shaking:
- [`@rnx-kit/no-const-enum`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/rules/no-const-enum.js)
- [`@rnx-kit/no-export-all`](https://github.com/microsoft/rnx-kit/blob/main/packages/eslint-plugin/src/rules/no-export-all.js)
- [`no-restricted-exports`](https://archive.eslint.org/docs/rules/no-restricted-exports)
## Supported Rules
- ✓: Enabled with `@rnx-kit/recommended`
- ✓: Enabled with `@rnx-kit/eslint-plugin/recommended`
- 🔧: Fixable with `--fix`
| ✓ | 🔧 | Rule | Description |

Просмотреть файл

@ -15,6 +15,18 @@
"src/*"
],
"main": "src/index.js",
"exports": {
".": {
"default": "./src/index.js"
},
"./recommended": {
"default": "./src/configs/recommended.js"
},
"./strict": {
"default": "./src/configs/strict.js"
},
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/rnx-kit",
@ -27,26 +39,32 @@
"test": "rnx-kit-scripts test"
},
"dependencies": {
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.33.0",
"@react-native/eslint-plugin": "^0.74.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"enhanced-resolve": "^5.8.3",
"eslint-plugin-react": "^7.26.0",
"eslint-plugin-react-hooks": "^4.3.0"
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0"
},
"peerDependencies": {
"eslint": ">=6.0.0"
"eslint": ">=8.23.0"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^0.2.0",
"@rnx-kit/eslint-config": "*",
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/eslint": "^8.0.0",
"@types/eslint__eslintrc": "^2.1.1",
"@types/eslint__js": "^8.0.0",
"@types/estree": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"@typescript-eslint/types": "^6.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"eslint-plugin-node": "11.1.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
@ -56,9 +74,11 @@
},
"depcheck": {
"ignoreMatches": [
"@microsoft/eslint-plugin-sdl",
"@react-native/eslint-plugin",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/types",
"eslint-plugin-node",
"eslint-plugin-react",
"eslint-plugin-react-hooks"
]

Просмотреть файл

@ -1,49 +1,54 @@
// @ts-check
"use strict";
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
const { FlatCompat } = require("@eslint/eslintrc");
const js = require("@eslint/js");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
module.exports = [
...compat.extends(
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
"plugin:react/recommended"
),
{
languageOptions: {
// @ts-expect-error No declaration file for module
parser: require("@typescript-eslint/parser"),
},
ecmaVersion: 2018,
sourceType: "module",
},
plugins: ["@react-native", "@rnx-kit", "@typescript-eslint"],
rules: {
"@react-native/platform-colors": "error",
"@rnx-kit/no-const-enum": "warn",
"@rnx-kit/no-export-all": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
{
disallowTypeAnnotations: false,
plugins: {
// @ts-expect-error No declaration file for module
"@react-native": require("@react-native/eslint-plugin"),
"@rnx-kit": require("../rules"),
},
rules: {
"@react-native/platform-colors": "error",
"@rnx-kit/no-const-enum": "warn",
"@rnx-kit/no-export-all": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
{
disallowTypeAnnotations: false,
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-var-requires": "off",
"react/prop-types": "off",
},
settings: {
react: {
version: "detect",
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-var-requires": "off",
"react/prop-types": "off",
},
settings: {
react: {
version: "detect",
},
},
};
];

Просмотреть файл

@ -0,0 +1,24 @@
// @ts-check
"use strict";
module.exports = [
...require("./recommended"),
{
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
"no-restricted-exports": [
"error",
{
restrictDefaultExports: {
direct: true,
named: true,
defaultFrom: true,
namedFrom: true,
namespaceFrom: true,
},
},
],
},
},
];

Просмотреть файл

@ -1,12 +1,15 @@
// @ts-check
"use strict";
const { name, version } = require("../package.json");
module.exports = {
meta: {
name,
version,
},
configs: {
recommended: require("./configs/recommended"),
strict: require("./configs/strict"),
},
rules: {
"no-const-enum": require("./rules/no-const-enum"),
"no-export-all": require("./rules/no-export-all"),
},
rules: require("./rules").rules,
};

Просмотреть файл

@ -0,0 +1,9 @@
// @ts-check
"use strict";
module.exports = {
rules: {
"no-const-enum": require("./rules/no-const-enum"),
"no-export-all": require("./rules/no-export-all"),
},
};

Просмотреть файл

@ -35,13 +35,13 @@
}
},
"devDependencies": {
"@eslint/js": "^8.0.0",
"@eslint/js": "^8.33.0",
"@jest/types": "^29.2.1",
"@react-native-community/cli-types": "^11.0.0",
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"react": "18.2.0",

Просмотреть файл

@ -44,7 +44,7 @@
"@types/babel__core": "^7.0.0",
"@types/connect": "^3.4.36",
"@types/jest": "^29.2.1",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"metro-config": "^0.76.5",

Просмотреть файл

@ -31,7 +31,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -34,7 +34,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"memfs": "^4.0.0",
"metro": "^0.76.5",

Просмотреть файл

@ -42,7 +42,7 @@
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"@types/semver": "^7.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"prettier": "^3.0.0"

Просмотреть файл

@ -33,7 +33,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"find-up": "^5.0.0",
"jest": "^29.2.1",
"metro-resolver": "^0.76.5",

Просмотреть файл

@ -43,7 +43,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"lodash-es": "^4.17.21",
"metro": "^0.76.5",

Просмотреть файл

@ -30,7 +30,7 @@
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"@types/semver": "^7.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -55,7 +55,7 @@
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"@types/node-fetch": "^2.6.5",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"flow-remove-types": "~2.206.0",
"jest": "^29.2.1",
"metro": "^0.76.5",

Просмотреть файл

@ -39,7 +39,7 @@
"@react-native/metro-config": "^0.72.0",
"@rnx-kit/eslint-config": "*",
"@rnx-kit/scripts": "*",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"prettier": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.0",

Просмотреть файл

@ -47,7 +47,7 @@
"@rnx-kit/scripts": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -32,7 +32,7 @@
"@rnx-kit/eslint-config": "*",
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -54,7 +54,7 @@
"@rnx-kit/scripts": "workspace:*",
"@rnx-kit/third-party-notices": "workspace:*",
"@types/react": "^18.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "^0.76.5",
"prettier": "^3.0.0",

Просмотреть файл

@ -38,7 +38,7 @@
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"@types/yargs": "^16.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro-source-map": "^0.76.8",
"prettier": "^3.0.0",

Просмотреть файл

@ -42,7 +42,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -62,7 +62,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -52,7 +52,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"metro-config": "^0.76.5",

Просмотреть файл

@ -45,7 +45,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -32,7 +32,7 @@
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
"@types/node": "^20.0.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"typescript": "^5.0.0"

Просмотреть файл

@ -65,7 +65,7 @@ const profile = {
},
eslint: {
name: "eslint",
version: "^8.0.0",
version: "^8.23.0",
devOnly: true,
},
"find-up": {

Просмотреть файл

@ -16,7 +16,7 @@
"dependencies": {
"depcheck": "^1.0.0",
"esbuild": "^0.19.0",
"eslint": "^8.0.0",
"eslint": "^8.23.0",
"jest": "^29.2.1",
"markdown-table": "^3.0.0",
"prettier": "^3.0.0",
@ -25,7 +25,7 @@
"yargs": "^16.0.0"
},
"devDependencies": {
"@eslint/js": "^8.0.0",
"@eslint/js": "^8.33.0",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"@types/yargs": "^16.0.0"

144
yarn.lock
Просмотреть файл

@ -2160,7 +2160,7 @@ __metadata:
languageName: node
linkType: hard
"@eslint/js@npm:8.54.0, @eslint/js@npm:^8.0.0":
"@eslint/js@npm:8.54.0, @eslint/js@npm:^8.33.0":
version: 8.54.0
resolution: "@eslint/js@npm:8.54.0"
checksum: 6d88a6f711ef0133566b5340e3178a178fbb297585766460f195d0a9db85688f1e5cf8559fd5748aeb3131e2096c66595b323d8edab22df015acda68f1ebde92
@ -2640,13 +2640,15 @@ __metadata:
linkType: hard
"@microsoft/eslint-plugin-sdl@npm:^0.2.0":
version: 0.2.0
resolution: "@microsoft/eslint-plugin-sdl@npm:0.2.0"
version: 0.2.2
resolution: "@microsoft/eslint-plugin-sdl@npm:0.2.2"
dependencies:
eslint-plugin-node: 11.1.0
eslint-plugin-react: 7.24.0
eslint-plugin-react: 7.33.0
eslint-plugin-security: 1.4.0
checksum: 44fd7a0d29ebed48fc935d0b0f96394dea4e3a055467b0b53173c76ce44fb33ddf2b5913db6920e92cc5da1974b5c4e7942500f5f22f60f36f8fe1a3b2eae6c6
peerDependencies:
eslint: ^4.19.1 || ^5 || ^6 || ^7 || ^8
checksum: 06abc73ce5b3bc9098370c170e261b8ac5b1f641c457067d97fd3a0c48fe466fe00c830d4d5895624731878a3d5cae850b29c91dade12fec8d33467a6a3308d1
languageName: node
linkType: hard
@ -3178,7 +3180,7 @@ __metadata:
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
react: 18.2.0
@ -3391,7 +3393,7 @@ __metadata:
"@types/yargs": ^16.0.0
chalk: ^4.1.0
detect-indent: ^6.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
markdown-table: ^3.0.0
package-json: ^8.1.1
@ -3419,7 +3421,7 @@ __metadata:
"@types/babel__helper-plugin-utils": ^7.0.0
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -3439,7 +3441,7 @@ __metadata:
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
babel-plugin-const-enum: ^1.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro-react-native-babel-preset: ^0.76.5
prettier: ^3.0.0
@ -3467,7 +3469,7 @@ __metadata:
"@rnx-kit/eslint-config": "*"
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
eslint: ^8.0.0
eslint: ^8.23.0
prettier: ^3.0.0
typescript: ^5.0.0
peerDependencies:
@ -3491,7 +3493,7 @@ __metadata:
"@types/qrcode": ^1.4.2
"@types/yargs": ^16.0.0
env-paths: ^3.0.0
eslint: ^8.0.0
eslint: ^8.23.0
fast-xml-parser: ^4.0.0
find-up: ^6.3.0
jest: ^29.2.1
@ -3517,7 +3519,7 @@ __metadata:
"@rnx-kit/scripts": "*"
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -3538,7 +3540,7 @@ __metadata:
"@types/rimraf": ^3.0.0
"@types/sinon": ^9.0.1
escape-string-regexp: ^4.0.0
eslint: ^8.0.0
eslint: ^8.23.0
is-wsl: ^2.2.0
jest: ^29.2.1
lighthouse-logger: ^1.0.0
@ -3581,7 +3583,7 @@ __metadata:
"@types/node-fetch": ^2.6.5
"@types/qrcode": ^1.4.2
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
find-up: ^5.0.0
fs-extra: ^10.0.0
jest: ^29.2.1
@ -3617,7 +3619,7 @@ __metadata:
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -3641,7 +3643,7 @@ __metadata:
"@rnx-kit/tools-react-native": "*"
"@types/node": ^20.0.0
"@types/semver": ^7.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
prettier: ^3.0.0
@ -3660,7 +3662,7 @@ __metadata:
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -3682,7 +3684,7 @@ __metadata:
"@types/node": ^20.0.0
"@types/yargs": ^16.0.0
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
pkg-dir: ^5.0.0
prettier: ^3.0.0
@ -3702,7 +3704,7 @@ __metadata:
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
esbuild: ^0.19.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -3714,16 +3716,8 @@ __metadata:
resolution: "@rnx-kit/eslint-config@workspace:packages/eslint-config"
dependencies:
"@eslint/eslintrc": ^2.1.2
"@eslint/js": ^8.0.0
"@microsoft/eslint-plugin-sdl": ^0.2.0
"@react-native/eslint-plugin": ^0.74.0
"@eslint/js": ^8.33.0
"@rnx-kit/eslint-plugin": "workspace:*"
"@typescript-eslint/eslint-plugin": ^6.0.0
"@typescript-eslint/parser": ^6.0.0
eslint-plugin-node: 11.1.0
eslint-plugin-react: ^7.26.0
eslint-plugin-react-hooks: ^4.3.0
eslint-plugin-security: ^1.4.0
prettier: ^3.0.0
peerDependencies:
eslint: ">=6.0.0"
@ -3734,11 +3728,16 @@ __metadata:
version: 0.0.0-use.local
resolution: "@rnx-kit/eslint-plugin@workspace:packages/eslint-plugin"
dependencies:
"@eslint/eslintrc": ^2.1.2
"@eslint/js": ^8.33.0
"@microsoft/eslint-plugin-sdl": ^0.2.0
"@react-native/eslint-plugin": ^0.74.0
"@rnx-kit/eslint-config": "*"
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
"@types/eslint": ^8.0.0
"@types/eslint__eslintrc": ^2.1.1
"@types/eslint__js": ^8.0.0
"@types/estree": "*"
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
@ -3746,14 +3745,15 @@ __metadata:
"@typescript-eslint/parser": ^6.0.0
"@typescript-eslint/types": ^6.0.0
enhanced-resolve: ^5.8.3
eslint: ^8.0.0
eslint-plugin-react: ^7.26.0
eslint-plugin-react-hooks: ^4.3.0
eslint: ^8.23.0
eslint-plugin-node: 11.1.0
eslint-plugin-react: ^7.33.0
eslint-plugin-react-hooks: ^4.6.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
peerDependencies:
eslint: ">=6.0.0"
eslint: ">=8.23.0"
languageName: unknown
linkType: soft
@ -3770,13 +3770,13 @@ __metadata:
"@babel/core": ^7.0.0
"@babel/preset-env": ^7.0.0
"@babel/preset-typescript": ^7.0.0
"@eslint/js": ^8.0.0
"@eslint/js": ^8.33.0
"@jest/types": ^29.2.1
"@react-native-community/cli-types": ^11.0.0
"@rnx-kit/scripts": "*"
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
find-up: ^5.0.0
jest: ^29.2.1
prettier: ^3.0.0
@ -3807,7 +3807,7 @@ __metadata:
"@types/babel__core": ^7.0.0
"@types/connect": ^3.4.36
"@types/jest": ^29.2.1
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
metro-config: ^0.76.5
@ -3839,7 +3839,7 @@ __metadata:
"@rnx-kit/tools-node": ^2.0.0
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
prettier: ^3.0.0
@ -3859,7 +3859,7 @@ __metadata:
"@rnx-kit/tools-node": ^2.0.0
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
memfs: ^4.0.0
metro: ^0.76.5
@ -3885,7 +3885,7 @@ __metadata:
"@rnx-kit/typescript-service": ^1.5.7
"@types/node": ^20.0.0
"@types/semver": ^7.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
prettier: ^3.0.0
@ -3907,7 +3907,7 @@ __metadata:
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
enhanced-resolve: ^5.8.3
eslint: ^8.0.0
eslint: ^8.23.0
find-up: ^5.0.0
jest: ^29.2.1
metro-resolver: ^0.76.5
@ -3939,7 +3939,7 @@ __metadata:
"@types/node": ^20.0.0
esbuild: ^0.19.0
esbuild-plugin-lodash: ^1.2.0
eslint: ^8.0.0
eslint: ^8.23.0
fast-glob: ^3.2.7
jest: ^29.2.1
lodash-es: ^4.17.21
@ -3964,7 +3964,7 @@ __metadata:
"@rnx-kit/tools-react-native": ^1.3.4
"@types/node": ^20.0.0
"@types/semver": ^7.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
prettier: ^3.0.0
@ -3988,7 +3988,7 @@ __metadata:
"@types/node": ^20.0.0
"@types/node-fetch": ^2.6.5
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
flow-remove-types: ~2.206.0
jest: ^29.2.1
metro: ^0.76.5
@ -4025,7 +4025,7 @@ __metadata:
"@types/istextorbinary": ^2.3.0
"@types/node": ^20.0.0
commander: ^4.1.1
eslint: ^8.0.0
eslint: ^8.23.0
fs-extra: ^10.0.0
istextorbinary: ^3.3.0
jest: ^29.2.1
@ -4054,7 +4054,7 @@ __metadata:
"@types/babel__template": ^7.0.0
"@types/node": ^20.0.0
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro-config: ^0.76.5
prettier: ^3.0.0
@ -4076,7 +4076,7 @@ __metadata:
"@react-native/metro-config": ^0.72.0
"@rnx-kit/eslint-config": "*"
"@rnx-kit/scripts": "*"
eslint: ^8.0.0
eslint: ^8.23.0
prettier: ^3.0.0
react: 18.2.0
react-native: ^0.72.0
@ -4097,7 +4097,7 @@ __metadata:
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
"@types/yargs": ^16.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro-symbolicate: ^0.76.0
prettier: ^3.0.0
@ -4131,7 +4131,7 @@ __metadata:
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
babel-plugin-codegen: ^4.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -4163,7 +4163,7 @@ __metadata:
"@types/node": ^20.0.0
chalk: ^4.1.0
deepmerge: ^4.2.2
eslint: ^8.0.0
eslint: ^8.23.0
fast-levenshtein: ^3.0.0
jest: ^29.2.1
p-limit: ^3.1.0
@ -4179,13 +4179,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "@rnx-kit/scripts@workspace:scripts"
dependencies:
"@eslint/js": ^8.0.0
"@eslint/js": ^8.33.0
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
"@types/yargs": ^16.0.0
depcheck: ^1.0.0
esbuild: ^0.19.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
markdown-table: ^3.0.0
prettier: ^3.0.0
@ -4204,7 +4204,7 @@ __metadata:
"@rnx-kit/eslint-config": "*"
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -4238,7 +4238,7 @@ __metadata:
"@rnx-kit/scripts": "workspace:*"
"@rnx-kit/third-party-notices": "workspace:*"
"@types/react": ^18.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro-react-native-babel-preset: ^0.76.5
prettier: ^3.0.0
@ -4265,7 +4265,7 @@ __metadata:
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
"@types/yargs": ^16.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro-source-map: ^0.76.8
prettier: ^3.0.0
@ -4285,7 +4285,7 @@ __metadata:
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -4301,7 +4301,7 @@ __metadata:
"@rnx-kit/scripts": "*"
"@rnx-kit/tools-language": ^2.0.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
find-up: ^5.0.0
jest: ^29.2.1
pkg-dir: ^5.0.0
@ -4320,7 +4320,7 @@ __metadata:
"@rnx-kit/scripts": "*"
"@rnx-kit/tools-node": ^2.0.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
metro: ^0.76.5
metro-config: ^0.76.5
@ -4339,7 +4339,7 @@ __metadata:
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
fast-glob: ^3.2.7
find-up: ^5.0.0
jest: ^29.2.1
@ -4360,7 +4360,7 @@ __metadata:
"@rnx-kit/tools-node": ^2.0.0
"@types/node": ^20.0.0
chalk: ^4.1.0
eslint: ^8.0.0
eslint: ^8.23.0
jest: ^29.2.1
prettier: ^3.0.0
typescript: ^5.0.0
@ -4535,7 +4535,7 @@ __metadata:
languageName: node
linkType: hard
"@types/eslint@npm:^8.0.0":
"@types/eslint@npm:*, @types/eslint@npm:^8.0.0":
version: 8.44.7
resolution: "@types/eslint@npm:8.44.7"
dependencies:
@ -4545,6 +4545,24 @@ __metadata:
languageName: node
linkType: hard
"@types/eslint__eslintrc@npm:^2.1.1":
version: 2.1.1
resolution: "@types/eslint__eslintrc@npm:2.1.1"
dependencies:
"@types/eslint": "*"
checksum: 75b3cd589c152a2079fd8a84bf44066159fa8d9237a14f2b782bc37cd09e26b1647f5b0f0dc1145aaee53e26dc335c0d7ef3e8fdad5d7432329af371fd88479d
languageName: node
linkType: hard
"@types/eslint__js@npm:^8.0.0":
version: 8.42.3
resolution: "@types/eslint__js@npm:8.42.3"
dependencies:
"@types/eslint": "*"
checksum: e31f19de642d35a664695d0cab873ce6de19b8a3506755835b91f8a49a8c41099dcace449df49f1a486de6fa6565d21ceb1fa33be6004fc7adef9226e5d256a1
languageName: node
linkType: hard
"@types/estree@npm:*":
version: 1.0.5
resolution: "@types/estree@npm:1.0.5"
@ -7321,7 +7339,7 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-react-hooks@npm:^4.3.0":
"eslint-plugin-react-hooks@npm:^4.6.0":
version: 4.6.0
resolution: "eslint-plugin-react-hooks@npm:4.6.0"
peerDependencies:
@ -7330,7 +7348,7 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-react@npm:^7.26.0":
"eslint-plugin-react@npm:^7.33.0":
version: 7.33.2
resolution: "eslint-plugin-react@npm:7.33.2"
dependencies:
@ -7398,7 +7416,7 @@ __metadata:
languageName: node
linkType: hard
"eslint@npm:^8.0.0":
"eslint@npm:^8.23.0":
version: 8.54.0
resolution: "eslint@npm:8.54.0"
dependencies:
@ -12947,7 +12965,7 @@ __metadata:
"@changesets/cli": ^2.22.0
"@types/jest": ^29.2.1
"@types/node": ^20.0.0
eslint: ^8.0.0
eslint: ^8.23.0
metro: ^0.76.5
nx: ~17.0.2
prettier: ^3.0.0