Skip to content

Commit

Permalink
⚙️ Add Prettier and ESLint config with pre-commit (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejsdev authored Mar 7, 2024
1 parent 6c41e30 commit 1b8b42c
Show file tree
Hide file tree
Showing 8 changed files with 3,601 additions and 250 deletions.
51 changes: 36 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.2.2
hooks:
- id: ruff
- id: ruff
args:
- --fix
- id: ruff-format
- --fix
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.56.0
hooks:
- id: eslint
files: \.(js|jsx|ts|tsx)$
additional_dependencies:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- "@typescript-eslint/[email protected]"
- "@typescript-eslint/[email protected]"

ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
1 change: 1 addition & 0 deletions new-frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
new-frontend/src/client/**
18 changes: 0 additions & 18 deletions new-frontend/.eslintrc.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions new-frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["standard-with-typescript", "plugin:react/recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {}
}
1 change: 1 addition & 0 deletions new-frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
new-frontend/src/client/**
10 changes: 10 additions & 0 deletions new-frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
Loading

0 comments on commit 1b8b42c

Please sign in to comment.