Skip to content

Commit

Permalink
remove manual formatting and use pre-commit prettier instead
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaerc committed Jan 26, 2024
1 parent 6b52cdc commit 72b287d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ jobs:

- name: Lint
run: yarn lint

- name: Code formatting
run: yarn fmt:check
14 changes: 13 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
skip:
- eslint
repos:
- repo: [email protected]:Yelp/detect-secrets
rev: v1.3.0
hooks:
- id: detect-secrets
- id: detect-secrets
args:
- --baseline
- .secrets.baseline
- --exclude-files
- README.md
exclude: .*_test.*|yarn\.lock
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or:
[javascript, jsx, ts, tsx, json, scss, sass, css, yaml, markdown]
args:
- --no-config
- --no-semi
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
"author": "Carey Gumaer <[email protected]>",
"license": "MIT",
"scripts": {
"lint": "eslint './**/*.{js,jsx,ts,tsx}'",
"fmt": "yarn fmt:check --write",
"fmt:check": "LOG_LEVEL= prettier-eslint --list-different './**/*.{js,jsx,ts,tsx,scss}'"
"lint": "eslint './**/*.{js,jsx,ts,tsx}'"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.19.1",
"eslint": "^8.56.0",
"eslint-config-google": "^0.14.0",
"eslint-config-mitodl": "^1.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier-eslint": "^16.3.0",
"prettier-eslint-cli": "^8.0.1"
"eslint-plugin-react-hooks": "^4.6.0"
}
}

0 comments on commit 72b287d

Please sign in to comment.