pep 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pep.rb +34 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b079b6f40754f4136e2e5d87f4053ca2f5a6a0bbb10dac8b4b68787b7ff48661
|
4
|
+
data.tar.gz: 7a5c51a28cc28106692389d36b03b9b552d33931acd5a39ca3a3a13848860056
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f2527fc1bcd098cdaa77034f9e2a96b08bbe1df401263e475311dd040dfa45e1a392ab308574f5a5030d77a88a92a201c9254e74b35509640682367fa45d02d
|
7
|
+
data.tar.gz: 04cd159f764557f08ad5b8d9cfaadebfefa4848335ceae062b468b860f13608b9957a1360fe66f58bebaf3e416d47b7d39576ec9948067d4edf2b690f6604d6e
|
data/lib/pep.rb
CHANGED
@@ -189,6 +189,12 @@ class AddEslint
|
|
189
189
|
|
190
190
|
def eslintrc_js_content
|
191
191
|
<<~EOS
|
192
|
+
const rule = {
|
193
|
+
off: 0,
|
194
|
+
warn: 1,
|
195
|
+
error: 2,
|
196
|
+
}
|
197
|
+
|
192
198
|
module.exports = {
|
193
199
|
root: true,
|
194
200
|
parser: "@typescript-eslint/parser",
|
@@ -204,14 +210,16 @@ class AddEslint
|
|
204
210
|
"react-native/react-native": true,
|
205
211
|
},
|
206
212
|
rules: {
|
207
|
-
"react-native/no-unused-styles":
|
208
|
-
"react-native/split-platform-components":
|
209
|
-
"react-native/no-single-element-style-arrays":
|
213
|
+
"react-native/no-unused-styles": rule.error,
|
214
|
+
"react-native/split-platform-components": rule.error,
|
215
|
+
"react-native/no-single-element-style-arrays": rule.error,
|
210
216
|
"react-hooks/rules-of-hooks": "error",
|
211
217
|
"react-hooks/exhaustive-deps": "error",
|
212
218
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
213
|
-
"@typescript-eslint/ban-ts-comment":
|
214
|
-
"@typescript-eslint/no-empty-function":
|
219
|
+
"@typescript-eslint/ban-ts-comment": rule.off,
|
220
|
+
"@typescript-eslint/no-empty-function": rule.off,
|
221
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
222
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
215
223
|
},
|
216
224
|
}
|
217
225
|
EOS
|
@@ -378,29 +386,40 @@ class InstallReactNavigation
|
|
378
386
|
type HomeProps = NativeStackScreenProps<StackNavigatorParams, "Home">
|
379
387
|
type DetailsProps = NativeStackScreenProps<StackNavigatorParams, "Details">
|
380
388
|
|
381
|
-
const HomeScreen = ({ navigation }: HomeProps) => {
|
389
|
+
const HomeScreen = ({ navigation }: HomeProps): React.ReactElement => {
|
382
390
|
const [homeScreensTextInputValue, setHomescreensTextInputValue] =
|
383
391
|
useState<string>("")
|
384
392
|
return (
|
385
|
-
<View style={{ flex: 1, alignItems: "center"
|
386
|
-
<Text
|
393
|
+
<View style={{ flex: 1, alignItems: "center" }}>
|
394
|
+
<Text style={{ fontWeight: "bold", marginTop: 100 }}>
|
395
|
+
Open `src/App.tsx` to begin editing your app.
|
396
|
+
</Text>
|
397
|
+
<Text style={{ marginTop: 100 }}>Home Screen</Text>
|
387
398
|
<TextInput
|
388
399
|
value={homeScreensTextInputValue}
|
389
400
|
onChangeText={setHomescreensTextInputValue}
|
390
|
-
placeholder="Type
|
391
|
-
style={{
|
401
|
+
placeholder="Type something here to see it on the details screen"
|
402
|
+
style={{
|
403
|
+
width: "90%",
|
404
|
+
height: 30,
|
405
|
+
textAlign: "center",
|
406
|
+
borderWidth: 1,
|
407
|
+
borderColor: "#aaa",
|
408
|
+
marginTop: 20,
|
409
|
+
marginBottom: 20,
|
410
|
+
}}
|
392
411
|
/>
|
393
412
|
<Button
|
394
|
-
title="Go to Details"
|
395
|
-
onPress={() =>
|
413
|
+
title="Go to Details Screen"
|
414
|
+
onPress={(): void => {
|
396
415
|
navigation.navigate("Details", { homeScreensTextInputValue })
|
397
|
-
}
|
416
|
+
}}
|
398
417
|
/>
|
399
418
|
</View>
|
400
419
|
)
|
401
420
|
}
|
402
421
|
|
403
|
-
const DetailsScreen = ({ route }: DetailsProps) => {
|
422
|
+
const DetailsScreen = ({ route }: DetailsProps): React.ReactElement => {
|
404
423
|
const { homeScreensTextInputValue } = route.params
|
405
424
|
return (
|
406
425
|
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
|
@@ -419,7 +438,7 @@ class InstallReactNavigation
|
|
419
438
|
},
|
420
439
|
}
|
421
440
|
|
422
|
-
const App = () => (
|
441
|
+
const App = (): React.ReactElement => (
|
423
442
|
<NavigationContainer theme={MyTheme}>
|
424
443
|
<Stack.Navigator>
|
425
444
|
<Stack.Screen name="Home" component={HomeScreen} />
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Pachulski
|
@@ -19,7 +19,7 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- bin/pep
|
21
21
|
- lib/pep.rb
|
22
|
-
homepage: https://
|
22
|
+
homepage: https://github.com/pachun/pep
|
23
23
|
licenses:
|
24
24
|
- MIT
|
25
25
|
metadata: {}
|