rrweb
rrweb copied to clipboard
Help new contributors get up and running quickly with some default VSCode settings
When helping @eoghanmurray get VSCode set up to work with rrweb I noticed there are quite a few steps that we could streamline to help people "do the right thing" (run tests, use linting, prettier etc.)
The consensus seems to be including the following in the version control .vscode/settings.json .vscode/tasks.json .vscode/launch.json .vscode/extensions.json
If people are willing to share their versions of these files that they are using on rrweb, on this issue. We can compile some nice defaults that will help get everyone up and running.
My .vscode/settings.json for rrweb mainly contain mocha defaults to get Mocha Test Explorer working with our setup.
I think it makes more sense to include a .mocharc.yaml or .mocharc.js.
{
"mochaExplorer.require": [
"ts-node/register",
"ignore-styles",
"jsdom-global/register"
],
"mochaExplorer.env": {
"TS_NODE_CACHE": "false",
"TS_NODE_FILES": "true"
},
"mochaExplorer.files": "test/**/*.test.ts",
// next line is specific to my setup and should get moved to my global settings.json:
"mochaExplorer.nodePath": "/Users/justin/.nvm/versions/node/v12.16.1/bin/node"
}
extensions that I use for the rrweb project (extensions.json)
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"hbenl.vscode-mocha-test-adapter",
"hbenl.vscode-test-explorer",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}