Skip to content

Commit becbe96

Browse files
authored
chore: bump ESLint and migrate to the new config format (#1033)
1 parent 88ed07c commit becbe96

32 files changed

+1099
-716
lines changed

.config/.eslintrc

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
],
77
"packageManager": "yarn@3.4.1",
88
"devDependencies": {
9-
"@react-native-community/eslint-config": "3.2.0",
10-
"eslint": "8.26.0",
11-
"prettier": "2.8.8",
12-
"typescript": "4.9.5"
9+
"@rnx-kit/eslint-plugin": "^0.5.0",
10+
"eslint": "^8.54.0",
11+
"prettier": "^2.8.8",
12+
"typescript": "^5.3.0"
1313
},
1414
"resolutions": {
1515
"@react-native-community/cli": "^10.2.5",

packages/api/.eslintrc

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

packages/api/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@react-native-async-storage/eslint-config");

packages/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"license": "MIT",
3333
"devDependencies": {
3434
"@types/jest": "29.5.4",
35-
"eslint": "8.26.0",
35+
"eslint": "^8.54.0",
3636
"jest": "29.5.0",
3737
"react-native-builder-bob": "0.20.0",
3838
"ts-jest": "29.1.1",
39-
"typescript": "4.9.5"
39+
"typescript": "^5.3.0"
4040
},
4141
"react-native-builder-bob": {
4242
"source": "src",

packages/api/src/StorageExtension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
* core interface beyond its operations. It acts as a placeholder for implementing
44
* additional methods.
55
*/
6+
// eslint-disable-next-line @typescript-eslint/ban-types
67
export type StorageExtension = {};

packages/default-storage/.eslintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ["module:metro-react-native-babel-preset"],
33
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@react-native-async-storage/eslint-config/recommended-wdio");

packages/default-storage/example/App.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import React, { useCallback, useMemo, useState } from 'react';
8+
import React, { useCallback, useMemo, useState } from "react";
99
import {
1010
Button,
1111
Keyboard,
@@ -14,11 +14,11 @@ import {
1414
Text,
1515
TouchableOpacity,
1616
View,
17-
} from 'react-native';
18-
import Basic from './examples/Basic';
19-
import Functional from './examples/Functional';
20-
import GetSetClear from './examples/GetSetClear';
21-
import MergeItem from './examples/MergeItem';
17+
} from "react-native";
18+
import Basic from "./examples/Basic";
19+
import Functional from "./examples/Functional";
20+
import GetSetClear from "./examples/GetSetClear";
21+
import MergeItem from "./examples/MergeItem";
2222

2323
const SCREENS = {
2424
Functional,
@@ -86,13 +86,13 @@ export default function App(): JSX.Element {
8686
const styles = StyleSheet.create({
8787
container: {
8888
flex: 1,
89-
backgroundColor: '#F5FCFF',
89+
backgroundColor: "#F5FCFF",
9090
padding: 8,
9191
},
9292
exampleContainer: {
9393
padding: 4,
94-
backgroundColor: '#FFF',
95-
borderColor: '#EEE',
94+
backgroundColor: "#FFF",
95+
borderColor: "#EEE",
9696
borderTopWidth: 1,
9797
borderBottomWidth: 1,
9898
flex: 1,
@@ -101,29 +101,29 @@ const styles = StyleSheet.create({
101101
fontSize: 18,
102102
},
103103
exampleDescription: {
104-
color: '#333333',
104+
color: "#333333",
105105
marginBottom: 16,
106106
},
107107
exampleInnerContainer: {
108-
borderColor: '#EEE',
108+
borderColor: "#EEE",
109109
borderTopWidth: 1,
110110
paddingTop: 10,
111111
flex: 1,
112112
},
113113
restartButton: {
114114
padding: 6,
115115
borderRadius: 5,
116-
backgroundColor: '#F3F3F3',
117-
alignItems: 'center',
118-
justifyContent: 'center',
119-
alignSelf: 'flex-end',
116+
backgroundColor: "#F3F3F3",
117+
alignItems: "center",
118+
justifyContent: "center",
119+
alignSelf: "flex-end",
120120
},
121121
closeKeyboardView: {
122122
width: 5,
123123
height: 5,
124124
},
125125
testPickerContainer: {
126-
flexDirection: 'row',
127-
flexWrap: 'wrap',
126+
flexDirection: "row",
127+
flexWrap: "wrap",
128128
},
129129
});

0 commit comments

Comments
 (0)