Fix error spam from Rust-Analyzer due to build scripts

This commit is contained in:
Keavon Chambers
2023-02-03 13:00:55 -08:00
parent e784c69cae
commit bfb0d5e7f8
+11 -17
View File
@@ -3,43 +3,37 @@
"[rust]": { "[rust]": {
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.formatOnPaste": true, "editor.formatOnPaste": true,
"editor.defaultFormatter": "rust-lang.rust-analyzer", "editor.defaultFormatter": "rust-lang.rust-analyzer"
}, },
// Web: save on format // Web: save on format
"[typescript][javascript][vue]": { "[typescript][javascript][vue]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true, "source.fixAll.eslint": true
}, },
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
"[scss]": { "[scss]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true, "source.fixAll.eslint": true
}, },
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
// Handlebars: don't save on format // Handlebars: don't save on format
// (`about.hbs` is used by Cargo About to encode license information) // (`about.hbs` is used by Cargo About to encode license information)
"[handlebars]": { "[handlebars]": {
"editor.formatOnSave": false, "editor.formatOnSave": false
}, },
// Rust Analyzer config // Rust Analyzer config
"rust-analyzer.cargo.target": "wasm32-unknown-unknown", "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
"rust-analyzer.checkOnSave.command": "clippy", "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 "rust-analyzer.diagnostics.disabled": ["unresolved-macro-call"], // Remove when https://github.com/rust-lang/rust-analyzer/issues/6835 is fixed
// ESLint config // ESLint config
"eslint.format.enable": true, "eslint.format.enable": true,
"eslint.workingDirectories": [ "eslint.workingDirectories": ["./frontend", "./website/other/bezier-rs-demos", "./website"],
"./frontend", "eslint.validate": ["javascript", "typescript"],
"./website/other/bezier-rs-demos",
"./website",
],
"eslint.validate": [
"javascript",
"typescript",
],
// Vue config // Vue config
"volar.completion.preferredAttrNameCase": "camel", "volar.completion.preferredAttrNameCase": "camel",
"volar.completion.preferredTagNameCase": "pascal", "volar.completion.preferredTagNameCase": "pascal",
@@ -50,5 +44,5 @@
"prettier.singleQuote": false, "prettier.singleQuote": false,
"prettier.useTabs": true, "prettier.useTabs": true,
"prettier.tabWidth": 4, "prettier.tabWidth": 4,
"prettier.printWidth": 200, "prettier.printWidth": 200
} }