🎨 Lint the project

pull/21/head
Alexis Drai 2 years ago
parent 69921a878f
commit da4a4a9c9e

@ -1,9 +1,9 @@
// App.tsx // App.tsx
import React from 'react'; import React from 'react';
import Navigation from "./navigation/Navigation"; import Navigation from "./navigation/Navigation";
import store from "./redux/store"; import store from "./redux/store";
import { Provider } from "react-redux"; import { Provider } from "react-redux";
import { SafeAreaProvider } from "react-native-safe-area-context"; import { SafeAreaProvider } from "react-native-safe-area-context";
export default function App() { export default function App() {

@ -1,6 +1,6 @@
// components/AlertModal.tsx // components/AlertModal.tsx
import { Button, Modal, StyleSheet, Text, View } from 'react-native'; import { Button, Modal, StyleSheet, Text, View } from 'react-native';
import React from 'react'; import React from 'react';
type AlertModalProps = { type AlertModalProps = {
visible: boolean; visible: boolean;

@ -1,7 +1,7 @@
// components/MoveListItem.test.ts // components/MoveListItem.test.ts
import { Move } from "../entities/Move"; import { Move } from "../entities/Move";
import React from "react"; import React from "react";
import { StyleSheet, Text, TouchableOpacity, ViewStyle } from "react-native"; import { StyleSheet, Text, TouchableOpacity, ViewStyle } from "react-native";
type MoveListItemProps = { type MoveListItemProps = {

@ -1,9 +1,9 @@
// components/TypeTacticsInfoList.test.ts // components/TypeTacticsInfoList.test.ts
import React from 'react'; import React from 'react';
import { render } from '@testing-library/react-native'; import { render } from '@testing-library/react-native';
import TypeTacticsInfoList from './TypeTacticsInfoList'; import TypeTacticsInfoList from './TypeTacticsInfoList';
import { TypeName } from "../entities/TypeName"; import { TypeName } from "../entities/TypeName";
describe('TypeTacticsInfoList component', () => { describe('TypeTacticsInfoList component', () => {
it('renders types correctly', () => { it('renders types correctly', () => {

@ -1,6 +1,6 @@
// components/TypeTacticsInfoList.ts // components/TypeTacticsInfoList.ts
import React from "react"; import React from "react";
import { ScrollView, StyleSheet, Text, View } from "react-native"; import { ScrollView, StyleSheet, Text, View } from "react-native";
type TypeListProps = { type TypeListProps = {

@ -1,6 +1,6 @@
// entities/Move.ts // entities/Move.ts
import { Type } from "./Type"; import { Type } from "./Type";
import { MoveCategoryName } from "./MoveCategoryName"; import { MoveCategoryName } from "./MoveCategoryName";
export interface Move { export interface Move {

@ -1,15 +1,15 @@
// navigation/Navigation.tsx // navigation/Navigation.tsx
import React from 'react'; import React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer } from '@react-navigation/native'; import { NavigationContainer } from '@react-navigation/native';
import MoveListScreen from '../screens/moves/MoveListScreen'; import MoveListScreen from '../screens/moves/MoveListScreen';
import MoveDetailScreen from '../screens/moves/MoveDetailScreen'; import MoveDetailScreen from '../screens/moves/MoveDetailScreen';
import HomeScreen from '../screens/HomeScreen'; import HomeScreen from '../screens/HomeScreen';
import { createStackNavigator } from '@react-navigation/stack'; import { createStackNavigator } from '@react-navigation/stack';
import { RootStackParamList, RootTabParamList } from "./navigationTypes"; import { RootStackParamList, RootTabParamList } from "./navigationTypes";
import { Image, StyleSheet } from 'react-native'; import { Image, StyleSheet } from 'react-native';
import MoveFormScreen from "../screens/moves/MoveFormScreen"; import MoveFormScreen from "../screens/moves/MoveFormScreen";
const Stack = createStackNavigator<RootStackParamList>(); const Stack = createStackNavigator<RootStackParamList>();
const Tab = createBottomTabNavigator<RootTabParamList>(); const Tab = createBottomTabNavigator<RootTabParamList>();

@ -1,10 +1,8 @@
// redux/actions/moveAction.ts // redux/actions/moveAction.ts
import { CREATE_MOVE, DELETE, DELETE_MOVE, GET, GET_MOVES, MOVE_ERROR, POST, PUT, UPDATE_MOVE } from '../constants'; import { CREATE_MOVE, DELETE, DELETE_MOVE, GET, GET_MOVES, MOVE_ERROR, POST, PUT, UPDATE_MOVE } from '../constants';
import { import { Move } from "../../entities/Move";
Move import { Dispatch } from "redux";
} from "../../entities/Move"; import { API_BASE_URL } from "../../config";
import { Dispatch } from "redux";
import { API_BASE_URL } from "../../config";
export const createMove = (move: Move) => { export const createMove = (move: Move) => {

@ -1,6 +1,6 @@
// redux/reducers/moveReducer.ts // redux/reducers/moveReducer.ts
import { CREATE_MOVE, DELETE_MOVE, GET_MOVES, MOVE_ERROR, UPDATE_MOVE } from '../constants'; import { CREATE_MOVE, DELETE_MOVE, GET_MOVES, MOVE_ERROR, UPDATE_MOVE } from '../constants';
import { Move } from "../../entities/Move"; import { Move } from "../../entities/Move";
export type MoveState = { export type MoveState = {
moves: Move[]; moves: Move[];

@ -1,6 +1,6 @@
// redux/store.ts // redux/store.ts
import { configureStore } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit'
import moveReducer, { MoveState } from './reducers/moveReducer'; import moveReducer, { MoveState } from './reducers/moveReducer';
export type AppDispatch = typeof store.dispatch; export type AppDispatch = typeof store.dispatch;

@ -1,6 +1,6 @@
// screens/HomeScreen.tsx // screens/HomeScreen.tsx
import React from 'react'; import React from 'react';
import { Image, View } from 'react-native'; import { Image, View } from 'react-native';
const HomeScreen = () => { const HomeScreen = () => {

@ -1,15 +1,15 @@
// screens/moves/MoveDetailScreen.tsx // screens/moves/MoveDetailScreen.tsx
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { Button, ScrollView, StyleSheet, Text, View } from 'react-native'; import { Button, ScrollView, StyleSheet, Text, View } from 'react-native';
import { RouteProp } from '@react-navigation/native'; import { RouteProp } from '@react-navigation/native';
import { RootStackParamList } from "../../navigation/navigationTypes"; import { RootStackParamList } from "../../navigation/navigationTypes";
import TypeTacticsInfoList from "../../components/TypeTacticsInfoList" import TypeTacticsInfoList from "../../components/TypeTacticsInfoList"
import { StackNavigationProp } from "@react-navigation/stack"; import { StackNavigationProp } from "@react-navigation/stack";
import { MOVE_DETAIL, MOVE_FORM } from '../../navigation/constants'; import { MOVE_DETAIL, MOVE_FORM } from '../../navigation/constants';
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { RootState } from "../../redux/store"; import { RootState } from "../../redux/store";
import { Move } from "../../entities/Move"; import { Move } from "../../entities/Move";
type MoveDetailScreenNavigationProp = StackNavigationProp<RootStackParamList, typeof MOVE_DETAIL>; type MoveDetailScreenNavigationProp = StackNavigationProp<RootStackParamList, typeof MOVE_DETAIL>;

@ -1,18 +1,18 @@
// screens/moves/MoveListScreen.tsx // screens/moves/MoveListScreen.tsx
import React from 'react'; import React from 'react';
import { Button, FlatList, StyleSheet, View } from 'react-native'; import { Button, FlatList, StyleSheet, View } from 'react-native';
import { StackNavigationProp } from '@react-navigation/stack'; import { StackNavigationProp } from '@react-navigation/stack';
import { RootStackParamList } from "../../navigation/navigationTypes"; import { RootStackParamList } from "../../navigation/navigationTypes";
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { deleteMove, getMoves } from '../../redux/actions/moveActions'; import { deleteMove, getMoves } from '../../redux/actions/moveActions';
import { MoveState } from "../../redux/reducers/moveReducer"; import { MoveState } from "../../redux/reducers/moveReducer";
import { AppDispatch } from "../../redux/store"; import { AppDispatch } from "../../redux/store";
import MoveListItem from "../../components/MoveListItem"; import MoveListItem from "../../components/MoveListItem";
import { MOVE_DETAIL, MOVE_FORM, MOVE_LIST } from "../../navigation/constants"; import { MOVE_DETAIL, MOVE_FORM, MOVE_LIST } from "../../navigation/constants";
import { RouteProp, useFocusEffect } from "@react-navigation/native"; import { RouteProp, useFocusEffect } from "@react-navigation/native";
import AlertModal from "../../components/AlertModal"; import AlertModal from "../../components/AlertModal";
import { MOVE_ERROR } from "../../redux/constants"; import { MOVE_ERROR } from "../../redux/constants";
type MoveListScreenNavigationProp = StackNavigationProp<RootStackParamList, typeof MOVE_LIST>; type MoveListScreenNavigationProp = StackNavigationProp<RootStackParamList, typeof MOVE_LIST>;
type MoveListScreenRouteProp = RouteProp<RootStackParamList, typeof MOVE_LIST>; type MoveListScreenRouteProp = RouteProp<RootStackParamList, typeof MOVE_LIST>;

Loading…
Cancel
Save