Summary: Had some horrible dev experience caused by VSCode and Jest not agreeing what snapshots should look like, every time saving a test in VSCode, it would break the jest snapshots. After investigating eslint and prettier, turned out VSCode itself was the culprit. Caused by a global user setting, but this makes sure nobody else runs into it :) Also made sure Jest uses the correct prettier settings (it didn't before). Reviewed By: passy Differential Revision: D22114656 fbshipit-source-id: aef6c278a668bce049c96aba95c7a5101ca840ad
37 lines
1.1 KiB
JSON
37 lines
1.1 KiB
JSON
{
|
|
"eslint.enable": true,
|
|
"eslint.format.enable": true,
|
|
"eslint.lintTask.enable": true,
|
|
"eslint.packageManager": "yarn",
|
|
"eslint.codeActionsOnSave.mode": "all",
|
|
"editor.formatOnSave": true,
|
|
"files.trimTrailingWhitespace": false, // This one is broken as it cleans string literals as well, killing Jest snapshots: https://github.com/Microsoft/vscode/issues/52711
|
|
"prettier.formatAlreadyFormattedFilesOnSave": false,
|
|
"files.eol": "\n",
|
|
"editor.codeActionsOnSave": {
|
|
"source.fixAll": true
|
|
},
|
|
"eslint.workingDirectories": [
|
|
{
|
|
"mode": "auto"
|
|
}
|
|
],
|
|
"[typescriptreact]": {
|
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
},
|
|
"[typescript]": {
|
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
},
|
|
"[javascript]": {
|
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
},
|
|
"[javascriptreact]": {
|
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
},
|
|
"jest.autoEnable": false,
|
|
"jest.enableInlineErrorMessages": true,
|
|
"jest.runAllTestsFirst": false,
|
|
"jest.pathToConfig": "desktop/jest.config.js",
|
|
"jest.pathToJest": "desktop/node_modules/.bin/jest"
|
|
}
|