Skip to content

Commit

Permalink
chore: Add prettier configs (#939)
Browse files Browse the repository at this point in the history
* chore: Add prettier configs for client/api. Adjust eslint rules for line max-len

* feat: add prettier and eslint config to root

* chore: run format script

* fix: trailing commas

* fix: no mixed operators

* feat: add ci and pre-commit

* feat: add stylelint to lint staged

* fix: scss files

* fix: stylelint conflicts

* fix: add missing ts config

* chore: format

* chore: undo format

* chore: format files

* fix: add missing installs

* fix: ternaries

* fix: add missing stylelint config

* fix: reformat tsconfig.json

* feat: set prettier in each folder

* fix: add missing lint

* fix: add missing lint in client

* chore: commit tsconfig

* fix: ci lint check

* feat: add prettier eslint plugin

* chore: add missing ignore file

* chore: revert formatting on files

* chore: revert formatting on eslintignore

* chore: Remove eslint/max-len from api + Remove prettier plugins for eslint config (no prettier diagnostics)

* chore: run lintstaged only on src

* chore: Remove unused eslint-plugin-prettier from api/client

* chore: run format

* fix: sync configuration from stylelint

* ci: simplify lint-check workflow

---------

Co-authored-by: JCNoguera <[email protected]>
  • Loading branch information
msarcev and VmMad authored Jan 15, 2024
1 parent 770813a commit a3ed15c
Show file tree
Hide file tree
Showing 595 changed files with 18,316 additions and 17,792 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pr-lint-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Format & Lint Check

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
lint-check:
strategy:
fail-fast: false
matrix:
project: [api, client]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.project }}
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Install Dependencies
run: npm install

- name: Format Check
run: npm run format:check

- name: Lint Check
run: npm run lint:check

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ config.local.feed.json
config.staging.json
config.prod.json
env.js

**/.eslintcache
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --allow-empty
3 changes: 3 additions & 0 deletions api/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.eslintrc.js
*.d.ts

dist/**
node_modules/**
Loading

0 comments on commit a3ed15c

Please sign in to comment.