Add support for formatting vuejs with trunk

This commit is contained in:
Georges-Antoine Assi
2024-08-27 10:12:26 -04:00
parent ee93debdfa
commit ec5c7ac39a
3 changed files with 40 additions and 4 deletions

7
.gitignore vendored
View File

@@ -18,12 +18,13 @@ coverage
/cypress/screenshots/
# Editor directories and files
.vscode
.zed
pyrightconfig.json
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
!.vscode/tasks.json
.zed/*
!.zed/settings.json
pyrightconfig.json
.idea
*.suo
*.ntvs*

View File

@@ -44,12 +44,31 @@ lint:
- frontend/src/__generated__/**
- docker/Dockerfile
- docker/nginx/js/**
files:
- name: vue
extensions: [vue]
definitions:
- name: eslint
files: [typescript, javascript]
files:
- javascript
- typescript
commands:
- name: lint
run_from: ${root_or_parent_with_any_config}
- name: prettier
files:
- typescript
- yaml
- css
- postcss
- sass
- html
- markdown
- json
- javascript
- graphql
- vue
- prettier_supported_configs
actions:
disabled:
- trunk-check-pre-push

16
.zed/settings.json Normal file
View File

@@ -0,0 +1,16 @@
{
"languages": {
"Python": {
"tab_size": 4
},
"Vue.js": {
"tab_size": 2,
"formatter": {
"external": {
"command": "prettier",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
}
}
}