Skip to content

Commit

Permalink
fix(wip): prettier behavioir linter
Browse files Browse the repository at this point in the history
Reviewed-by: andriacap
  • Loading branch information
andriacap committed Aug 9, 2024
1 parent 815d54b commit 0f74891
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,30 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
working-directory: ./frontend

- name: Display Prettier version
run: npx prettier --version
working-directory: ./frontend

- name: List files
run: ls -R
working-directory: ./frontend

- name: Display contents
run: cat .prettierrc .prettierignore
working-directory: ./frontend

- name: Frontend code formatting check (Prettier)
run: npm install prettier && npm run format:check
run: npm run format:check
working-directory: ./frontend
1 change: 1 addition & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --config .prettierrc --ignore-path .prettierignore --write '**/*.ts' ",
"format:check": "prettier --config .prettierrc --ignore-path .prettierignore '**/*.ts' "
"format:check": "prettier --config .prettierrc --ignore-path .prettierignore --check '**/*.ts'"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit 0f74891

Please sign in to comment.