Skip to content

Commit

Permalink
Setup prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoporto committed Jan 9, 2025
1 parent 734f3f1 commit 694cef6
Show file tree
Hide file tree
Showing 22 changed files with 1,548 additions and 763 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci --ignore-scripts

# - name: Check Docs
# run: npm run check-docs

# - name: Check Formatting
# run: npm run formatting:check
- name: Check Formatting
run: npm run formatting:check

# - name: Check Typing
# run: pnpm typecheck
Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo 'Running checks in staged files...'
npx --no -- lint-staged
11 changes: 11 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
'*': 'prettier --check --ignore-unknown --write',
// '*.md': 'remark',
// '*.{md,mdx}': 'eslint --ext md,mdx --max-warnings 0',
// '*.{scss,css}': 'stylelint',
// '*.{ts,tsx}': () => 'tsc --project tsconfig.json',
'*.{js,mjs,cjs,jsx,ts,tsx}': [
'eslint --max-warnings 0',
// 'jest --bail --findRelatedTests --passWithNoTests',
],
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@tiagoporto/prettier-config"
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig"]
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
]
}
6 changes: 3 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import globals from "globals";
import tpConfig from "@tiagoporto/eslint-config";
import globals from 'globals'
import tpConfig from '@tiagoporto/eslint-config'

/** @type {import('eslint').Linter.Config[]} */
export default [
{ languageOptions: { globals: globals.browser } },
...tpConfig.configs.base,
];
]
Loading

0 comments on commit 694cef6

Please sign in to comment.