Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve eslint config
Browse files Browse the repository at this point in the history
kantord committed Jul 28, 2024
1 parent 0524e53 commit 518864c
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',
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
@@ -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)
}
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 = {
@@ -78,7 +79,7 @@ const config = {
},
},
},
plugins: [require('tailwindcss-animate')],
plugins: [tailwindAnimate],
} satisfies Config

export default config
627 changes: 623 additions & 4 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -31,8 +31,9 @@
"devDependencies": {
"@playwright/test": "^1.44.1",
"@types/node": "^20.12.12",
"eslint": "^8",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.3",
"eslint-plugin-unicorn": "^55.0.0",
"prettier": "3.3.3"
}
}

0 comments on commit 518864c

Please sign in to comment.