Fix prettier

pull/2494/head
Jérémy Rialland 2023-01-31 18:52:10 +01:00 committed by Johan Girod
parent fb61ee78eb
commit 89da7159a1
5 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ export const SECTION_ORDER = [
'protection sociale . autres',
] as Array<DottedName>
type Section = typeof SECTION_ORDER[number]
type Section = (typeof SECTION_ORDER)[number]
function getSection(rule: RuleNode): Section {
const section = `protection sociale . ${

View File

@ -45,7 +45,7 @@ export default function Budget() {
{ label: 'T3', 'aria-label': 'Trimestre 3' },
{ label: 'T4', 'aria-label': 'Trimestre 4' },
]
const [selectedYear, setSelectedYear] = useState<typeof years[number]>(
const [selectedYear, setSelectedYear] = useState<(typeof years)[number]>(
years[years.length - 1]
)
const categories = [
@ -78,7 +78,7 @@ export default function Budget() {
label={'Année'}
defaultSelectedKey={selectedYear}
onSelectionChange={(year) => {
setSelectedYear(year as typeof years[number])
setSelectedYear(year as (typeof years)[number])
}}
>
{years

View File

@ -5,7 +5,7 @@ import activités from './activités.yaml'
export { activités }
export type Activitée = typeof activités[number]
export type Activitée = (typeof activités)[number]
type ActivitésEn = typeof activitésEn
export const flatActivités = activités.flatMap((el) => [

View File

@ -33,7 +33,7 @@ export const ExonérationCovid = () => {
const location = useLocation()
const [searchParams] = useSearchParams()
const params = Object.fromEntries(searchParams.entries()) as {
[key in typeof rootDottedNames[number]]?: string
[key in (typeof rootDottedNames)[number]]?: string
}
const { t } = useTranslation()

View File

@ -243,9 +243,9 @@ export const relativeSitePaths = encodedRelativeSitePaths
export const absoluteSitePaths = encodedAbsoluteSitePaths
export type RelativeSitePaths =
typeof relativeSitePaths[keyof typeof relativeSitePaths]
(typeof relativeSitePaths)[keyof typeof relativeSitePaths]
export type AbsoluteSitePaths =
typeof absoluteSitePaths[keyof typeof absoluteSitePaths]
(typeof absoluteSitePaths)[keyof typeof absoluteSitePaths]
export const useSitePaths = <T extends 'fr' | 'en'>(lang?: T) => {
const { language } = useTranslation().i18n