aboutsummaryrefslogtreecommitdiff
path: root/.vscode/settings.json
blob: f329032587182ebd1578aa896383a5edc12c16e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
	"[rust]": {
		"editor.defaultFormatter": "rust-lang.rust-analyzer"
	},
	"rust-analyzer.procMacro.enable": true,
	"rust-analyzer.diagnostics.experimental.enable": false,
	"tailwindCSS.experimental.classRegex": [
		["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], // cva(....)`...`
		"tw\\.[^`]+`([^`]*)`", // tw.xxx`...`
		"tw\\(.*?\\).*?`([^`]*)" // tw(....)`...`
	],
	"search.exclude": {
		"**/node_modules": true,
		"**/bower_components": true,
		"**/*.code-search": true,
		"**/pnpm-lock.yaml": true,
		"**/.gitignore": true,
		"/packages/ctjs/types/*": true,
		"**/dist": true
	},
	// enable the eslint flat config support
	"eslint.experimental.useFlatConfig": true,

	// disable the default formatter, use eslint
	"prettier.enable": false,
	"editor.formatOnSave": false,

	// automatically fix
	"editor.codeActionsOnSave": {
		"source.fixAll.eslint": "explicit",
		"source.organizeImports": "never"
	},

	// silent stylistic rules in the ide, but still fix them
	/*
	"eslint.rules.customizations": [
		{ "rule": "@stylistic/*", "severity": "warn" },
		{ "rule": "style*", "severity": "warn" },
		{ "rule": "*-indent", "severity": "warn" },
		{ "rule": "*-spacing", "severity": "warn" },
		{ "rule": "*-spaces", "severity": "warn" },
		{ "rule": "*-order", "severity": "warn" },
		{ "rule": "*-dangle", "severity": "warn" },
		{ "rule": "*-newline", "severity": "warn" },
		{ "rule": "*quotes", "severity": "warn" },
		{ "rule": "*semi", "severity": "warn" }
	],
	*/

	// enable eslint for all supported languages
	"eslint.validate": [
		"javascript",
		"javascriptreact",
		"typescript",
		"typescriptreact",
		"vue",
		"html",
		"markdown",
		"json",
		"jsonc",
		"yaml",
		"astro",
		"toml"
	],
	"css.customData": [
		".vscode/tailwind.json"
	],
	"eslint.lintTask.enable": true,
	"eslint.workingDirectories": [],
	"explorer.fileNesting.enabled": true,
	"explorer.fileNesting.patterns": {
		"*.ts": "${capture}.js",
		"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
		"*.jsx": "${capture}.js",
		"*.tsx": "${capture}.ts",
		".npmrc": ".nvmrc, .yarnrc.yml",
		".gitignore": ".eslintignore, .prettierignore",
		"README.md": "CONTRIBUTING.md, CODE_OF_CONDUCT.md, LICENSE",
		"Cargo.toml": "Cargo.lock",
		".eslintrc.js": ".eslintcache",
		".prettierrc.*": ".rustfmt.toml, .gitattributes, .editorconfig, .clippy.toml",
		"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, pnpm-workspace.yaml, .pnp.cjs, .pnp.loader.mjs",
		"tsconfig.json": "tsconfig.*.json",
		"flake.nix": "shell.nix, flake.lock, Cargo.nix"
	}
}