Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit beef44a

Browse files
Merge pull request #73 from johnnyreilly/master
Removed usage of React as an expression
2 parents c56c2cb + 9a98b36 commit beef44a

File tree

9 files changed

+92
-81
lines changed

9 files changed

+92
-81
lines changed
Lines changed: 71 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,73 @@
11
{
2-
"root": true,
3-
"env": {
4-
"commonjs": true,
5-
},
6-
"rules": {
7-
"no-alert": 2,
8-
"no-array-constructor": 2,
9-
"no-caller": 2,
10-
"no-catch-shadow": 2,
11-
"no-empty-label": 2,
12-
"no-eval": 2,
13-
"no-extend-native": 2,
14-
"no-extra-bind": 2,
15-
"no-implied-eval": 2,
16-
"no-iterator": 2,
17-
"no-label-var": 2,
18-
"no-labels": 2,
19-
"no-lone-blocks": 2,
20-
"no-loop-func": 2,
21-
"no-multi-str": 2,
22-
"no-native-reassign": 2,
23-
"no-new": 2,
24-
"no-new-func": 2,
25-
"no-new-object": 2,
26-
"no-new-wrappers": 2,
27-
"no-octal-escape": 2,
28-
"no-proto": 2,
29-
"no-return-assign": 2,
30-
"no-script-url": 2,
31-
"no-sequences": 2,
32-
"no-shadow": 2,
33-
"no-shadow-restricted-names": 2,
34-
"no-spaced-func": 2,
35-
"no-trailing-spaces": 1,
36-
"no-undef-init": 2,
37-
"no-unused-expressions": 2,
38-
"no-use-before-define": [2, "nofunc"],
39-
"no-with": 2,
40-
"camelcase": 2,
41-
"comma-spacing": 1,
42-
"consistent-return": 2,
43-
"curly": [2, "all"],
44-
"dot-notation": [2, { "allowKeywords": true }],
45-
"eol-last": 2,
46-
"no-extra-parens": [2, "functions"],
47-
"eqeqeq": 2,
48-
"new-cap": 2,
49-
"new-parens": 2,
50-
"quotes": [1, "single"],
51-
"semi": 2,
52-
"semi-spacing": [2, {"before": false, "after": true}],
53-
"space-infix-ops": 2,
54-
"space-return-throw-case": 2,
55-
"space-unary-ops": [2, { "words": true, "nonwords": false }],
56-
"strict": [2, "global"],
57-
"yoda": [2, "never"]
58-
}
2+
"root": true,
3+
"env": {
4+
"commonjs": true,
5+
},
6+
"rules": {
7+
"camelcase": 2,
8+
"comma-spacing": 1,
9+
"consistent-return": 2,
10+
"curly": [ 2, "all" ],
11+
"dot-notation": [
12+
2,
13+
{ "allowKeywords": true }
14+
],
15+
"eol-last": 2,
16+
"eqeqeq": 2,
17+
"keyword-spacing": 2,
18+
"new-cap": 2,
19+
"new-parens": 2,
20+
"no-alert": 2,
21+
"no-array-constructor": 2,
22+
"no-caller": 2,
23+
"no-catch-shadow": 2,
24+
"no-eval": 2,
25+
"no-extend-native": 2,
26+
"no-extra-bind": 2,
27+
"no-extra-parens": [ 2, "functions" ],
28+
"no-implied-eval": 2,
29+
"no-iterator": 2,
30+
"no-labels": 2,
31+
"no-label-var": 2,
32+
"no-lone-blocks": 2,
33+
"no-loop-func": 2,
34+
"no-multi-str": 2,
35+
"no-native-reassign": 2,
36+
"no-new": 2,
37+
"no-new-func": 2,
38+
"no-new-object": 2,
39+
"no-new-wrappers": 2,
40+
"no-octal-escape": 2,
41+
"no-proto": 2,
42+
"no-return-assign": 2,
43+
"no-script-url": 2,
44+
"no-sequences": 2,
45+
"no-shadow": 2,
46+
"no-shadow-restricted-names": 2,
47+
"no-spaced-func": 2,
48+
"no-trailing-spaces": 1,
49+
"no-undef-init": 2,
50+
"no-unused-expressions": 2,
51+
"no-use-before-define": [ 2, "nofunc" ],
52+
"no-with": 2,
53+
"quotes": [ 1, "single" ],
54+
"semi": 2,
55+
"semi-spacing": [
56+
2,
57+
{
58+
"before": false,
59+
"after": true
60+
}
61+
],
62+
"space-infix-ops": 2,
63+
"space-unary-ops": [
64+
2,
65+
{
66+
"words": true,
67+
"nonwords": false
68+
}
69+
],
70+
"strict": [ 2, "global" ],
71+
"yoda": [ 2, "never" ]
72+
}
5973
}

es6-babel-react-flux-karma/gulp/tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
singleRun: false,
1313

1414
// Fancy runner
15-
plugins: ['karma-webpack', 'karma-jasmine', 'karma-mocha-reporter', /*'karma-junit-reporter', 'karma-coverage', */'karma-sourcemap-loader', 'karma-phantomjs-launcher', 'karma-phantomjs-shim'], // karma-phantomjs-shim only in place until PhantomJS hits 2.0 and has function.bind
15+
plugins: ['karma-webpack', 'karma-jasmine', 'karma-mocha-reporter', /*'karma-junit-reporter', 'karma-coverage', */'karma-sourcemap-loader', 'karma-phantomjs-launcher'],
1616
reporters: ['mocha']
1717
};
1818

