Graphite/.vscode/settings.json
2023-08-16 12:58:42 -07:00

47 lines
1.7 KiB
JSON

{
// Rust: save on format
"[rust]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
// Web: save on format
"[typescript][javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[scss]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
// Configured in `.prettierrc`
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml][github-actions-workflow]": {
"editor.formatOnSave": true,
// Configured in `.prettierrc`
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Handlebars: don't save on format
// (`about.hbs` is used by Cargo About to encode license information)
"[handlebars]": {
"editor.formatOnSave": false
},
// Rust Analyzer config
"rust-analyzer.cargo.target": "wasm32-unknown-unknown",
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.buildScripts.overrideCommand": ["cargo", "check", "--quiet", "--message-format=json", "--all-targets", "-p", "graphite-wasm"], // Build scripts for Tauri aren't compatible with wasm32-unknown-unknown, so this restricts it to just our code entry point
"rust-analyzer.diagnostics.disabled": ["unresolved-macro-call"], // Remove when https://github.com/rust-lang/rust-analyzer/issues/6835 is fixed
// ESLint config
"eslint.format.enable": true,
"eslint.workingDirectories": ["./frontend", "./website/other/bezier-rs-demos", "./website"],
"eslint.validate": ["javascript", "typescript"],
// VS Code config
"html.format.wrapLineLength": 200,
"files.eol": "\n",
"files.insertFinalNewline": true
}