Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit e3394cd

Browse files
committed
fix ts for vs-code. compile without tests
1 parent b587068 commit e3394cd

File tree

18 files changed

+49
-187
lines changed

18 files changed

+49
-187
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.gitignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
# Common
12
.DS_Store
23
node_modules
34
npm-debug.log
4-
test
55
.vscode
6+
7+
# Testing
68
src/coverage
7-
src/__tests__/__cache__
8-
src/__tests__/__snapshots__
9+
src/__tests__/__cache__

.npmignore

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
# Common
12
.DS_Store
23
node_modules
34
npm-debug.log
4-
test
5-
src
6-
tsconfig.json
7-
tsd.json
8-
tslint.json
95
.gitattributes
106
.vscode
11-
src/coverage
12-
src/__tests__/__cache__
13-
src/__tests__/__snapshots__
7+
8+
# Project
9+
src
10+
.eslintrc

lib/components/AppMenu/menu.spec.js

Whitespace-only changes.

lib/modules/alert/actions.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"use strict";
22
var types_1 = require('./types');
33
function alertOpen(alert) {
4-
return function (dispatch) {
5-
dispatch({ type: types_1.ALERT_OPEN, payload: { alert: alert } });
6-
};
4+
return { type: types_1.ALERT_OPEN, payload: { alert: alert } };
75
}
86
exports.alertOpen = alertOpen;
97
function alertReplay() {

lib/modules/alert/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var colors = {
55
FAIL: '#FF4081',
66
NOTE: '#9DA5B4',
77
};
8-
var _alert = {
8+
exports._alert = {
99
message: '',
1010
open: false,
1111
action: 'NOTE',
@@ -17,7 +17,7 @@ var open = {
1717
action: 'NOTE',
1818
duration: 1500
1919
};
20-
var current = _alert;
20+
var current = exports._alert;
2121
function setAlert(a) {
2222
a.color = colors[a.action] || colors.NOTE;
2323
var statusBarAlert = document.getElementsByClassName('cr-alert-replay')[0];
@@ -26,7 +26,7 @@ function setAlert(a) {
2626
return Object.assign({}, open, a);
2727
}
2828
function alert(alert, action) {
29-
if (alert === void 0) { alert = _alert; }
29+
if (alert === void 0) { alert = exports._alert; }
3030
switch (action.type) {
3131
case types_1.ALERT_REPLAY:
3232
return setAlert(current);

lib/modules/alert/reducer.js

Whitespace-only changes.

lib/modules/dir/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"use strict";
22
function dirReducer(dir) {
3-
if (atom.project.rootDirectories.length > 0) {
4-
return atom.project.rootDirectories[0].path;
3+
if (!atom) {
4+
throw new Error('No project directory found. Atom may not be initialized.');
55
}
6-
else {
7-
return '';
6+
if (atom && atom.project.rootDirectories.length > 0) {
7+
return atom.project.rootDirectories[0].path;
88
}
99
}
1010
Object.defineProperty(exports, "__esModule", { value: true });

lib/modules/hints/reducer.js

Whitespace-only changes.

lib/modules/page/task-actions/parser.spec.js

Whitespace-only changes.

lib/modules/route/MenuLink/index.js

-40
This file was deleted.

lib/modules/route/RouteButton/index.js

-36
This file was deleted.

lib/modules/tutorial/reducer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var path_1 = require('path');
33
var types_1 = require('./types');
44
var config_1 = require('./utils/config');
55
var config_paths_1 = require('./utils/config-paths');
6-
var _tutorial = {
6+
exports._tutorial = {
77
name: null,
88
version: null,
99
info: null,
@@ -13,7 +13,7 @@ var _tutorial = {
1313
};
1414
var configured = [];
1515
function tutorialReducer(t, action) {
16-
if (t === void 0) { t = _tutorial; }
16+
if (t === void 0) { t = exports._tutorial; }
1717
switch (action.type) {
1818
case types_1.TUTORIAL_SET:
1919
var _a = action.payload, name_1 = _a.name, dir = _a.dir, version = _a.version;

lib/modules/window/Quit/index.js

-41
This file was deleted.

package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,18 @@
4545
"reselect": "2.5.3"
4646
},
4747
"devDependencies": {
48+
"electron-chromedriver": "^1.3.2",
4849
"enzyme": "^2.4.1",
4950
"jest": "^15.1.1",
51+
"jest-cli": "^15.1.1",
5052
"react-addons-test-utils": "^15.3.1",
5153
"react-test-renderer": "^15.3.1",
52-
"tslint": "^3.15.1"
54+
"redux-mock-store": "^1.2.0",
55+
"selenium-webdriver": "^3.0.0-beta-2",
56+
"spectron": "^3.3.0",
57+
"tslint": "^3.15.1",
58+
"tslint-react": "^1.0.0",
59+
"typescript": "^2.0.0"
5360
},
5461
"engines": {
5562
"atom": ">=1.0.0 <2.0.0"
@@ -67,13 +74,14 @@
6774
"jest": {
6875
"verbose": true,
6976
"scriptPreprocessor": "<rootDir>/src/__tests__/preprocessor.js",
77+
"mocksPattern": "src/__tests__/mocks",
7078
"moduleFileExtensions": [
7179
"ts",
7280
"tsx",
7381
"js"
7482
],
75-
"testRegex": "/src/*/.*\\.test\\.(ts|tsx|js)$",
76-
"coverageDirectory": "src/coverage",
83+
"testRegex": "src/*/.*\\.test\\.(ts|tsx|js)$",
84+
"coverageDirectory": "src/__coverage__",
7785
"collectCoverage": true,
7886
"coveragePathIgnorePatterns": [
7987
"/node_modules/",

src/subscriptions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {CompositeDisposable} from 'atom';
55
export default class Subscriptions {
66
private subscriptions = new CompositeDisposable();
77

8-
public onActivate(store: Redux.Store): AtomCore.Disposable {
8+
public onActivate(store: Redux.Store<any>): AtomCore.Disposable {
99
this.subscriptions.add(
1010
atom.commands.add('atom-workspace', {
1111
'cr-viewer:toggle': () => store.dispatch(windowToggle())
@@ -19,7 +19,7 @@ export default class Subscriptions {
1919
return this.subscriptions;
2020
}
2121

22-
public onDeactivate(store: Redux.Store): void {
22+
public onDeactivate(store: Redux.Store<any>): void {
2323
// unsubscribe from Redux store
2424
store.subscribe(() => null);
2525
// cleanup subscriptions

tsconfig.json

+15-19
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
11
{
2-
"compileOnSave": true,
3-
"buildOnSave": true,
42
"compilerOptions": {
53
"target": "ES5",
64
"module": "commonjs",
75
"declaration": false,
86
"noImplicitAny": false,
97
"removeComments": true,
10-
"noLib": false,
118
"jsx": "react",
129
"experimentalDecorators": true,
1310
"emitDecoratorMetadata": true,
1411
"outDir": "lib",
1512
"moduleResolution": "node",
16-
"rootDirs": ["src"],
17-
"strictNullChecks": true
13+
"strictNullChecks": true,
14+
"rootDirs": [
15+
"src"
16+
]
1817
},
1918
"filesGlob": [
20-
"*.ts",
21-
"**/*.ts",
22-
"**/*.tsx",
23-
"!coverage",
24-
"!__tests__",
25-
"!**/*.spec.ts",
26-
"!**/*.spec.tsx",
27-
"!**/*.test.ts",
28-
"!**/*.test.tsx"
19+
"*.ts",
20+
"*.tsx",
21+
"**/*.ts",
22+
"**/*.tsx"
2923
],
3024
"exclude": [
31-
"node_modules"
32-
],
33-
"atom": {
34-
"rewriteTsconfig": false
35-
}
25+
"node_modules",
26+
"src/__tests__",
27+
"src/**/*.test.ts",
28+
"src/**/*.test.tsx",
29+
"src/**/*.spec.ts",
30+
"src/**/*.spec.tsx"
31+
]
3632
}

typings.json

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
{
22
"globalDependencies": {
3-
"assertion-error": "registry:dt/assertion-error#1.0.0+20160316155526",
4-
"atom": "registry:dt/atom#0.0.0+20160505173316",
5-
"emissary": "registry:dt/emissary#0.0.0+20160317120654",
6-
"enzyme": "registry:dt/enzyme#2.4.1+20160709041153",
7-
"es6-promise": "registry:dt/es6-promise#0.0.0+20160614011821",
8-
"jest": "registry:dt/jest#0.9.0+20160706021812",
9-
"marked": "registry:dt/marked#0.0.0+20160325085301",
10-
"material-ui": "registry:dt/material-ui#0.15.1+20160824122606",
11-
"node": "registry:dt/node#6.0.0+20160831021119",
12-
"pathwatcher": "registry:dt/pathwatcher#0.0.0+20160317120654",
13-
"q": "registry:dt/q#0.0.0+20160613154756",
14-
"react": "registry:dt/react#0.14.0+20160829191040",
15-
"react-dom": "registry:dt/react-dom#0.14.0+20160412154040",
16-
"react-redux": "registry:dt/react-redux#4.4.0+20160724070751",
17-
"react-tap-event-plugin": "registry:dt/react-tap-event-plugin#0.0.0+20160602142434",
18-
"redux": "registry:dt/redux#3.5.2+20160703092728",
19-
"redux-form": "registry:dt/redux-form#4.0.3+20160803140805",
20-
"redux-logger": "registry:dt/redux-logger#2.6.0+20160619033847",
21-
"redux-thunk": "registry:dt/redux-thunk#2.1.0+20160703120921",
22-
"reselect": "registry:dt/reselect#2.0.2+20160319031821",
23-
"space-pen": "registry:dt/space-pen#0.0.0+20160316155526",
24-
"status-bar": "registry:dt/status-bar#0.0.0+20160317120654",
25-
"text-buffer": "registry:dt/text-buffer#0.0.0+20160317120654"
3+
"react-addons-test-utils": "registry:dt/react-addons-test-utils#0.14.0+20160427035638"
264
}
275
}

0 commit comments

Comments
 (0)