Skip to content

Commit

Permalink
chore: improve eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord committed Jul 28, 2024
1 parent 0524e53 commit 49c04b3
Show file tree
Hide file tree
Showing 7 changed files with 653 additions and 13 deletions.
25 changes: 22 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{
"extends": "next",
"extends": ["next", "plugin:unicorn/recommended"],
"settings": {
"next": {
"rootDir": "./apps/librelingo-web/src"
}
},
"ignorePatterns": ["playwright-report", "apps/librelingo-web/out"],
"rules": {
"@next/next/no-html-link-for-pages": "off"
}
"@next/next/no-html-link-for-pages": "off",
"unicorn/prevent-abbreviations": [
"error",
{
"allowList": {
"Props": true,
"generateStaticParams": true,
"props": true,
"env": true
}
}
]
},
"overrides": [
{
"files": ["./apps/librelingo-web/src/components/ui/**/*"],
"rules": {
"unicorn/prevent-abbreviations": "off"
}
}
]
}
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/librelingo-web/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata } from 'next'
import CourseCard from './CourseCard'
import { Course, listAvailableCourses } from '@/data/course'
import CourseCard from './course-card'

export const metadata: Metadata = {
title: 'LibreLingo',
Expand Down
6 changes: 3 additions & 3 deletions apps/librelingo-web/src/data/course.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'
import path from 'node:path'
import courseConfig from '@/courses/config.json'
import fs from 'fs'
import fs from 'node:fs'

export type Course = {
id: string
Expand All @@ -24,7 +24,7 @@ function getFullJsonPath(jsonPath: string) {
async function getCourseMetadataByJsonPath(jsonPath: string) {
const fileContent = await fs.promises.readFile(
getFullJsonPath(jsonPath),
'utf-8'
'utf8'
)
return JSON.parse(fileContent)
}
Expand Down
3 changes: 2 additions & 1 deletion apps/librelingo-web/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fontFamily } from 'tailwindcss/defaultTheme'
import tailwindAnimate from 'tailwindcss-animate'
import type { Config } from 'tailwindcss'

const config = {
Expand Down Expand Up @@ -78,7 +79,7 @@ const config = {
},
},
},
plugins: [require('tailwindcss-animate')],
plugins: [tailwindAnimate],
} satisfies Config

export default config
Loading

0 comments on commit 49c04b3

Please sign in to comment.