Multi root workspace tweaks (#2858)

* Ignore jest for workspaces without tests (for now)

* Add jest as recommended extension

* Set eslint and prettier file paths

We can't do this on a multi-folder workspace level because the
path depths are not identical between folders

* fix tsconfig extends for

* Simplify bitwarden-licensed web tsconfig

This tsconfig isn't needed to build, since we do that through webpack
and the web client. It's only needed as hints to IDEs

* Remove unintended change

* linter
This commit is contained in:
Matt Gibson 2022-06-13 21:39:36 -05:00 committed by GitHub
parent b92685dcd9
commit c4ff8f99dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 81 additions and 57 deletions

6
apps/browser/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../../.prettierignore"
}

View File

@ -6,5 +6,9 @@
"webpack://?:*/*": "${workspaceFolder}/*", "webpack://?:*/*": "${workspaceFolder}/*",
"webpack://@bitwarden/cli/*": "${workspaceFolder}/*" "webpack://@bitwarden/cli/*": "${workspaceFolder}/*"
} }
} },
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../../.prettierignore"
} }

6
apps/desktop/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../../.prettierignore"
}

6
apps/web/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../../.prettierignore"
}

View File

@ -0,0 +1,6 @@
{
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../../.prettierignore"
}

View File

@ -1,27 +1,3 @@
{ {
"extends": "../../apps/web/jslib/shared/tsconfig", "extends": "../../apps/web/tsconfig"
"compilerOptions": {
"baseUrl": ".",
"paths": {
"tldjs": ["../../apps/web/jslib/common/src/misc/tldjs.noop"],
"jslib-common/*": ["../../apps/web/jslib/common/src/*"],
"jslib-angular/*": ["../../apps/web/jslib/angular/src/*"],
"@bitwarden/components": ["../../apps/web/jslib/components/src"],
"src/*": ["../../apps/web/src/*"]
}
},
"angularCompilerOptions": {
"preserveWhitespaces": true
},
"files": [
"../../apps/web/src/app/polyfills.ts",
"../../apps/web/src/app/main.ts",
"src/app/main.ts"
],
"include": [
"../../apps/web/src/connectors/*.ts",
"../../apps/web/src/models/*.ts",
"../../apps/web/src/services/*.ts",
"../../apps/web/src/abstractions/*.ts"
]
} }

View File

@ -1,34 +1,34 @@
{ {
"folders": [ "folders": [
{ {
"name": "root", "name": "root",
"path": "." "path": "."
}, },
{ {
"name": "web vault", "name": "web vault",
"path": "apps/web" "path": "apps/web"
}, },
{ {
"name": "web vault (bit)", "name": "web vault (bit)",
"path": "bitwarden_license/bit-web" "path": "bitwarden_license/bit-web"
}, },
{ {
"name": "cli", "name": "cli",
"path": "apps/cli" "path": "apps/cli"
}, },
{ {
"name": "desktop", "name": "desktop",
"path": "apps/desktop" "path": "apps/desktop"
}, },
{ {
"name": "browser", "name": "browser",
"path": "apps/browser" "path": "apps/browser"
}, },
{ {
"name": "libs", "name": "libs",
"path": "libs" "path": "libs"
} }
], ],
"settings": { "settings": {
"debug.javascript.terminalOptions": { "debug.javascript.terminalOptions": {
"sourceMapPathOverrides": { "sourceMapPathOverrides": {
@ -37,6 +37,20 @@
"webpack://?:*/*": "${workspaceFolder}/*", "webpack://?:*/*": "${workspaceFolder}/*",
"webpack://@bitwarden/cli/*": "${workspaceFolder}/apps/cli/*" "webpack://@bitwarden/cli/*": "${workspaceFolder}/apps/cli/*"
} }
} },
"jest.disabledWorkspaceFolders": [
"root",
"web vault",
"web vault (bit)",
"desktop"
],
"jest.jestCommandLine": "npx jest"
},
"extensions": {
"recommendations": [
"orta.vscode-jest",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
} }
} }

6
libs/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"eslint.options": {
"ignorePath": "${workspaceFolder}/../../.eslintIgnore"
},
"prettier.ignorePath": "${workspaceFolder}/../../.prettierignore"
}