Skip to content

Commit

Permalink
Merge pull request #77 from naturalsolutions/fix/prettier-behavior
Browse files Browse the repository at this point in the history
fix(lint): prettier behavior
  • Loading branch information
edelclaux authored Aug 16, 2024
2 parents 815d54b + 9523025 commit 0bc9052
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,26 @@ 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 ci
working-directory: ./frontend

- name: Display Prettier version
run: npx prettier --version
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
working-directory: ./frontend
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
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "index.js",
"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": "prettier --config .prettierrc --ignore-path .prettierignore --write '**/*.{ts,html,scss}' ",
"format:check": "prettier --config .prettierrc --ignore-path .prettierignore --check '**/*.{ts,html,scss}' "
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit 0bc9052

Please sign in to comment.