Skip to content

Commit

Permalink
refactor eslint and add linting on pr
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestTeluk committed Oct 29, 2024
1 parent ef9a2a8 commit 3107427
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"prettier"
],
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install Dependencies
run: npm ci --no-audit
- name: Lint
run: npm run lint
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.12.2
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
],
"scripts": {
"build": "unbuild",
"dev": "unbuild && npm link && uniforms-cli"
"dev": "unbuild && npm link && uniforms-cli",
"lint:code": "eslint --cache --cache-location node_modules/.cache/eslint --cache-strategy content --ext ts,tsx .",
"lint:types": "tsc --noEmit",
"lint": "npm run lint:code && npm run lint:types && npm run build"
},
"bin": {
"uniforms-cli": "index.js"
Expand All @@ -26,7 +29,6 @@
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-react": "7.37.1",
"kolorist": "1.7.0",
"prettier": "3.3.3",
"prompts": "^2.4.2",
Expand Down

0 comments on commit 3107427

Please sign in to comment.