Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota-murakami committed Aug 22, 2023
1 parent ad34ad9 commit 5853693
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ instrumented/
.github/
.nyc_output/
coverage/
cypress
cypress.config.ts
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:jsx-a11y/recommended","ts-prefixer"],
"extends": ["plugin:jsx-a11y/recommended", "ts-prefixer"],
"plugins": ["cypress", "jsx-a11y", "react-hooks"],
"env": {
"cypress/globals": true
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: "npm"
- package-ecosystem: 'npm'
# Files stored in `app` directory
directory: "/"
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
## Project Status from the Author (@ryota-murakami, Aug 16 2023):

I'm considering continue update as a Client Side SPA or Rewrite this app with Server Components.
But Server Components doen't meant obsolete Client Side SPA, both archtecture is great option depends on application type,
dev team type, each dev's skillset type.
But Server Components doen't meant obsolete Client Side SPA, both archtecture is great option depends on application type,
dev team type, each dev's skillset type.

Might be keep update both archtecture TODO is ideal vision for me unless there are planty rest time.
Anyway, I thnik was [TODO MVC](https://todomvc.com/) outdated for current JS frameworks.
I want to renew this project about this winter.

***
---

# React TypeScript TodoMVC 2022

Expand Down Expand Up @@ -83,6 +84,7 @@ after that auto launch todo app on your default browser and code edit ready.
You can do exact same command with npm, or [install yarn](https://classic.yarnpkg.com/en/docs/install#mac-stable) easily if you have interest.

### `yarn` or `yarn install`

Install all Node Package Modules that depending this project.

### `yarn start`
Expand All @@ -93,7 +95,7 @@ and then you'll got todo app as same as Demo. let's modify under the `src/` code

### `yarn build`

Production build that bundled optimization stuff in `build` directory.
Production build that bundled optimization stuff in `build` directory.

### `yarn serve`

Expand All @@ -108,7 +110,7 @@ Here is [final config list](https://github.com/laststance/eslint-config-typescri
### `yarn lint:fix`

Run wtih eslint --fix option.
Actually frequently use for perform [Prettier](https://prettier.io/) formatting.
Actually frequently use for perform [Prettier](https://prettier.io/) formatting.

### `yarn typecheck`

Expand Down
1 change: 0 additions & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

// eslint-disable-next-line @typescript-eslint/no-unused-vars
module.exports = (on, config) => {
// IMPORTANT to return the config object
// with the any changed environment variables
Expand Down
42 changes: 21 additions & 21 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@
// for adding cy.percySnapshot() command. https://docs.percy.io/docs/cypress
import '@percy/cypress'

const COMMAND_DELAY = 0

for (const command of [
'visit',
'click',
'trigger',
'type',
'clear',
'reload',
'contains',
]) {
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
const origVal = originalFn(...args)

return new Promise((resolve) => {
setTimeout(() => {
resolve(origVal)
}, COMMAND_DELAY)
})
})
}
// const COMMAND_DELAY = 0
//
// for (const command of [
// 'visit',
// 'click',
// 'trigger',
// 'type',
// 'clear',
// 'reload',
// 'contains',
// ]) {
// Cypress.Commands.overwrite(command, async (originalFn, ...args) => {
// const origVal = originalFn(...args)
//
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve(origVal)
// }, COMMAND_DELAY)
// })
// })
// }

Cypress.Commands.add('submitTripleTodos', () => {
cy.visit('http://localhost:3000/')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"typecheck": "tsc --noEmit",
"clean": "rimraf yarn.lock package-lock.json node_modules build",
"cypress:run": "cypress run",
"cypress:headed": "cypress run ---headed",
"cypress:headed": "cypress run --headed",
"cypress:run:chrome": "cypress run --browser chrome",
"cypress:run:chrome:headless": "cypress run --browser chrome --headless",
"cypress:open": "cypress open",
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
"noFallthroughCasesInSwitch": true,
"jsx": "react-jsx"
},
"include": ["src", "cypress", "vite.config.ts"]
"include": [
"src",
"cypress",
"vite.config.ts",
"jest.config.js",
"jest/fileTransformer.js"
]
}

0 comments on commit 5853693

Please sign in to comment.