Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-ravens-lint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ankhorage/devtools': patch
---

Keep ESLint 10 and wrap the React Native ESLint plugin with `@eslint/compat` so React Native and Expo profiles can run legacy plugin rules without `context.getSourceCode is not a function` crashes.
17 changes: 10 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@
},
"dependencies": {
"@ankhorage/utility": "^0.1.1",
"@eslint/compat": "^2.1.0",
"@eslint/js": "^10.0.1",
"eslint": "^10.2.0",
"eslint": "^10.7.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.5",
Expand Down
3 changes: 2 additions & 1 deletion src/tools/eslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* @readme
*/
import { fixupPluginRules } from '@eslint/compat';
import js from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
Expand Down Expand Up @@ -222,7 +223,7 @@ function createReactConfig(files: string[]): FlatConfigItem {
function createReactNativeConfig(files: string[]): FlatConfigItem {
return {
files,
plugins: { 'react-native': reactNativePlugin },
plugins: { 'react-native': fixupPluginRules(reactNativePlugin) },
rules: {
'react-native/no-inline-styles': 'warn',
'react-native/no-unused-styles': 'error',
Expand Down
Loading