Retrait des points-virgules finaux
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
import { ScrollView } from 'react-native';
 | 
			
		||||
import { ScrollView } from 'react-native'
 | 
			
		||||
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText';
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView';
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText'
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView'
 | 
			
		||||
 | 
			
		||||
export default function ChallengesScreen() {
 | 
			
		||||
  return (
 | 
			
		||||
@@ -10,5 +10,5 @@ export default function ChallengesScreen() {
 | 
			
		||||
        <ThemedText>Ici on aura la gestion des challenges</ThemedText>
 | 
			
		||||
      </ThemedView>
 | 
			
		||||
    </ScrollView>
 | 
			
		||||
  );
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
import { ScrollView } from 'react-native';
 | 
			
		||||
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText';
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView';
 | 
			
		||||
import { ScrollView } from 'react-native'
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText'
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView'
 | 
			
		||||
 | 
			
		||||
export default function HistoryScreen() {
 | 
			
		||||
  return (
 | 
			
		||||
@@ -10,5 +9,5 @@ export default function HistoryScreen() {
 | 
			
		||||
        <ThemedText>Ici on aura la gestion de l'historique des trains empruntés et des challenges effectués</ThemedText>
 | 
			
		||||
      </ThemedView>
 | 
			
		||||
    </ScrollView>
 | 
			
		||||
  );
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -27,4 +27,4 @@ const styles = StyleSheet.create({
 | 
			
		||||
    flex: 1,
 | 
			
		||||
    alignSelf: 'stretch',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import { ScrollView } from 'react-native';
 | 
			
		||||
import { ScrollView } from 'react-native'
 | 
			
		||||
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText';
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView';
 | 
			
		||||
import { ThemedText } from '@/components/ThemedText'
 | 
			
		||||
import { ThemedView } from '@/components/ThemedView'
 | 
			
		||||
 | 
			
		||||
export default function TrainScreen() {
 | 
			
		||||
  return (
 | 
			
		||||
@@ -10,5 +10,5 @@ export default function TrainScreen() {
 | 
			
		||||
        <ThemedText>Ici on aura la page pour ajouter un trajet en train depuis Rail Planner</ThemedText>
 | 
			
		||||
      </ThemedView>
 | 
			
		||||
    </ScrollView>
 | 
			
		||||
  );
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,11 @@
 | 
			
		||||
import { Text, type TextProps, StyleSheet } from 'react-native';
 | 
			
		||||
 | 
			
		||||
import { useThemeColor } from '@/hooks/useThemeColor';
 | 
			
		||||
import { Text, type TextProps, StyleSheet } from 'react-native'
 | 
			
		||||
import { useThemeColor } from '@/hooks/useThemeColor'
 | 
			
		||||
 | 
			
		||||
export type ThemedTextProps = TextProps & {
 | 
			
		||||
  lightColor?: string;
 | 
			
		||||
  darkColor?: string;
 | 
			
		||||
  type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
 | 
			
		||||
};
 | 
			
		||||
  lightColor?: string
 | 
			
		||||
  darkColor?: string
 | 
			
		||||
  type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function ThemedText({
 | 
			
		||||
  style,
 | 
			
		||||
@@ -15,7 +14,7 @@ export function ThemedText({
 | 
			
		||||
  type = 'default',
 | 
			
		||||
  ...rest
 | 
			
		||||
}: ThemedTextProps) {
 | 
			
		||||
  const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
 | 
			
		||||
  const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text')
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <Text
 | 
			
		||||
@@ -30,7 +29,7 @@ export function ThemedText({
 | 
			
		||||
      ]}
 | 
			
		||||
      {...rest}
 | 
			
		||||
    />
 | 
			
		||||
  );
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
@@ -57,4 +56,4 @@ const styles = StyleSheet.create({
 | 
			
		||||
    fontSize: 16,
 | 
			
		||||
    color: '#0a7ea4',
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,13 @@
 | 
			
		||||
import { View, type ViewProps } from 'react-native';
 | 
			
		||||
 | 
			
		||||
import { useThemeColor } from '@/hooks/useThemeColor';
 | 
			
		||||
import { View, type ViewProps } from 'react-native'
 | 
			
		||||
import { useThemeColor } from '@/hooks/useThemeColor'
 | 
			
		||||
 | 
			
		||||
export type ThemedViewProps = ViewProps & {
 | 
			
		||||
  lightColor?: string;
 | 
			
		||||
  darkColor?: string;
 | 
			
		||||
};
 | 
			
		||||
  lightColor?: string
 | 
			
		||||
  darkColor?: string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
 | 
			
		||||
  const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
 | 
			
		||||
  const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background')
 | 
			
		||||
 | 
			
		||||
  return <View style={[{ backgroundColor }, style]} {...otherProps} />;
 | 
			
		||||
  return <View style={[{ backgroundColor }, style]} {...otherProps} />
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
import * as React from 'react';
 | 
			
		||||
import renderer from 'react-test-renderer';
 | 
			
		||||
import * as React from 'react'
 | 
			
		||||
import renderer from 'react-test-renderer'
 | 
			
		||||
 | 
			
		||||
import { ThemedText } from '../ThemedText';
 | 
			
		||||
import { ThemedText } from '../ThemedText'
 | 
			
		||||
 | 
			
		||||
it(`renders correctly`, () => {
 | 
			
		||||
  const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
 | 
			
		||||
  const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON()
 | 
			
		||||
 | 
			
		||||
  expect(tree).toMatchSnapshot();
 | 
			
		||||
});
 | 
			
		||||
  expect(tree).toMatchSnapshot()
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -21,4 +21,4 @@ exports[`renders correctly 1`] = `
 | 
			
		||||
>
 | 
			
		||||
  Snapshot test!
 | 
			
		||||
</Text>
 | 
			
		||||
`;
 | 
			
		||||
`
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@
 | 
			
		||||
 * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const tintColorLight = '#0a7ea4';
 | 
			
		||||
const tintColorDark = '#fff';
 | 
			
		||||
const tintColorLight = '#0a7ea4'
 | 
			
		||||
const tintColorDark = '#fff'
 | 
			
		||||
 | 
			
		||||
export const Colors = {
 | 
			
		||||
  light: {
 | 
			
		||||
@@ -23,4 +23,4 @@ export const Colors = {
 | 
			
		||||
    tabIconDefault: '#9BA1A6',
 | 
			
		||||
    tabIconSelected: tintColorDark,
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
export { useColorScheme } from 'react-native';
 | 
			
		||||
export { useColorScheme } from 'react-native'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
import { useEffect, useState } from 'react';
 | 
			
		||||
import { useColorScheme as useRNColorScheme } from 'react-native';
 | 
			
		||||
import { useEffect, useState } from 'react'
 | 
			
		||||
import { useColorScheme as useRNColorScheme } from 'react-native'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * To support static rendering, this value needs to be re-calculated on the client side for web
 | 
			
		||||
 */
 | 
			
		||||
export function useColorScheme() {
 | 
			
		||||
  const [hasHydrated, setHasHydrated] = useState(false);
 | 
			
		||||
  const [hasHydrated, setHasHydrated] = useState(false)
 | 
			
		||||
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    setHasHydrated(true);
 | 
			
		||||
  }, []);
 | 
			
		||||
    setHasHydrated(true)
 | 
			
		||||
  }, [])
 | 
			
		||||
 | 
			
		||||
  const colorScheme = useRNColorScheme();
 | 
			
		||||
  const colorScheme = useRNColorScheme()
 | 
			
		||||
 | 
			
		||||
  if (hasHydrated) {
 | 
			
		||||
    return colorScheme;
 | 
			
		||||
    return colorScheme
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return 'light';
 | 
			
		||||
  return 'light'
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,19 +3,19 @@
 | 
			
		||||
 * https://docs.expo.dev/guides/color-schemes/
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
import { Colors } from '@/constants/Colors';
 | 
			
		||||
import { useColorScheme } from '@/hooks/useColorScheme';
 | 
			
		||||
import { Colors } from '@/constants/Colors'
 | 
			
		||||
import { useColorScheme } from '@/hooks/useColorScheme'
 | 
			
		||||
 | 
			
		||||
export function useThemeColor(
 | 
			
		||||
  props: { light?: string; dark?: string },
 | 
			
		||||
  colorName: keyof typeof Colors.light & keyof typeof Colors.dark
 | 
			
		||||
) {
 | 
			
		||||
  const theme = useColorScheme() ?? 'light';
 | 
			
		||||
  const colorFromProps = props[theme];
 | 
			
		||||
  const theme = useColorScheme() ?? 'light'
 | 
			
		||||
  const colorFromProps = props[theme]
 | 
			
		||||
 | 
			
		||||
  if (colorFromProps) {
 | 
			
		||||
    return colorFromProps;
 | 
			
		||||
    return colorFromProps
 | 
			
		||||
  } else {
 | 
			
		||||
    return Colors[theme][colorName];
 | 
			
		||||
    return Colors[theme][colorName]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -21,5 +21,6 @@ module.exports = {
 | 
			
		||||
    '@typescript-eslint/explicit-function-return-type': 'off',
 | 
			
		||||
    '@typescript-eslint/explicit-module-boundary-types': 'off',
 | 
			
		||||
    '@typescript-eslint/no-explicit-any': 'off',
 | 
			
		||||
    '@typescript-eslint/semi': 'never',
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +1,26 @@
 | 
			
		||||
import { PrismaClient } from '@prisma/client';
 | 
			
		||||
import { PrismaClient } from '@prisma/client'
 | 
			
		||||
 | 
			
		||||
const prisma = new PrismaClient();
 | 
			
		||||
const prisma = new PrismaClient()
 | 
			
		||||
 | 
			
		||||
async function main() {
 | 
			
		||||
  const emmy = await prisma.user.upsert({
 | 
			
		||||
    where: { id: 1 },
 | 
			
		||||
    update: { name: 'Emmy' },
 | 
			
		||||
    create: { name: 'Emmy' },
 | 
			
		||||
  });
 | 
			
		||||
  })
 | 
			
		||||
  const tamina = await prisma.user.upsert({
 | 
			
		||||
    where: { id: 2 },
 | 
			
		||||
    update: { name: 'Tamina' },
 | 
			
		||||
    create: { name: 'Tamina' },
 | 
			
		||||
  });
 | 
			
		||||
  console.log({ emmy, tamina });
 | 
			
		||||
  })
 | 
			
		||||
  console.log({ emmy, tamina })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main()
 | 
			
		||||
  .catch((e) => {
 | 
			
		||||
    console.error(e);
 | 
			
		||||
    process.exit(1);
 | 
			
		||||
    console.error(e)
 | 
			
		||||
    process.exit(1)
 | 
			
		||||
  })
 | 
			
		||||
  .finally(async () => {
 | 
			
		||||
    await prisma.$disconnect();
 | 
			
		||||
  });
 | 
			
		||||
    await prisma.$disconnect()
 | 
			
		||||
  })
 | 
			
		||||
 
 | 
			
		||||
@@ -1,22 +1,22 @@
 | 
			
		||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
			
		||||
import { AppController } from './app.controller';
 | 
			
		||||
import { AppService } from './app.service';
 | 
			
		||||
import { Test, TestingModule } from '@nestjs/testing'
 | 
			
		||||
import { AppController } from './app.controller'
 | 
			
		||||
import { AppService } from './app.service'
 | 
			
		||||
 | 
			
		||||
describe('AppController', () => {
 | 
			
		||||
  let appController: AppController;
 | 
			
		||||
  let appController: AppController
 | 
			
		||||
 | 
			
		||||
  beforeEach(async () => {
 | 
			
		||||
    const app: TestingModule = await Test.createTestingModule({
 | 
			
		||||
      controllers: [AppController],
 | 
			
		||||
      providers: [AppService],
 | 
			
		||||
    }).compile();
 | 
			
		||||
    }).compile()
 | 
			
		||||
 | 
			
		||||
    appController = app.get<AppController>(AppController);
 | 
			
		||||
  });
 | 
			
		||||
    appController = app.get<AppController>(AppController)
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  describe('root', () => {
 | 
			
		||||
    it('should return "Hello World!"', () => {
 | 
			
		||||
      expect(appController.getHello()).toBe('Hello World!');
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
      expect(appController.getHello()).toBe('Hello World!')
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
import { Controller, Get } from '@nestjs/common';
 | 
			
		||||
import { AppService } from './app.service';
 | 
			
		||||
import { Controller, Get } from '@nestjs/common'
 | 
			
		||||
import { AppService } from './app.service'
 | 
			
		||||
 | 
			
		||||
@Controller()
 | 
			
		||||
export class AppController {
 | 
			
		||||
@@ -7,6 +7,6 @@ export class AppController {
 | 
			
		||||
 | 
			
		||||
  @Get()
 | 
			
		||||
  getHello(): string {
 | 
			
		||||
    return this.appService.getHello();
 | 
			
		||||
    return this.appService.getHello()
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import { Module } from '@nestjs/common';
 | 
			
		||||
import { AppController } from './app.controller';
 | 
			
		||||
import { AppService } from './app.service';
 | 
			
		||||
import { Module } from '@nestjs/common'
 | 
			
		||||
import { AppController } from './app.controller'
 | 
			
		||||
import { AppService } from './app.service'
 | 
			
		||||
 | 
			
		||||
@Module({
 | 
			
		||||
  imports: [],
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import { Injectable } from '@nestjs/common';
 | 
			
		||||
import { Injectable } from '@nestjs/common'
 | 
			
		||||
 | 
			
		||||
@Injectable()
 | 
			
		||||
export class AppService {
 | 
			
		||||
  getHello(): string {
 | 
			
		||||
    return 'Hello World!';
 | 
			
		||||
    return 'Hello World!'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import { NestFactory } from '@nestjs/core';
 | 
			
		||||
import { AppModule } from './app.module';
 | 
			
		||||
import { NestFactory } from '@nestjs/core'
 | 
			
		||||
import { AppModule } from './app.module'
 | 
			
		||||
 | 
			
		||||
async function bootstrap() {
 | 
			
		||||
  const app = await NestFactory.create(AppModule);
 | 
			
		||||
  await app.listen(process.env.PORT ?? 3000);
 | 
			
		||||
  const app = await NestFactory.create(AppModule)
 | 
			
		||||
  await app.listen(process.env.PORT ?? 3000)
 | 
			
		||||
}
 | 
			
		||||
bootstrap();
 | 
			
		||||
bootstrap()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,24 +1,24 @@
 | 
			
		||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
			
		||||
import { INestApplication } from '@nestjs/common';
 | 
			
		||||
import * as request from 'supertest';
 | 
			
		||||
import { AppModule } from './../src/app.module';
 | 
			
		||||
import { Test, TestingModule } from '@nestjs/testing'
 | 
			
		||||
import { INestApplication } from '@nestjs/common'
 | 
			
		||||
import * as request from 'supertest'
 | 
			
		||||
import { AppModule } from './../src/app.module'
 | 
			
		||||
 | 
			
		||||
describe('AppController (e2e)', () => {
 | 
			
		||||
  let app: INestApplication;
 | 
			
		||||
  let app: INestApplication
 | 
			
		||||
 | 
			
		||||
  beforeEach(async () => {
 | 
			
		||||
    const moduleFixture: TestingModule = await Test.createTestingModule({
 | 
			
		||||
      imports: [AppModule],
 | 
			
		||||
    }).compile();
 | 
			
		||||
    }).compile()
 | 
			
		||||
 | 
			
		||||
    app = moduleFixture.createNestApplication();
 | 
			
		||||
    await app.init();
 | 
			
		||||
  });
 | 
			
		||||
    app = moduleFixture.createNestApplication()
 | 
			
		||||
    await app.init()
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  it('/ (GET)', () => {
 | 
			
		||||
    return request(app.getHttpServer())
 | 
			
		||||
      .get('/')
 | 
			
		||||
      .expect(200)
 | 
			
		||||
      .expect('Hello World!');
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
      .expect('Hello World!')
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user