Skip to content

Commit

Permalink
chore: update eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
hunghg255 committed Aug 15, 2024
1 parent 4aec3a8 commit eb66daa
Show file tree
Hide file tree
Showing 145 changed files with 5,218 additions and 3,926 deletions.
18 changes: 0 additions & 18 deletions .editorconfig

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- master

pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install
run: pnpm install

- name: Lint
run: pnpm lint

- name: Typecheck
run: pnpm type-check

- name: Build lib
run: pnpm build:lib
14 changes: 0 additions & 14 deletions .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import antfu from '@antfu/eslint-config'

export default antfu({
jsonc: false,
yaml: false,
react: true,
toml: false,
rules: {
'node/prefer-global/process': 'off',
'ts/ban-ts-comment': 'warn',
},
})
28 changes: 13 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,21 @@
"node": ">=18.0.0"
},
"scripts": {
"build": "tsc && vite build",
"preview": "pnpm --dir ./playground run preview",
"lint": "eslint --ext .ts,.tsx src --color",
"format": "prettier --write \"./src/**/*.{ts,tsx,json}\"",
"analyze": "npm run lint && tsc && vite build --mode=analyze && source-map-explorer 'dist/assets/*.js'",
"verify-commit": "verify-commit-msg",
"prepare": "git-scm-hooks",
"release": "bumpp -r",
"dev": "vite",
"playground": "pnpm --dir ./playground run dev",
"build:lib": "vite build",
"build:lib:dev": "vite build --watch",
"build:playground": "pnpm build:lib && pnpm --dir ./playground run build",
"docs:dev": "pnpm --parallel --filter docs... dev",
"docs:build": "pnpm --filter docs... build",
"docs:preview": "pnpm -C docs preview",
"prepublishOnly": "pnpm build:lib"
"prepublishOnly": "pnpm build:lib",
"playground": "pnpm --dir ./playground run dev",
"preview": "pnpm --dir ./playground run preview",
"lint": "eslint src --quiet",
"lint:fix": "eslint src --fix",
"type-check": "tsc",
"verify-commit": "verify-commit-msg",
"prepare": "git-scm-hooks",
"release": "bumpp -r"
},
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.1.1",
Expand Down Expand Up @@ -117,7 +115,8 @@
"valtio": "^1.13.2"
},
"devDependencies": {
"@hunghg255/eslint-config-react": "^0.0.18",
"@antfu/eslint-config": "^2.25.1",
"@eslint-react/eslint-plugin": "^1.10.1",
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
Expand All @@ -126,13 +125,12 @@
"autoprefixer": "^10.4.20",
"bumpp": "^9.5.1",
"eslint": "^8.57.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"git-scm-hooks": "^0.0.11",
"prettier": "^2.8.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.77.8",
"source-map-explorer": "^2.5.3",
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.4.10",
"tailwindcss-animate": "^1.0.7",
Expand Down
18 changes: 0 additions & 18 deletions playground/.editorconfig

This file was deleted.

16 changes: 0 additions & 16 deletions playground/.eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions playground/.eslintrc.json

This file was deleted.

14 changes: 0 additions & 14 deletions playground/.prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions playground/.prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions playground/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import antfu from '@antfu/eslint-config'

export default antfu({
jsonc: false,
yaml: false,
react: true,
toml: false,
rules: {
'node/prefer-global/process': 'off',
'ts/ban-ts-comment': 'warn',
},
})
Loading

0 comments on commit eb66daa

Please sign in to comment.