es6-babel-react-flux-karma/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(config) {
1616

1717
port: 9876,
1818

19-
frameworks: [ 'jasmine', 'phantomjs-shim' ],
19+
frameworks: [ 'jasmine' ],
2020

2121
logLevel: config.LOG_INFO, //config.LOG_DEBUG
2222

es6-babel-react-flux-karma/package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"url": "git+https://github.com/microsoft/typescriptsamples.git"
1515
},
1616
"keywords": [
17-
"Globalize",
18-
"globalization",
19-
"internationalization",
17+
"React",
18+
"Flux",
19+
"ES6",
2020
"typescript"
2121
],
2222
"author": "John Reilly",
@@ -33,20 +33,20 @@
3333
"babel-preset-es2015": "^6.0.0",
3434
"babel-preset-react": "^6.0.0",
3535
"del": "^2.0.2",
36-
"eslint": "^1.6.0",
36+
"eslint": "^2.0.0",
3737
"express": "^4.13.3",
3838
"flux": "^2.0.3",
39-
"glob": "^5.0.15",
39+
"glob": "^7.0.0",
4040
"gulp": "^3.9.0",
4141
"gulp-autoprefixer": "^3.1.0",
4242
"gulp-cached": "^1.1.0",
4343
"gulp-cssmin": "^0.1.7",
44-
"gulp-eslint": "^1.0.0",
44+
"gulp-eslint": "^2.0.0",
4545
"gulp-if": "^2.0.0",
4646
"gulp-inject": "^3.0.0",
4747
"gulp-notify": "^2.2.0",
4848
"gulp-sourcemaps": "^1.5.2",
49-
"gulp-streamify": "1.0.0",
49+
"gulp-streamify": "1.0.2",
5050
"gulp-uglify": "^1.2.0",
5151
"gulp-util": "^3.0.6",
5252
"jasmine-core": "^2.3.4",
@@ -55,16 +55,17 @@
5555
"karma-jasmine": "^0.3.6",
5656
"karma-junit-reporter": "^0.3.7",
5757
"karma-mocha-reporter": "^1.1.1",
58-
"karma-phantomjs-launcher": "^0.2.1",
58+
"karma-phantomjs-launcher": "^1.0.0",
5959
"karma-phantomjs-shim": "^1.1.1",
6060
"karma-sourcemap-loader": "^0.3.6",
6161
"karma-webpack": "^1.7.0",
62-
"phantomjs": "^1.9.17",
62+
"phantomjs": "^2.1.3",
63+
"phantomjs-prebuilt": "^2.1.4",
6364
"react": "^0.14.3",
6465
"react-addons-test-utils": "^0.14.3",
6566
"react-dom": "^0.14.3",
66-
"ts-loader": "^0.7.1",
67-
"typescript": "^1.6.2",
67+
"ts-loader": "^0.8.1",
68+
"typescript": "^1.8.0",
6869
"webpack": "^1.12.2",
6970
"webpack-notifier": "^1.2.1"
7071
}

es6-babel-react-flux-karma/src/main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import 'babel-polyfill';
22
import * as React from 'react';
33
import * as ReactDOM from 'react-dom';
44
import App from './components/App';
5-
React; // use React as an expression to prevent React being purged from dependencies as not used directly
65

76
ReactDOM.render(<App />, document.getElementById('content'));

es6-babel-react-flux-karma/test/components/App.tests.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import App from '../../src/components/App';
44
import WhoToGreet from '../../src/components/WhoToGreet';
55
import Greeting from '../../src/components/Greeting';
66
import GreetingStore from '../../src/stores/GreetingStore';
7-
React; // use React as an expression to prevent React being purged from dependencies as not used directly
87

98
describe('App', () => {
109
it('renders expected HTML', () => {

es6-babel-react-flux-karma/test/components/Greeting.tests.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import * as TestUtils from 'react-addons-test-utils';
33
import Greeting from '../../src/components/Greeting';
44
import * as GreetingActions from '../../src/actions/GreetingActions';
5-
React; // use React as an expression to prevent React being purged from dependencies as not used directly
65

76
describe('Greeting', () => {
87
let handleSelectionChangeSpy: jasmine.Spy;

es6-babel-react-flux-karma/test/components/WhoToGreet.tests.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import * as TestUtils from 'react-addons-test-utils';
33
import WhoToGreet from '../../src/components/WhoToGreet';
44
import * as GreetingActions from '../../src/actions/GreetingActions';
5-
React; // use React as an expression to prevent React being purged from dependencies as not used directly
65

76
describe('WhoToGreet', () => {
87
let handleSelectionChangeSpy: jasmine.Spy;

es6-babel-react-flux-karma/tsd.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
"bundle": "typings/tsd.d.ts",
77
"installed": {
88
"jasmine/jasmine.d.ts": {
9-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
9+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
1010
},
1111
"flux/flux.d.ts": {
12-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
12+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
1313
},
1414
"node/node.d.ts": {
15-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
15+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
1616
},
1717
"react/react.d.ts": {
18-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
18+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
1919
},
2020
"react/react-dom.d.ts": {
21-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
21+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
2222
},
2323
"react/react-addons-test-utils.d.ts": {
24-
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
25-
}
24+
"commit": "bcd5761826eb567876c197ccc6a87c4d05731054"
25+
}
2626
}
2727
}

0 commit comments

Comments
 (0)