Skip to content

Commit

Permalink
🛠️ [Scripts] Add dedicated prettier command (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi authored Jul 2, 2023
1 parent cb5c363 commit a055f93
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 25 deletions.
29 changes: 16 additions & 13 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
👽️ dependency:
- any: ['package.json', 'package-lock.json', 'yarn.lock', '.pnp.*']
📝 documentation: ['README.md', 'docs/**/*']
🔖 release: 'CHANGELOG.md'
🧪 testing: '**/*.test.ts'
🔧 tooling:
🧰 Dependency:
- any: ['package-lock.json', 'yarn.lock']
📚 Documentation:
- any: ['README.md', 'docs/**']
🔖 Release: 'CHANGELOG.md'
⚖️ Legal: 'LICENSE'
🧪 Testing: '**/*.test.ts'
🔧 Tooling:
- any:
[
'*',
'.github/**/*',
'.vscode/**/*',
'.github/**',
'.vscode/**',
'.yarn*',
'.yarn/**/*',
'config/**/*',
'scripts/**/*',
'!package*',
'.yarn/**',
'config/**',
'scripts/**',
'!LICENSE',
'!package.lock',
'!yarn.lock',
'!*.@(md|mdx)',
'!*.md',
]
1 change: 1 addition & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ jobs:
- name: Apply PR labels
uses: actions/labeler@v4
with:
dot: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ jobs:

- name: Lint
run: npm run lint

- name: Prettier
run: npm run format
11 changes: 5 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"recommendations": [
"codezombiech.gitignore",
"github.vscode-github-actions",
"EditorConfig.editorconfig",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense",
"codezombiech.gitignore",
"Gruntfuggly.todo-tree",
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"EditorConfig.editorconfig",
"esbenp.prettier-vscode",
"Gruntfuggly.todo-tree",
"stylelint.vscode-stylelint",
"mrmlnc.vscode-scss"
"esbenp.prettier-vscode"
]
}
7 changes: 2 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"css.validate": false,
"scss.validate": false,
"javascript.validate.enable": false,
"stylelint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.validate": ["javascript", "typescript"],
"stylelint.enable": true,
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.exclude": {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
"nuke": "npm run clean && rm -rf node_modules && rm -rf package-lock.json && npm cache clean --force",
"build": "npm run clean && tsc && vite build",
"preview": "vite preview",
"lint": "eslint 'src/**/*.{ts,tsx}'",
"lint": "eslint . --ext .ts",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --check src/",
"format:fix": "prettier --write src/",
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest --run --coverage",
Expand Down

0 comments on commit a055f93

Please sign in to comment.