Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Keito654 committed May 29, 2024
1 parent fe2a7c8 commit 3a64112
Show file tree
Hide file tree
Showing 16 changed files with 2,288 additions and 656 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com/
cache: 'pnpm'
cache: pnpm
- run: pnpm install
- run: pnpm publish --no-git-checks
env:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# react-backstate-preserve

`react-backstate-preserve` is a React library designed to persist component states across browser navigation, such as the back and forward button usage. It prevents state reset when navigating back to a component, ensuring a smoother user experience.
Expand Down
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import antfu from '@antfu/eslint-config';

export default antfu({
typescript: {
tsconfigPath: 'tsconfig.json',
},
react: true,
stylistic: {
semi: true,
},
});
55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,57 @@
{
"name": "@keito654/react-backstate-preserve",
"version": "0.1.0",
"type": "module",
"main": "./dist/index.umd.cjs",
"types": "./dist/types/index.d.ts",
"version": "0.1.0",
"packageManager": "pnpm@8.15.1+sha256.245fe901f8e7fa8782d7f17d32b6a83995e2ae03984cb5b62b8949bfdc27c7b5",
"author": "keito654",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/keito654/react-backstate-preserve"
},
"files": [
"dist"
],
"exports": {
".": {
"require": "./dist/index.umd.cjs",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.umd.cjs"
}
},
"main": "./dist/index.umd.cjs",
"types": "./dist/types/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"@keito654:registry": "https://npm.pkg.github.com"
},
"scripts": {
"prepublishOnly": "pnpm run build",
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint src tests",
"lint:fix": "eslint src tests --fix",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@playwright/test": "^1.41.2",
"@types/node": "^20.11.5",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"react-router-dom": "^6.22.0",
"typescript": "^5.2.2",
"vite": "^5.0.8",
"vite-plugin-dts": "^3.7.1"
},
"packageManager": "pnpm@8.15.1+sha256.245fe901f8e7fa8782d7f17d32b6a83995e2ae03984cb5b62b8949bfdc27c7b5"
"@antfu/eslint-config": "^2.19.1",
"@eslint-react/eslint-plugin": "^1.5.13",
"@playwright/test": "^1.44.1",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"eslint": "9.2.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"react-router-dom": "^6.23.1",
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vite-plugin-dts": "^3.9.1"
}
}
Loading

0 comments on commit 3a64112

Please sign in to comment.