Skip to content

Commit

Permalink
Merge pull request #66 from stelmakhivan/feature/setup-ci-cd-for-linting
Browse files Browse the repository at this point in the history
Set up CI/CD for eslint and prettier
  • Loading branch information
vasylnahuliak authored Oct 28, 2023
2 parents eda230d + dc739b6 commit f96824f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint with Prettier and ESLint

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies
run: npm install

- name: Lint with Prettier
run: npm run prettier:check

- name: Lint with ESLint
run: npm run lint
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
android
ios
example
.all-contributorsrc
*.md
*.yml
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
],
"scripts": {
"lint": "eslint .",
"format": "prettier --log-level=warn --write \"**/*.{jsx,js,ts,tsx}\""
"prettier:check": "prettier . -c --log-level=warn",
"prettier:format": "prettier --log-level=warn --write \"**/*.{jsx,js,ts,tsx}\""
},
"repository": {
"type": "git",
Expand Down

0 comments on commit f96824f

Please sign in to comment.