-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ci workflow & update react template #31
Changes from 3 commits
504984a
ab9473b
2f4cf36
b3b8684
deae8a4
d7dfa14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,26 @@ | ||||||
name: Check code health | ||||||
|
||||||
on: [pull_request] | ||||||
|
||||||
jobs: | ||||||
build: | ||||||
runs-on: ubuntu-latest | ||||||
|
||||||
strategy: | ||||||
matrix: | ||||||
node-version: [20.x] | ||||||
|
||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
- name: Use Node.js ${{ matrix.node-version }} | ||||||
uses: actions/setup-node@v3 | ||||||
with: | ||||||
node-version: ${{ matrix.node-version }} | ||||||
- name: Install dependencies | ||||||
run: yarn install --immutable --immutable-cache --check-cache | ||||||
- name: Run lint | ||||||
run: yarn run lint | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- name: Run build | ||||||
run: yarn run build | ||||||
- name: Run test | ||||||
run: yarn run test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,12 @@ | |
"watch": "tsc -w", | ||
"start": "yarn build && node dist/index.js", | ||
"test": "yarn build && jest", | ||
"lint:eslint": "eslint '**/*.{ts,js}'", | ||
"fix:eslint": "yarn lint:eslint --fix" | ||
"lint": "eslint '**/*.{ts,js}'", | ||
"fix:lint": "yarn lint --fix", | ||
"format": "prettier --check '**/*.{ts,js,json,md}'", | ||
"fix:format": "prettier --write .", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I format all files and commit in this PR? |
||
"code-check": "yarn run lint && yarn run build && yarn run test", | ||
"publish": "yarn run code-check && yarn run build && yarn npm publish --access public" | ||
}, | ||
"keywords": [ | ||
"LINE", | ||
|
@@ -57,4 +61,4 @@ | |
"access": "public", | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "./App"; | ||
import { StrictMode } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
ReactDOM.render( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ReactDOM.render is deprecated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your suggestion. We would like to avoid making multiple changes to a single pull request. |
||
<React.StrictMode> | ||
createRoot(document.getElementById('root')!).render( | ||
<StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById("root") | ||
</StrictMode> | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "./App"; | ||
import { StrictMode } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
createRoot(document.getElementById('root')).render( | ||
<StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById("root") | ||
</StrictMode> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: workflow in line/liff-inspector
This workflow is not currently running in this repository.
However, it is running in my forked repository, and there are no errors.
https://github.com/shogo0421/create-liff-app/actions/runs/11549522724
github docs (about-workflow-runs-from-public-forks)