Skip to content

Commit fe37d46

Browse files
authored
chore(⬆️): upgrade to eslint 9 (#263)
1 parent 4ee0a43 commit fe37d46

20 files changed

Lines changed: 2954 additions & 1228 deletions

File tree

apps/example/.eslintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/example/android/build.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,7 @@ allprojects {
2626
repositories {
2727
maven {
2828
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29-
url({
30-
def searchDir = rootDir.toPath()
31-
do {
32-
def p = searchDir.resolve("node_modules/react-native/android")
33-
if (p.toFile().exists()) {
34-
return p.toRealPath().toString()
35-
}
36-
} while (searchDir = searchDir.getParent())
37-
throw new GradleException("Could not find `react-native`")
38-
}())
29+
url("${findNodeModulesPath("react-native", rootDir)}/android")
3930
}
4031
mavenCentral()
4132
google()

apps/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

apps/example/eslint.config.mjs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// eslint.config.js
2+
import wcandillon from "eslint-config-react-native-wcandillon";
3+
import prettierPlugin from "eslint-plugin-prettier";
4+
5+
export default [
6+
{
7+
ignores: ["**/*/components/meshes", "**/Pods/**", "node_modules/**", "dist/**", "android/**", "ios/**", "macos/**", "*.config.js"]
8+
},
9+
...wcandillon,
10+
{
11+
files: ["**/*.{js,jsx,ts,tsx}"],
12+
plugins: {
13+
prettier: prettierPlugin
14+
},
15+
languageOptions: {
16+
parserOptions: {
17+
ecmaVersion: "latest",
18+
sourceType: "module"
19+
}
20+
},
21+
rules: {
22+
"no-bitwise": "off",
23+
"@typescript-eslint/no-require-imports": "off",
24+
"import/extensions": "off",
25+
"prettier/prettier": [
26+
"error",
27+
{
28+
"trailingComma": "all"
29+
}
30+
]
31+
}
32+
}
33+
];

apps/example/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
* @format
33
*/
44

5-
import {AppRegistry} from 'react-native';
6-
import App from './src/App';
7-
import {name as appName} from './app.json';
5+
import { AppRegistry } from "react-native";
6+
7+
import App from "./src/App";
8+
import { name as appName } from "./app.json";
89

910
AppRegistry.registerComponent(appName, () => App);

apps/example/macos/Podfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
ws_dir = Pathname.new(__dir__)
22
ws_dir = ws_dir.parent until
3-
File.exist?("#{ws_dir}/node_modules/react-native-test-app/macos/test_app.rb") ||
3+
File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
44
ws_dir.expand_path.to_s == '/'
5-
require "#{ws_dir}/node_modules/react-native-test-app/macos/test_app.rb"
5+
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"
66

77
workspace 'Example.xcworkspace'
88

9-
use_test_app!
9+
options = {
10+
:hermes_enabled => true,
11+
:fabric_enabled => true,
12+
:new_arch_enabled => true
13+
}
14+
15+
use_test_app! options

0 commit comments

Comments
 (0)