-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update eslint (major) (#3394)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tommy Nguyen <[email protected]>
- Loading branch information
1 parent
bfabc8d
commit 57013d2
Showing
58 changed files
with
402 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@rnx-kit/eslint-plugin": patch | ||
--- | ||
|
||
Bumped `eslint-plugin-react` and `eslint-plugin-react-hooks` to better support | ||
ESLint 9.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
"@changesets/cli": "^2.22.0", | ||
"@types/jest": "^29.2.1", | ||
"@types/node": "^20.0.0", | ||
"eslint": "^8.56.0", | ||
"eslint": "^9.0.0", | ||
"knip": "^5.30.2", | ||
"metro": "^0.80.3", | ||
"nx": "~19.5.0", | ||
|
@@ -51,7 +51,7 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"resolutions": { | ||
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.33.0", | ||
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.35.2", | ||
"@microsoft/eslint-plugin-sdl/eslint-plugin-security": "^1.4.0", | ||
"@react-native-community/cli": "^14.0.0", | ||
"@react-native-community/cli-platform-android": "^14.0.0", | ||
|
@@ -148,9 +148,6 @@ | |
}, | ||
"packages/eslint-plugin": { | ||
"ignoreDependencies": [ | ||
"@microsoft/eslint-plugin-sdl", | ||
"eslint-plugin-node", | ||
"eslint-plugin-react", | ||
"eslint-plugin-react-hooks" | ||
] | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
const { FlatCompat } = require("@eslint/eslintrc"); | ||
const js = require("@eslint/js"); | ||
const sdl = require("@microsoft/eslint-plugin-sdl"); | ||
const rnx = require("@rnx-kit/eslint-plugin"); | ||
|
||
const compat = new FlatCompat({ | ||
// 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, | ||
}); | ||
|
||
/** | ||
* Note that we don't directly use `sdl.configs.required` because: | ||
* | ||
* 1. It includes rules for Angular and Electron | ||
* 2. Its `react` preset conflicts with our direct use of `eslint-plugin-react` | ||
* | ||
* https://github.com/microsoft/eslint-plugin-sdl/blob/957996315c80fdadcd1a9f7bb76fc4663d33ef1e/lib/index.js#L47-L54 | ||
*/ | ||
module.exports = [ | ||
...sdl.configs.common, | ||
...sdl.configs.node, | ||
...rnx.configs.strict, | ||
...rnx.configs.stylistic, | ||
...compat.extends("plugin:@microsoft/sdl/required"), | ||
{ | ||
rules: { | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"], | ||
...sdl.configs.react[0].rules, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @ts-check | ||
"use strict"; | ||
|
||
const path = require("node:path"); | ||
|
||
try { | ||
const eslint = path.dirname(require.resolve("eslint/package.json")); | ||
const eslintjs = require.resolve("@eslint/js", { paths: [eslint] }); | ||
module.exports = require(eslintjs); | ||
} catch (_) { | ||
module.exports = require("@eslint/js"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @ts-check | ||
"use strict"; | ||
|
||
const { FlatCompat } = require("@eslint/eslintrc"); | ||
const react = require("eslint-plugin-react"); | ||
const eslint = require("./eslint"); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: eslint.configs.recommended, | ||
}); | ||
|
||
module.exports = [ | ||
...compat.extends("plugin:react-hooks/recommended"), | ||
react.configs.flat.recommended, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.