Skip to content
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 eslint GitHub workflow #3

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"react",
"prettier"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ESLint static analysis

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
eslint:
name: Run ESLint static analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: yarn
- name: Run ESLint
run: yarn run eslint .
--config .eslintrc.json
--ext .js,.jsx,.ts,.tsx
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Publish package to npmjs

on:
workflow_dispatch:
release:
types: [created]

Expand Down
16 changes: 9 additions & 7 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@storybook/react-webpack5": "^7.3.2",
"@storybook/testing-library": "^0.2.0",
"@szhsin/react-menu": "^4.0.3",
"@typescript-eslint/parser": "^6.10.0",
"classnames": "^2.3.2",
"react-movable": "^3.0.4",
"storybook": "^7.3.2"
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,7 @@ __metadata:
"@types/react-dom": "npm:^18.2.7"
"@types/rollup-plugin-peer-deps-external": "npm:^2"
"@typescript-eslint/eslint-plugin": "npm:^6.4.0"
"@typescript-eslint/parser": "npm:^6.10.0"
classnames: "npm:^2.3.2"
eslint: "npm:^8.0.1"
eslint-config-prettier: "npm:^9.0.0"
Expand Down Expand Up @@ -4532,7 +4533,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^6.4.0":
"@typescript-eslint/parser@npm:^6.10.0, @typescript-eslint/parser@npm:^6.4.0":
version: 6.10.0
resolution: "@typescript-eslint/parser@npm:6.10.0"
dependencies:
Expand Down