Skip to content

Commit

Permalink
Fix 'no-implicit-dependencies' errors
Browse files Browse the repository at this point in the history
Fixes #5792

- fixed existing `no-implicit-dependencies' tslint error
- updated the `no-implicit-dependencies` warning into an error
- added common `core` dependencies to the exsiting whitelist
- updated rule to only check for `dev` dependencies

Signed-off-by: Vincent Fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Jul 29, 2019
1 parent f5161db commit f9ff237
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 41 deletions.
43 changes: 43 additions & 0 deletions configs/errors.tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,49 @@
"no-any": true,
"no-consecutive-blank-lines": true,
"no-construct": true,
"no-implicit-dependencies": {
"options": [
true,
[
"@phosphor/algorithm",
"@phosphor/commands",
"@phosphor/coreutils",
"@phosphor/domutils",
"@phosphor/dragdrop",
"@phosphor/messaging",
"@phosphor/properties",
"@phosphor/signaling",
"@phosphor/virtualdom",
"@phosphor/widgets",
"chai",
"chai-string",
"electron",
"express",
"fs-extra",
"inversify",
"jsdom",
"lodash.debounce",
"lodash.throttle",
"monaco-languageclient",
"native-keymap",
"nsfw",
"react",
"react-dom",
"react-virtualized",
"sinon",
"temp",
"typescript",
"uuid",
"vscode-jsonrpc",
"vscode-languageserver",
"vscode-languageserver-protocol",
"vscode-languageserver-types",
"vscode-uri",
"vscode-ws-jsonrpc",
"yargs"
]
]
},
"no-magic-numbers": false,
"no-null-keyword": true,
"no-shadowed-variable": true,
Expand Down
34 changes: 0 additions & 34 deletions configs/warnings.tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,6 @@
"PromiseLike"
]
},
"no-implicit-dependencies": {
"severity": "warning",
"options": [
true,
[
"@phosphor/algorithm",
"@phosphor/commands",
"@phosphor/coreutils",
"@phosphor/domutils",
"@phosphor/dragdrop",
"@phosphor/messaging",
"@phosphor/properties",
"@phosphor/signaling",
"@phosphor/virtualdom",
"@phosphor/widgets",
"chai",
"chai-string",
"inversify",
"jsdom",
"monaco-languageclient",
"react",
"react-dom",
"react-virtualized",
"sinon",
"temp",
"typescript",
"vscode-languageserver-protocol",
"vscode-languageserver-types",
"vscode-ws-jsonrpc",
"vscode-uri",
"yargs"
]
]
},
"no-return-await": {
"severity": "warning"
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"nsfw": "^1.2.2",
"perfect-scrollbar": "^1.3.0",
"react": "^16.4.1",
"react-autosize-textarea": "^7.0.0",
"react-dom": "^16.4.1",
"react-virtualized": "^9.20.0",
"reconnecting-websocket": "^3.0.7",
Expand Down
1 change: 1 addition & 0 deletions packages/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.9.0",
"description": "Theia - Debug Extension",
"dependencies": {
"@theia/application-package": "^0.9.0",
"@theia/console": "^0.9.0",
"@theia/core": "^0.9.0",
"@theia/editor": "^0.9.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/extension-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"@theia/core": "^0.9.0",
"@theia/filesystem": "^0.9.0",
"@types/fs-extra": "^4.0.2",
"@types/request": "^2.0.3",
"@types/sanitize-html": "^1.13.31",
"@types/showdown": "^1.7.1",
"fs-extra": "^4.0.2",
"request": "^2.82.0",
"sanitize-html": "^1.14.1",
"showdown": "^1.7.4"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/git/src/node/dugite-git.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// tslint:disable-next-line:no-implicit-dependencies
import * as upath from 'upath';

import * as path from 'path';
import * as upath from 'upath';
import * as temp from 'temp';
import * as fs from 'fs-extra';
import { expect } from 'chai';
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"@theia/plugin-ext": "^0.9.0",
"@theia/preferences": "^0.9.0",
"@theia/workspace": "^0.9.0",
"ps-tree": "1.1.0"
"@types/request": "^2.0.3",
"ps-tree": "1.1.0",
"request": "^2.82.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-ext-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"@theia/editor": "^0.9.0",
"@theia/plugin": "^0.9.0",
"@theia/plugin-ext": "^0.9.0",
"@theia/workspace": "^0.9.0"
"@theia/workspace": "^0.9.0",
"@types/request": "^2.0.3",
"request": "^2.82.0"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-ext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
"@theia/task": "^0.9.0",
"@theia/terminal": "^0.9.0",
"@theia/workspace": "^0.9.0",
"@types/request": "^2.0.3",
"decompress": "^4.2.0",
"getmac": "^1.4.6",
"jsonc-parser": "^2.0.2",
"lodash.clonedeep": "^4.5.0",
"request": "^2.82.0",
"uuid": "^3.2.1",
"vscode-debugprotocol": "^1.32.0"
"vscode-debugprotocol": "^1.32.0",
"vscode-textmate": "^4.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { MockMenuModelRegistry } from '@theia/core/lib/common/test/mock-menu';
import { EDITOR_CONTEXT_MENU } from '@theia/editor/lib/browser';
import { NAVIGATOR_CONTEXT_MENU } from '@theia/navigator/lib/browser/navigator-contribution';
import { MenusContributionPointHandler } from './menus-contribution-handler';
import 'mocha';
import * as sinon from 'sinon';
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
import { QuickCommandService } from '@theia/core/lib/browser';
Expand Down
1 change: 1 addition & 0 deletions packages/scm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@types/p-debounce": "^1.0.1",
"diff": "^3.4.0",
"p-debounce": "^2.1.0",
"react-autosize-textarea": "^7.0.0",
"ts-md5": "^1.2.2"
},
"publishConfig": {
Expand Down
3 changes: 2 additions & 1 deletion packages/textmate-grammars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.9.0",
"description": "Theia - Textmate Grammars",
"dependencies": {
"@theia/monaco": "^0.9.0"
"@theia/monaco": "^0.9.0",
"vscode-textmate": "^4.0.1"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit f9ff237

Please sign in to comment.