File tree Expand file tree Collapse file tree 14 files changed +235
-102
lines changed Expand file tree Collapse file tree 14 files changed +235
-102
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "extends": ["@react-native-community"],
3
+ "rules": {
4
+ "no-console": "error"
5
+ }
6
+ }
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ DerivedData
28
28
* .xcuserstate
29
29
local.properties
30
30
* .iml
31
+
32
+ # workspaces
33
+ /packages /* /lib
Original file line number Diff line number Diff line change
1
+ {
2
+ "tabWidth": 2,
3
+ "semi": true,
4
+ "singleQuote": true,
5
+ "bracketSpacing": true,
6
+ "parser": "typescript"
7
+ }
Original file line number Diff line number Diff line change 5
5
" packages/*"
6
6
],
7
7
"packageManager" : " yarn@3.4.1" ,
8
+ "devDependencies" : {
9
+ "@react-native-community/eslint-config" : " 3.2.0" ,
10
+ "eslint" : " 8.26.0" ,
11
+ "prettier" : " 2.5.1" ,
12
+ "typescript" : " 4.9.5"
13
+ },
8
14
"resolutions" : {
9
15
"@react-native-community/cli" : " ^10.2.5" ,
10
16
"@react-native-community/cli-platform-android" : " ^10.2.0" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends": "../../.eslintrc"
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @react-native-async-storage/core" ,
3
+ "version" : " 0.0.0" ,
4
+ "description" : " Core API of Async Storage" ,
5
+ "source" : " src/index.ts" ,
6
+ "react-native" : " src/index.ts" ,
7
+ "types" : " lib/typescript/index.d.ts" ,
8
+ "exports" : {
9
+ "import" : " ./lib/module/index.js" ,
10
+ "require" : " ./lib/commonjs/index.js"
11
+ },
12
+ "files" : [
13
+ " src" ,
14
+ " lib"
15
+ ],
16
+ "scripts" : {
17
+ "prepack" : " yarn build" ,
18
+ "build" : " bob build" ,
19
+ "test:lint" : " eslint src/**" ,
20
+ "test:ts" : " tsc --noEmit"
21
+ },
22
+ "keywords" : [
23
+ " react-native" ,
24
+ " async-storage" ,
25
+ " storage" ,
26
+ " api" ,
27
+ " core api"
28
+ ],
29
+ "repository" : " https://github.com/react-native-async-storage/async-storage/blob/main/packages/core" ,
30
+ "author" : " Krzysztof Borowy <contact@kborowy.com>" ,
31
+ "license" : " MIT" ,
32
+ "devDependencies" : {
33
+ "eslint" : " 8.26.0" ,
34
+ "react-native-builder-bob" : " 0.20.0" ,
35
+ "typescript" : " 4.9.5"
36
+ },
37
+ "react-native-builder-bob" : {
38
+ "source" : " src" ,
39
+ "output" : " lib" ,
40
+ "targets" : [
41
+ " commonjs" ,
42
+ " module" ,
43
+ " typescript"
44
+ ]
45
+ }
46
+ }
Original file line number Diff line number Diff line change
1
+ function double ( i : number ) {
2
+ return i * i ;
3
+ }
4
+
5
+ double ( 6 ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ../../tsconfig.base.json" ,
3
+ "include" : [" ./src/**/*" ]
4
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends": [
3
+ "../../.eslintrc",
4
+ "plugin:wdio/recommended"
5
+ ],
6
+ "plugins": ["wdio"],
7
+ "rules": {
8
+ "dot-notation": "off"
9
+ }
10
+ }
Original file line number Diff line number Diff line change 72
72
"devDependencies" : {
73
73
"@babel/core" : " ^7.20.0" ,
74
74
"@babel/preset-env" : " ^7.20.0" ,
75
- "@react-native-community/eslint-config" : " ^3.0.0" ,
76
75
"@semantic-release/changelog" : " ^6.0.0" ,
77
76
"@semantic-release/git" : " ^10.0.0" ,
78
77
"@types/lodash" : " ^4.14.184" ,
87
86
"appium-uiautomator2-driver" : " ^2.26.2" ,
88
87
"appium-xcuitest-driver" : " ^4.32.5" ,
89
88
"concurrently" : " ^6.4.0" ,
90
- "eslint" : " ^8.0 .0" ,
89
+ "eslint" : " 8.26 .0" ,
91
90
"eslint-plugin-wdio" : " ^8.8.7" ,
92
91
"expo" : " ^48.0.0" ,
93
92
"lodash" : " ^4.17.21" ,
94
- "prettier" : " ^ 2.5.1" ,
93
+ "prettier" : " 2.5.1" ,
95
94
"react" : " 18.2.0" ,
96
95
"react-dom" : " ^18.2.0" ,
97
96
"react-native" : " ^0.71.0" ,
106
105
"typescript" : " ^4.9.4" ,
107
106
"webdriverio" : " ^8.11.2"
108
107
},
109
- "eslintConfig" : {
110
- "root" : true ,
111
- "plugins" : [
112
- " wdio"
113
- ],
114
- "extends" : [
115
- " @react-native-community" ,
116
- " plugin:wdio/recommended"
117
- ],
118
- "rules" : {
119
- "dot-notation" : " off"
120
- }
121
- },
122
- "prettier" : {
123
- "endOfLine" : " auto" ,
124
- "singleQuote" : true ,
125
- "overrides" : [
126
- {
127
- "files" : " *.md" ,
128
- "options" : {
129
- "proseWrap" : " always"
130
- }
131
- }
132
- ]
133
- },
134
108
"react-native-builder-bob" : {
135
109
"source" : " src" ,
136
110
"output" : " lib" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export function checkValidInput(...input: unknown[]) {
28
28
const [ key , value ] = input ;
29
29
30
30
if ( typeof key !== 'string' ) {
31
+ // eslint-disable-next-line no-console
31
32
console . warn (
32
33
`[AsyncStorage] Using ${ typeof key } type for key is not supported. This can lead to unexpected behavior/errors. Use string instead.\nKey passed: ${ key } \n`
33
34
) ;
@@ -39,6 +40,7 @@ export function checkValidInput(...input: unknown[]) {
39
40
`[AsyncStorage] Passing null/undefined as value is not supported. If you want to remove value, Use .removeItem method instead.\nPassed value: ${ value } \nPassed key: ${ key } \n`
40
41
) ;
41
42
} else {
43
+ // eslint-disable-next-line no-console
42
44
console . warn (
43
45
`[AsyncStorage] The value for key "${ key } " is not a string. This can lead to unexpected behavior/errors. Consider stringifying it.\nPassed value: ${ value } \nPassed key: ${ key } \n`
44
46
) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "compilerOptions" : {
3
- "noFallthroughCasesInSwitch" : true ,
4
- "noImplicitOverride" : true ,
5
- "noImplicitReturns" : true ,
6
- "noPropertyAccessFromIndexSignature" : true ,
7
- "noUnusedLocals" : true ,
8
- "noUnusedParameters" : true ,
9
- "strict" : true ,
10
- "moduleResolution" : " Node" ,
11
- "resolveJsonModule" : true ,
12
- "allowJs" : true ,
13
- "checkJs" : true ,
14
- "allowSyntheticDefaultImports" : true ,
15
- "forceConsistentCasingInFileNames" : true ,
16
- "jsx" : " react" ,
17
- "target" : " ESNext" ,
18
- "skipLibCheck" : true
19
- },
2
+ "extends" : " ../../tsconfig.base.json" ,
20
3
"include" : [
21
4
" src"
22
5
]
Original file line number Diff line number Diff line change
1
+ {
2
+ "exclude" : [" node_modules" ],
3
+ "compilerOptions" : {
4
+ "noFallthroughCasesInSwitch" : true ,
5
+ "noImplicitOverride" : true ,
6
+ "noImplicitReturns" : true ,
7
+ "noPropertyAccessFromIndexSignature" : true ,
8
+ "noUnusedLocals" : true ,
9
+ "noUnusedParameters" : true ,
10
+ "strict" : true ,
11
+ "moduleResolution" : " node" ,
12
+ "resolveJsonModule" : true ,
13
+ "allowJs" : true ,
14
+ "checkJs" : true ,
15
+ "allowSyntheticDefaultImports" : true ,
16
+ "forceConsistentCasingInFileNames" : true ,
17
+ "jsx" : " react" ,
18
+ "target" : " ESNext" ,
19
+ "skipLibCheck" : true
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments