File size: 1,353 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
	// File settings
	"files.eol": "\n",
	"files.exclude": {
		"**/node_modules": true,
		".cache": true
	},
	"files.associations": {
		// VS Code treats ".prettierrc" as JSON, by default
		".prettierrc": "yaml"
	},
	// Editor settings
	"editor.formatOnSave": false,
	"editor.codeActionsOnSave": {
		"source.fixAll": "explicit",
		"source.fixAll.eslint": "explicit",
		"source.fixAll.tslint": "explicit",
		"source.fixAll.stylelint": "explicit"
	},
	// Use prettier for formatting JS/TS
	"[javascript][javascriptreact][typescript][typescriptreact]": {
		// auto format on save will be done by ESLint
		"editor.formatOnSave": false,
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[jsonc][json][yaml][markdown]": {
		"editor.formatOnSave": true,
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	// Use stylint for formatting CSS/SCSS
	"[css][scss][sass]": {
		"editor.formatOnSave": false,
		"editor.defaultFormatter": "stylelint.vscode-stylelint"
	},
	// Settings for extensions
	"eslint.validate": [
		"javascript",
		"javascriptreact",
		"typescript",
		"typescriptreact",
		"json",
		"jsonc"
	],
	"css.validate": false,
	"scss.validate": false,
	"stylelint.validate": [ "css", "scss", "postcss" ],
	// Use the installed version of TypeScript, not the ones bundled with VS Code
	"typescript.tsdk": "node_modules/typescript/lib"
}