@samitouri / QOS-React-2 / commits / c089eece50

Switch to using comma-dangle: always-multiline

This is a machine-generated codemod, but it's pretty safe since it was generated by hooking into eslint's own report. A few files had to be touched up by hand because there were existing formatting issues with nested arrays/objects: src/shared/utils/__tests__/OrderedMap-test.js src/shared/utils/__tests__/Transaction-test.js src/shared/utils/__tests__/traverseAllChildren-test.js src/isomorphic/children/__tests__/ReactChildren-test.js

Benjamin Woodruff committed Jun 1, 2015 at 16:31 UTC c089eece509012a444dc770afb5b348b47c62d3a
214 files changed +1336 -1328
.eslintrc
+1 -3
@@ -30,9 +30,7 @@ rules:
30 brace-style: 2
31 space-after-keywords: 2
32 strict: 2
33 - # We actually have a transform to support this and we fix this for bundled
34 - # releases but not for the npm package, so enforce it strictly
35 - comma-dangle: [2, never]
33 + comma-dangle: [2, always-multiline]
34 # Make this a warning for now. We do this in a few places so we might need to
35 # disable
36 no-unused-expressions: 2
Gruntfile.js
+20 -20
@@ -29,11 +29,11 @@ module.exports = function(grunt) {
29 './*.gem',
30 './docs/_site',
31 './examples/shared/*.js',
32 - '.module-cache'
32 + '.module-cache',
33 ],
34 jshint: require('./grunt/config/jshint'),
35 /*eslint-disable camelcase */
36 - compare_size: require('./grunt/config/compare_size')
36 + compare_size: require('./grunt/config/compare_size'),
37 /*eslint-enable camelcase */
38 });
39
@@ -91,44 +91,44 @@ module.exports = function(grunt) {
91 grunt.registerTask('build:basic', [
92 'jsx:normal',
93 'version-check',
94 - 'browserify:basic'
94 + 'browserify:basic',
95 ]);
96 grunt.registerTask('build:addons', [
97 'jsx:normal',
98 - 'browserify:addons'
98 + 'browserify:addons',
99 ]);
100 grunt.registerTask('build:transformer', [
101 'jsx:normal',
102 - 'browserify:transformer'
102 + 'browserify:transformer',
103 ]);
104 grunt.registerTask('build:min', [
105 'jsx:normal',
106 'version-check',
107 - 'browserify:min'
107 + 'browserify:min',
108 ]);
109 grunt.registerTask('build:addons-min', [
110 'jsx:normal',
111 - 'browserify:addonsMin'
111 + 'browserify:addonsMin',
112 ]);
113 grunt.registerTask('build:withCodeCoverageLogging', [
114 'jsx:normal',
115 'version-check',
116 - 'browserify:withCodeCoverageLogging'
116 + 'browserify:withCodeCoverageLogging',
117 ]);
118 grunt.registerTask('build:test', [
119 'delete-build-modules',
120 'jsx:test',
121 'version-check',
122 - 'populist:test'
122 + 'populist:test',
123 ]);
124 grunt.registerTask('build:npm-react', [
125 'version-check',
126 'jsx:normal',
127 - 'npm-react:release'
127 + 'npm-react:release',
128 ]);
129 grunt.registerTask('build:gem-react-source', [
130 'build',
131 - 'gem-react-source:release'
131 + 'gem-react-source:release',
132 ]);
133
134 grunt.registerTask('webdriver-phantomjs', webdriverPhantomJSTask);
@@ -138,7 +138,7 @@ module.exports = function(grunt) {
138 grunt.registerTask('test:webdriver:phantomjs', [
139 'connect',
140 'webdriver-phantomjs',
141 - 'webdriver-jasmine:local'
141 + 'webdriver-jasmine:local',
142 ]);
143
144 grunt.registerTask('test:full', [
@@ -152,7 +152,7 @@ module.exports = function(grunt) {
152 'sauce-tunnel',
153 'webdriver-jasmine:saucelabs_android',
154 'webdriver-jasmine:saucelabs_firefox',
155 - 'webdriver-jasmine:saucelabs_chrome'
155 + 'webdriver-jasmine:saucelabs_chrome',
156 ]);
157
158 grunt.registerTask('test:webdriver:saucelabs', [
@@ -161,7 +161,7 @@ module.exports = function(grunt) {
161
162 'connect',
163 'sauce-tunnel',
164 - 'webdriver-jasmine:saucelabs_' + (process.env.BROWSER_NAME || 'ie8')
164 + 'webdriver-jasmine:saucelabs_' + (process.env.BROWSER_NAME || 'ie8'),
165 ]);
166
167 grunt.registerTask('test:webdriver:saucelabs:modern', [
@@ -173,7 +173,7 @@ module.exports = function(grunt) {
173 'webdriver-jasmine:saucelabs_android',
174 'webdriver-jasmine:saucelabs_firefox',
175 'webdriver-jasmine:saucelabs_chrome',
176 - 'webdriver-jasmine:saucelabs_ie11'
176 + 'webdriver-jasmine:saucelabs_ie11',
177 ]);
178
179 grunt.registerTask('test:webdriver:saucelabs:ie', [
@@ -185,7 +185,7 @@ module.exports = function(grunt) {
185 'webdriver-jasmine:saucelabs_ie8',
186 'webdriver-jasmine:saucelabs_ie9',
187 'webdriver-jasmine:saucelabs_ie10',
188 - 'webdriver-jasmine:saucelabs_ie11'
188 + 'webdriver-jasmine:saucelabs_ie11',
189 ]);
190
191 grunt.registerTask('test:webdriver:saucelabs:ios', [
@@ -196,13 +196,13 @@ module.exports = function(grunt) {
196 'sauce-tunnel',
197 'webdriver-jasmine:saucelabs_ios6_1',
198 'webdriver-jasmine:saucelabs_ios5_1',
199 - 'webdriver-jasmine:saucelabs_ios4'
199 + 'webdriver-jasmine:saucelabs_ios4',
200 ]);
201
202 grunt.registerTask('test:coverage', [
203 'build:withCodeCoverageLogging',
204 'test:webdriver:phantomjs',
205 - 'coverage:parse'
205 + 'coverage:parse',
206 ]);
207 grunt.registerTask('fasttest', function() {
208 grunt.task.run('test');
@@ -231,7 +231,7 @@ module.exports = function(grunt) {
231 'npm-react:pack',
232 'npm-react-tools:release',
233 'npm-react-tools:pack',
234 - 'compare_size'
234 + 'compare_size',
235 ]);
236
237 // Automate the release!
@@ -251,7 +251,7 @@ module.exports = function(grunt) {
251 'release:starter',
252 'compress',
253 'release:docs',
254 - 'release:msg'
254 + 'release:msg',
255 ]);
256
257 // The default task - build - to keep setup easy.
grunt/config/browserify.js
+14 -14
@@ -51,19 +51,19 @@ function simpleBannerify(src) {
51 // Our basic config which we'll add to to make our other builds
52 var basic = {
53 entries: [
54 - './build/modules/React.js'
54 + './build/modules/React.js',
55 ],
56 outfile: './build/react.js',
57 debug: false,
58 standalone: 'React',
59 transforms: [envify({NODE_ENV: 'development'})],
60 plugins: [collapser],
61 - after: [derequire, simpleBannerify]
61 + after: [derequire, simpleBannerify],
62 };
63
64 var min = {
65 entries: [
66 - './build/modules/React.js'
66 + './build/modules/React.js',
67 ],
68 outfile: './build/react.min.js',
69 debug: false,
@@ -73,12 +73,12 @@ var min = {
73 // No need to derequire because the minifier will mangle
74 // the "require" calls.
75
76 - after: [/*derequire,*/ minify, bannerify]
76 + after: [/*derequire,*/ minify, bannerify],
77 };
78
79 var transformer = {
80 entries:[
81 - './vendor/browser-transforms.js'
81 + './vendor/browser-transforms.js',
82 ],
83 outfile: './build/JSXTransformer.js',
84 debug: false,
@@ -89,12 +89,12 @@ var transformer = {
89 // collapser passes a number; this would throw.
90
91 // plugins: [collapser],
92 - after: [derequire, simpleBannerify]
92 + after: [derequire, simpleBannerify],
93 };
94
95 var addons = {
96 entries: [
97 - './build/modules/ReactWithAddons.js'
97 + './build/modules/ReactWithAddons.js',
98 ],
99 outfile: './build/react-with-addons.js',
100 debug: false,
@@ -102,12 +102,12 @@ var addons = {
102 packageName: 'React (with addons)',
103 transforms: [envify({NODE_ENV: 'development'})],
104 plugins: [collapser],
105 - after: [derequire, simpleBannerify]
105 + after: [derequire, simpleBannerify],
106 };
107
108 var addonsMin = {
109 entries: [
110 - './build/modules/ReactWithAddons.js'
110 + './build/modules/ReactWithAddons.js',
111 ],
112 outfile: './build/react-with-addons.min.js',
113 debug: false,
@@ -118,21 +118,21 @@ var addonsMin = {
118 // No need to derequire because the minifier will mangle
119 // the "require" calls.
120
121 - after: [/*derequire,*/ minify, bannerify]
121 + after: [/*derequire,*/ minify, bannerify],
122 };
123
124 var withCodeCoverageLogging = {
125 entries: [
126 - './build/modules/React.js'
126 + './build/modules/React.js',
127 ],
128 outfile: './build/react.js',
129 debug: true,
130 standalone: 'React',
131 transforms: [
132 envify({NODE_ENV: 'development'}),
133 - require('coverify')
133 + require('coverify'),
134 ],
135 - plugins: [collapser]
135 + plugins: [collapser],
136 };
137
138 module.exports = {
@@ -141,5 +141,5 @@ module.exports = {
141 transformer: transformer,
142 addons: addons,
143 addonsMin: addonsMin,
144 - withCodeCoverageLogging: withCodeCoverageLogging
144 + withCodeCoverageLogging: withCodeCoverageLogging,
145 };
grunt/config/compare_size.js
+4 -4
@@ -4,14 +4,14 @@ var gzip = require('gzip-js');
4
5 module.exports = {
6 files: [
7 - 'build/*.js'
7 + 'build/*.js',
8 ],
9 options: {
10 compress: {
11 gz: function(contents) {
12 return gzip.zip(contents, {}).length;
13 - }
13 + },
14 },
15 - cache: '.grunt/sizecache.json'
16 - }
15 + cache: '.grunt/sizecache.json',
16 + },
17 };
grunt/config/compress.js
+4 -4
@@ -7,10 +7,10 @@ var version = grunt.config.data.pkg.version;
7 module.exports = {
8 starter: {
9 options: {
10 - archive: './build/react-' + version + '.zip'
10 + archive: './build/react-' + version + '.zip',
11 },
12 files: [
13 - {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'}
14 - ]
15 - }
13 + {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'},
14 + ],
15 + },
16 };
grunt/config/jshint.js
+8 -8
@@ -3,7 +3,7 @@
3 module.exports = {
4 src: {
5 options: {
6 - jshintrc: './src/.jshintrc'
6 + jshintrc: './src/.jshintrc',
7 },
8 files: {
9 // We don't care about src/vendor (we shouldn't be touching this), and
@@ -12,16 +12,16 @@ module.exports = {
12 './src/**/*.js',
13 '!./src/vendor/**',
14 '!./src/**/__tests__/**',
15 - '!./src/test/**'
16 - ]
17 - }
15 + '!./src/test/**',
16 + ],
17 + },
18 },
19 project: {
20 options: {
21 - jshintrc: './.jshintrc'
21 + jshintrc: './.jshintrc',
22 },
23 files: {
24 - src: ['./Gruntfile.js', './grunt/**/*.js', './bin/*.js', './vendor/*.js']
25 - }
26 - }
24 + src: ['./Gruntfile.js', './grunt/**/*.js', './bin/*.js', './vendor/*.js'],
25 + },
26 + },
27 };
grunt/config/jsx.js
+7 -7
@@ -5,37 +5,37 @@ var grunt = require('grunt');
5
6 var rootIDs = [
7 'React',
8 - 'ReactWithAddons'
8 + 'ReactWithAddons',
9 ];
10
11 var normal = {
12 rootIDs: rootIDs,
13 getConfig: function() {
14 return {
15 - commonerConfig: grunt.config.data.pkg.commonerConfig
15 + commonerConfig: grunt.config.data.pkg.commonerConfig,
16 };
17 },
18 sourceDir: 'src',
19 - outputDir: 'build/modules'
19 + outputDir: 'build/modules',
20 };
21
22
23 var test = {
24 rootIDs: rootIDs.concat([
25 'test/all.js',
26 - '**/__tests__/*.js'
26 + '**/__tests__/*.js',
27 ]),
28 getConfig: function() {
29 return assign({}, normal.getConfig(), {
30 - mocking: true
30 + mocking: true,
31 });
32 },
33 sourceDir: 'src',
34 - outputDir: 'build/modules'
34 + outputDir: 'build/modules',
35 };
36
37
38 module.exports = {
39 normal: normal,
40 - test: test
40 + test: test,
41 };
grunt/config/populist.js
+3 -3
@@ -7,7 +7,7 @@ module.exports = function(grunt) {
7 // (build/jasmine/jasmine.js) as global.jasmine, and to require the
8 // 'all' module (build/jasmine/all.js) but not expose it globally.
9 args: ['jasmine:jasmine', 'all:'],
10 - outfile: './build/jasmine.js'
10 + outfile: './build/jasmine.js',
11 };
12
13 var filterExpr = grunt.option('filter');
@@ -22,11 +22,11 @@ module.exports = function(grunt) {
22 rootDirectory: 'build/modules',
23 args: ['test/all:harness'],
24 requires: [filterExpr],
25 - outfile: './build/react-test.js'
25 + outfile: './build/react-test.js',
26 };
27
28 return {
29 jasmine: jasmine,
30 - test: test
30 + test: test,
31 };
32 };
grunt/config/server.js
+4 -4
@@ -103,10 +103,10 @@ module.exports = function(grunt) {
103
104 connect.logger({format:'[:user-agent][:timestamp] :method :url', stream:grunt.verbose}),
105 connect.static(options.base),
106 - connect.directory(options.base)
106 + connect.directory(options.base),
107 ];
108 - }
109 - }
110 - }
108 + },
109 + },
110 + },
111 };
112 };
grunt/config/webdriver-all.js
+7 -7
@@ -23,13 +23,13 @@ module.exports = function(props) {
23
24 exports.local = {
25 webdriver: {
26 - remote: {protocol: 'http:', hostname: '127.0.0.1', port: 9515, path: '/'}
26 + remote: {protocol: 'http:', hostname: '127.0.0.1', port: 9515, path: '/'},
27 },
28 url: props.url,
29 onStart: props.onStart,
30 onComplete: props.onComplete,
31 onError: props.onError,
32 - isDoneTimeout: props.isDoneTimeout
32 + isDoneTimeout: props.isDoneTimeout,
33 };
34
35 if (grunt.option('debug')) {
@@ -45,13 +45,13 @@ module.exports = function(props) {
45 protocol: 'http:',
46 hostname: 'ondemand.saucelabs.com',
47 port: '80',
48 - path: '/wd/hub'
49 - }
48 + path: '/wd/hub',
49 + },
50 },
51 desiredCapabilities: {
52 'build': process.env.TRAVIS_BUILD_NUMBER || 'dev' + Date.now(),
53 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER || 'my awesome tunnel',
54 - 'browserName': 'chrome'
54 + 'browserName': 'chrome',
55 },
56 url: exports.local.url,
57 onStart: function(browser) {
@@ -62,7 +62,7 @@ module.exports = function(props) {
62 },
63 onComplete: exports.local.onComplete,
64 onError: exports.local.onError,
65 - isDoneTimeout: exports.local.isDoneTimeout
65 + isDoneTimeout: exports.local.isDoneTimeout,
66 };
67
68 /*eslint-disable camelcase*/
@@ -107,7 +107,7 @@ module.exports = function(props) {
107 onComplete: exports.saucelabs.onComplete,
108 onError: exports.saucelabs.onError,
109 isDoneTimeout: exports.saucelabs.isDoneTimeout,
110 - desiredCapabilities: desiredCapabilities
110 + desiredCapabilities: desiredCapabilities,
111 };
112 }
113
grunt/config/webdriver-jasmine.js
+1 -1
@@ -11,5 +11,5 @@ module.exports = require('./webdriver-all')({
11 },
12 onError: function(error) {
13 grunt.fatal(error);
14 - }
14 + },
15 });
grunt/tasks/browserify.js
+1 -1
@@ -23,7 +23,7 @@ module.exports = function() {
23 var options = {
24 entries: entries,
25 debug: config.debug, // sourcemaps
26 - standalone: config.standalone // global
26 + standalone: config.standalone, // global
27 };
28
29 var bundle = browserify(options);
grunt/tasks/eslint.js
+1 -1
@@ -7,7 +7,7 @@ module.exports = function() {
7 grunt.util.spawn({
8 cmd: 'node_modules/.bin/eslint',
9 args: ['.'],
10 - opts: {stdio: 'inherit'} // allows colors to passthrough
10 + opts: {stdio: 'inherit'}, // allows colors to passthrough
11 }, function(err, result, code) {
12 if (err) {
13 grunt.log.error('Lint failed');
grunt/tasks/gem-react-source.js
+4 -4
@@ -8,7 +8,7 @@ var dest = 'build/gem-react-source/';
8 var build = dest + 'build/';
9 var buildFiles = [
10 'react.js', 'react.min.js', 'JSXTransformer.js',
11 - 'react-with-addons.js', 'react-with-addons.min.js'
11 + 'react-with-addons.js', 'react-with-addons.min.js',
12 ];
13
14 function buildRelease() {
@@ -43,8 +43,8 @@ function packRelease() {
43 cmd: 'gem',
44 args: ['build', 'react-source.gemspec'],
45 opts: {
46 - cwd: dest
47 - }
46 + cwd: dest,
47 + },
48 };
49 grunt.util.spawn(spawnCmd, function(err, result) {
50 if (err) {
@@ -61,5 +61,5 @@ function packRelease() {
61
62 module.exports = {
63 buildRelease: buildRelease,
64 - packRelease: packRelease
64 + packRelease: packRelease,
65 };
grunt/tasks/jsx.js
+3 -3
@@ -15,12 +15,12 @@ module.exports = function() {
15 '--follow-requires',
16 '--use-provides-module',
17 config.sourceDir,
18 - config.outputDir
18 + config.outputDir,
19 ];
20
21 var rootIDs = expand({
22 nonull: true, // Keep IDs that don't expand to anything.
23 - cwd: 'src'
23 + cwd: 'src',
24 }, config.rootIDs).map(function(id) {
25 return id.replace(/\.js$/i, '');
26 });
@@ -30,7 +30,7 @@ module.exports = function() {
30
31 var child = spawn({
32 cmd: 'node',
33 - args: [path.join('bin', 'jsx-internal')].concat(args)
33 + args: [path.join('bin', 'jsx-internal')].concat(args),
34 }, function(error, result, code) {
35 if (error) {
36 grunt.log.error(error);
grunt/tasks/npm-react-tools.js
+3 -3
@@ -45,8 +45,8 @@ function packRelease() {
45 cmd: 'npm',
46 args: ['pack', 'npm-react-tools'],
47 opts: {
48 - cwd: 'build/'
49 - }
48 + cwd: 'build/',
49 + },
50 };
51 grunt.util.spawn(spawnCmd, function() {
52 var buildSrc = 'build/react-tools-' + grunt.config.data.pkg.version + '.tgz';
@@ -57,5 +57,5 @@ function packRelease() {
57
58 module.exports = {
59 buildRelease: buildRelease,
60 - packRelease: packRelease
60 + packRelease: packRelease,
61 };
grunt/tasks/npm-react.js
+4 -4
@@ -10,7 +10,7 @@ var lib = dest + 'lib/';
10 var dist = dest + 'dist/';
11 var distFiles = [
12 'react.js', 'react.min.js', 'JSXTransformer.js',
13 - 'react-with-addons.js', 'react-with-addons.min.js'
13 + 'react-with-addons.js', 'react-with-addons.min.js',
14 ];
15
16 function buildRelease() {
@@ -56,8 +56,8 @@ function packRelease() {
56 cmd: 'npm',
57 args: ['pack', 'npm-react'],
58 opts: {
59 - cwd: 'build/'
60 - }
59 + cwd: 'build/',
60 + },
61 };
62 grunt.util.spawn(spawnCmd, function() {
63 var buildSrc = 'build/react-' + grunt.config.data.pkg.version + '.tgz';
@@ -68,5 +68,5 @@ function packRelease() {
68
69 module.exports = {
70 buildRelease: buildRelease,
71 - packRelease: packRelease
71 + packRelease: packRelease,
72 };
grunt/tasks/npm.js
+5 -5
@@ -26,7 +26,7 @@ module.exports = function() {
26 spawn({
27 cmd: cmd,
28 args: args,
29 - opts: opts
29 + opts: opts,
30 }, function(error, result, code) {
31 if (error) {
32 grunt.log.error(error);
@@ -58,7 +58,7 @@ module.exports = function() {
58 run('npm', [
59 'install',
60 '--production',
61 - tgz
61 + tgz,
62 ], {cwd: dir}, function() {
63 var nodePath = path.join(dir, 'node_modules');
64 var pkgDir = path.join(nodePath, pkg.name);
@@ -66,7 +66,7 @@ module.exports = function() {
66
67 // Make sure that bin/jsx is runnable by echoing main.js.
68 run('bin/jsx', ['main.js'], {
69 - cwd: pkgDir
69 + cwd: pkgDir,
70 }, function(result) {
71 assert.ok(result.stdout.indexOf('transform') >= 0, result.stdout);
72
@@ -81,9 +81,9 @@ module.exports = function() {
81 'require(\'react-tools\').transform(' +
82 JSON.stringify(
83 '/** @jsx React.DOM */ <div>oyez</div>;'
84 - ) + ')'
84 + ) + ')',
85 ], {
86 - env: {NODE_PATH: nodePath}
86 + env: {NODE_PATH: nodePath},
87 }, function(result, code) {
88 assert.ok(result.stdout.indexOf(
89 'React.DOM.div(null, \'oyez\');'
grunt/tasks/populist.js
+2 -2
@@ -22,7 +22,7 @@ module.exports = function() {
22 var requires = config.requires || [];
23 grunt.file.expand({
24 nonull: true, // Keep IDs that don't expand to anything.
25 - cwd: config.rootDirectory
25 + cwd: config.rootDirectory,
26 }, requires).forEach(function(name) {
27 name = name.replace(/\.js$/i, '');
28 args.push(name);
@@ -31,7 +31,7 @@ module.exports = function() {
31
32 require('populist').buildP({
33 rootDirectory: config.rootDirectory,
34 - args: args
34 + args: args,
35 }).then(function(output) {
36 grunt.file.write(config.outfile, 'process = {env: {}};' + output);
37 theFilesToTestScript.end();
grunt/tasks/release.js
+8 -8
@@ -6,7 +6,7 @@ var BOWER_PATH = '../react-bower/';
6 var BOWER_GLOB = [BOWER_PATH + '*.{js}'];
7 var BOWER_FILES = [
8 'react.js', 'react.min.js', 'JSXTransformer.js',
9 - 'react-with-addons.js', 'react-with-addons.min.js'
9 + 'react-with-addons.js', 'react-with-addons.min.js',
10 ];
11 var GH_PAGES_PATH = '../react-gh-pages/';
12 var GH_PAGES_GLOB = [GH_PAGES_PATH + '*'];
@@ -34,22 +34,22 @@ function _gitCommitAndTag(cwd, commitMsg, tag, cb) {
34 var gitAddAll = {
35 cmd: 'git',
36 args: ['add', '*'],
37 - opts: opts
37 + opts: opts,
38 };
39 var gitAddDel = {
40 cmd: 'git',
41 args: ['add', '-u'],
42 - opts: opts
42 + opts: opts,
43 };
44 var gitCommit = {
45 cmd: 'git',
46 args: ['commit', '-m', commitMsg],
47 - opts: opts
47 + opts: opts,
48 };
49 var gitTag = {
50 cmd: 'git',
51 args: ['tag', tag],
52 - opts: opts
52 + opts: opts,
53 };
54 grunt.util.spawn(gitAddAll, function() {
55 grunt.util.spawn(gitAddDel, function() {
@@ -116,7 +116,7 @@ function docs() {
116 var rakeOpts = {
117 cmd: 'rake',
118 args: ['release'],
119 - opts: {cwd: 'docs'}
119 + opts: {cwd: 'docs'},
120 };
121 grunt.util.spawn(rakeOpts, function() {
122 // Commit the repo. We don't really care about tagging this.
@@ -133,7 +133,7 @@ function msg() {
133 '* push changes to git repositories',
134 '* publish npm module (`npm publish .`)',
135 '* publish gem (`gem push react-source-' + VERSION + '.gem`)',
136 - '* announce it on FB/Twitter/mailing list'
136 + '* announce it on FB/Twitter/mailing list',
137 ].forEach(function(ln) {
138 grunt.log.writeln(ln);
139 });
@@ -170,5 +170,5 @@ module.exports = {
170 bower: bower,
171 docs: docs,
172 msg: msg,
173 - starter: starter
173 + starter: starter,
174 };
jest/preprocessor.js
+3 -3
@@ -7,7 +7,7 @@ var tsPreprocessor = require('./ts-preprocessor');
7
8 var defaultLibraries = [
9 require.resolve('./jest.d.ts'),
10 - require.resolve('../src/isomorphic/modern/class/React.d.ts')
10 + require.resolve('../src/isomorphic/modern/class/React.d.ts'),
11 ];
12
13 var ts = tsPreprocessor(defaultLibraries);
@@ -24,9 +24,9 @@ module.exports = {
24 return babel.transform(src, {
25 blacklist: ['spec.functionName', 'validation.react'],
26 filename: path,
27 - retainLines: true
27 + retainLines: true,
28 }).code;
29 }
30 return src;
31 - }
31 + },
32 };
jest/ts-preprocessor.js
+2 -2
@@ -39,7 +39,7 @@ function compile(defaultLib, content, contentFilename) {
39 },
40 getNewLine: function() {
41 return '\n';
42 - }
42 + },
43 };
44 var program = ts.createProgram([contentFilename], tsOptions, compilerHost);
45 var errors = program.getDiagnostics();
@@ -68,6 +68,6 @@ module.exports = function(defaultLibs) {
68 );
69
70 return {
71 - compile: compile.bind(null, defaultLibSourceFile)
71 + compile: compile.bind(null, defaultLibSourceFile),
72 };
73 };
main.js
+2 -2
@@ -24,7 +24,7 @@ function transformWithDetails(code, opts) {
24 sourceFilename: opts.sourceFilename,
25 es6module: opts.es6module,
26 nonStrictEs6module: opts.nonStrictEs6module,
27 - target: opts.target
27 + target: opts.target,
28 };
29
30 return jstransform.transform(code, options);
@@ -34,5 +34,5 @@ module.exports = {
34 transform: function(input, options) {
35 return transformWithDetails(input, options).code;
36 },
37 - transformWithDetails: transformWithDetails
37 + transformWithDetails: transformWithDetails,
38 };
npm-jsx_orphaned_brackets_transformer/run.js
+2 -2
@@ -24,7 +24,7 @@ _visitFbt.test = function(node, path, state) {
24
25 var VISITORS_LIST = [
26 _visitFbt,
27 - visitReactTag
27 + visitReactTag,
28 ];
29
30 function _transformSource(source) {
@@ -36,7 +36,7 @@ function transformDir(dirPath, exclude) {
36 rootFolder: dirPath,
37 filterFunction: function(path, stat) {
38 return /\.jsx?$/.test(path) && (!exclude || !exclude.test(path));
39 - }
39 + },
40 });
41
42 var numTransforms = 0;
src/addons/ReactComponentWithPureRenderMixin.js
+1 -1
@@ -40,7 +40,7 @@ var shallowCompare = require('shallowCompare');
40 var ReactComponentWithPureRenderMixin = {
41 shouldComponentUpdate: function(nextProps, nextState) {
42 return shallowCompare(this, nextProps, nextState);
43 - }
43 + },
44 };
45
46 module.exports = ReactComponentWithPureRenderMixin;
src/addons/ReactFragment.js
+4 -4
@@ -77,7 +77,7 @@ if (__DEV__) {
77 );
78 this[didWarnKey] = true;
79 this[fragmentKey][key] = value;
80 - }
80 + },
81 });
82 };
83
@@ -121,12 +121,12 @@ var ReactFragment = {
121 var proxy = {};
122 Object.defineProperty(proxy, fragmentKey, {
123 enumerable: false,
124 - value: object
124 + value: object,
125 });
126 Object.defineProperty(proxy, didWarnKey, {
127 writable: true,
128 enumerable: false,
129 - value: false
129 + value: false,
130 });
131 for (var key in object) {
132 proxyPropertyAccessWithWarning(proxy, key);
@@ -180,7 +180,7 @@ var ReactFragment = {
180 }
181 }
182 return fragment;
183 - }
183 + },
184 };
185
186 module.exports = ReactFragment;
src/addons/ReactWithAddons.js
+1 -1
@@ -43,7 +43,7 @@ React.addons = {
43 createFragment: ReactFragment.create,
44 renderSubtreeIntoContainer: renderSubtreeIntoContainer,
45 shallowCompare: shallowCompare,
46 - update: update
46 + update: update,
47 };
48
49 if (__DEV__) {
src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
+8 -8
@@ -30,7 +30,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
30 constructor(props, context) {
31 super(props, context);
32 this.state = {
33 - color: 'green'
33 + color: 'green',
34 };
35 }
36
@@ -50,27 +50,27 @@ describe('ReactComponentWithPureRenderMixin', function() {
50 getInitialState: function() {
51 return {
52 cut: false,
53 - slices: 1
53 + slices: 1,
54 };
55 },
56
57 cut: function() {
58 this.setState({
59 cut: true,
60 - slices: 10
60 + slices: 10,
61 });
62 },
63
64 eatSlice: function() {
65 this.setState({
66 - slices: this.state.slices - 1
66 + slices: this.state.slices - 1,
67 });
68 },
69
70 render: function() {
71 renderCalls++;
72 return <div />;
73 - }
73 + },
74 });
75
76 var instance = ReactTestUtils.renderIntoDocument(<PlasticWrap />);
@@ -101,7 +101,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
101 function getInitialState() {
102 return {
103 foo: [1, 2, 3],
104 - bar: {a: 4, b: 5, c: 6}
104 + bar: {a: 4, b: 5, c: 6},
105 };
106 }
107
@@ -118,7 +118,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
118 render: function() {
119 renderCalls++;
120 return <div />;
121 - }
121 + },
122 });
123
124 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -127,7 +127,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
127 // Do not re-render if state is equal
128 var settings = {
129 foo: initialSettings.foo,
130 - bar: initialSettings.bar
130 + bar: initialSettings.bar,
131 };
132 instance.setState(settings);
133 expect(renderCalls).toBe(1);
src/addons/__tests__/ReactFragment-test.js
+4 -4
@@ -25,7 +25,7 @@ describe('ReactFragment', function() {
25 spyOn(console, 'error');
26 var children = {
27 x: <span />,
28 - y: <span />
28 + y: <span />,
29 };
30 void <div>{children}</div>;
31 expect(console.error.calls.length).toBe(1);
@@ -35,7 +35,7 @@ describe('ReactFragment', function() {
35 // Only warn once for the same set of children
36 var sameChildren = {
37 x: <span />,
38 - y: <span />
38 + y: <span />,
39 };
40 void <div>{sameChildren}</div>;
41 expect(console.error.calls.length).toBe(1);
@@ -46,7 +46,7 @@ describe('ReactFragment', function() {
46 var children = {
47 x: <span />,
48 y: <span />,
49 - z: <span />
49 + z: <span />,
50 };
51 var element = <div>{[children]}</div>;
52 expect(console.error.calls.length).toBe(0);
@@ -62,7 +62,7 @@ describe('ReactFragment', function() {
62 spyOn(console, 'error');
63 var children = {
64 x: <span />,
65 - y: <span />
65 + y: <span />,
66 };
67 var frag = ReactFragment.create(children);
68 void frag.x;
src/addons/__tests__/renderSubtreeIntoContainer.js
+10 -10
@@ -23,22 +23,22 @@ describe('renderSubtreeIntoContainer', function() {
23
24 var Component = React.createClass({
25 contextTypes: {
26 - foo: React.PropTypes.string.isRequired
26 + foo: React.PropTypes.string.isRequired,
27 },
28
29 render: function() {
30 return <div>{this.context.foo}</div>;
31 - }
31 + },
32 });
33
34 var Parent = React.createClass({
35 childContextTypes: {
36 - foo: React.PropTypes.string.isRequired
36 + foo: React.PropTypes.string.isRequired,
37 },
38
39 getChildContext: function() {
40 return {
41 - foo: 'bar'
41 + foo: 'bar',
42 };
43 },
44
@@ -50,7 +50,7 @@ describe('renderSubtreeIntoContainer', function() {
50 expect(function() {
51 renderSubtreeIntoContainer(this, <Component />, portal);
52 }.bind(this)).not.toThrow();
53 - }
53 + },
54 });
55
56 ReactTestUtils.renderIntoDocument(<Parent />);
@@ -62,22 +62,22 @@ describe('renderSubtreeIntoContainer', function() {
62
63 var Component = React.createClass({
64 contextTypes: {
65 - foo: React.PropTypes.string.isRequired
65 + foo: React.PropTypes.string.isRequired,
66 },
67
68 render: function() {
69 return <div>{this.context.foo}</div>;
70 - }
70 + },
71 });
72
73 var Parent = React.createClass({
74 childContextTypes: {
75 - foo: React.PropTypes.string.isRequired
75 + foo: React.PropTypes.string.isRequired,
76 },
77
78 getChildContext: function() {
79 return {
80 - foo: 'bar'
80 + foo: 'bar',
81 };
82 },
83
@@ -90,7 +90,7 @@ describe('renderSubtreeIntoContainer', function() {
90 renderSubtreeIntoContainer(<Parent />, <Component />, portal);
91 }).toThrow('Invariant Violation: parentComponent' +
92 'must be a valid React Component');
93 - }
93 + },
94 });
95 });
96 });
src/addons/__tests__/update-test.js
+2 -2
@@ -82,7 +82,7 @@ describe('update', function() {
82 it('should support deep updates', function() {
83 expect(update({a: 'b', c: {d: 'e'}}, {c: {d: {$set: 'f'}}})).toEqual({
84 a: 'b',
85 - c: {d: 'f'}
85 + c: {d: 'f'},
86 });
87 });
88
@@ -96,7 +96,7 @@ describe('update', function() {
96
97 it('should perform safe hasOwnProperty check', function() {
98 expect(update({}, {'hasOwnProperty': {$set: 'a'}})).toEqual({
99 - 'hasOwnProperty': 'a'
99 + 'hasOwnProperty': 'a',
100 });
101 });
102 });
src/addons/link/LinkedStateMixin.js
+1 -1
@@ -33,7 +33,7 @@ var LinkedStateMixin = {
33 this.state[key],
34 ReactStateSetters.createStateKeySetter(this, key)
35 );
36 - }
36 + },
37 };
38
39 module.exports = LinkedStateMixin;
src/addons/link/ReactLink.js
+2 -2
@@ -59,13 +59,13 @@ function createLinkTypeChecker(linkType) {
59 value: typeof linkType === 'undefined' ?
60 React.PropTypes.any.isRequired :
61 linkType.isRequired,
62 - requestChange: React.PropTypes.func.isRequired
62 + requestChange: React.PropTypes.func.isRequired,
63 };
64 return React.PropTypes.shape(shapes);
65 }
66
67 ReactLink.PropTypes = {
68 - link: createLinkTypeChecker
68 + link: createLinkTypeChecker,
69 };
70
71 module.exports = ReactLink;
src/addons/link/__tests__/LinkedStateMixin-test.js
+1 -1
@@ -34,7 +34,7 @@ describe('LinkedStateMixin', function() {
34
35 render: function() {
36 return <span>value is {this.state.value}</span>;
37 - }
37 + },
38 });
39 var component = ReactTestUtils.renderIntoDocument(<Component />);
40 var link = component.linkState('value');
src/addons/link/__tests__/ReactLinkPropTypes-test.js
+1 -1
@@ -74,7 +74,7 @@ describe('ReactLink', function() {
74 );
75 typeCheckPass(
76 LinkPropTypes.link(),
77 - {value: {}, requestChange: emptyFunction
77 + {value: {}, requestChange: emptyFunction,
78 });
79 });
80
src/addons/transitions/ReactCSSTransitionGroup.js
+4 -4
@@ -30,14 +30,14 @@ var ReactCSSTransitionGroup = React.createClass({
30 transitionName: React.PropTypes.string.isRequired,
31 transitionAppear: React.PropTypes.bool,
32 transitionEnter: React.PropTypes.bool,
33 - transitionLeave: React.PropTypes.bool
33 + transitionLeave: React.PropTypes.bool,
34 },
35
36 getDefaultProps: function() {
37 return {
38 transitionAppear: false,
39 transitionEnter: true,
40 - transitionLeave: true
40 + transitionLeave: true,
41 };
42 },
43
@@ -50,7 +50,7 @@ var ReactCSSTransitionGroup = React.createClass({
50 name: this.props.transitionName,
51 appear: this.props.transitionAppear,
52 enter: this.props.transitionEnter,
53 - leave: this.props.transitionLeave
53 + leave: this.props.transitionLeave,
54 },
55 child
56 );
@@ -62,7 +62,7 @@ var ReactCSSTransitionGroup = React.createClass({
62 assign({}, this.props, {childFactory: this._wrapChild})
63 )
64 );
65 - }
65 + },
66 });
67
68 module.exports = ReactCSSTransitionGroup;
src/addons/transitions/ReactCSSTransitionGroupChild.js
+1 -1
@@ -138,7 +138,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
138
139 render: function() {
140 return onlyChild(this.props.children);
141 - }
141 + },
142 });
143
144 module.exports = ReactCSSTransitionGroupChild;
src/addons/transitions/ReactTransitionChildMapping.js
+1 -1
@@ -97,7 +97,7 @@ var ReactTransitionChildMapping = {
97 }
98
99 return childMapping;
100 - }
100 + },
101 };
102
103 module.exports = ReactTransitionChildMapping;
src/addons/transitions/ReactTransitionEvents.js
+4 -4
@@ -24,7 +24,7 @@ var EVENT_NAME_MAP = {
24 'WebkitTransition': 'webkitTransitionEnd',
25 'MozTransition': 'mozTransitionEnd',
26 'OTransition': 'oTransitionEnd',
27 - 'msTransition': 'MSTransitionEnd'
27 + 'msTransition': 'MSTransitionEnd',
28 },
29
30 animationend: {
@@ -32,8 +32,8 @@ var EVENT_NAME_MAP = {
32 'WebkitAnimation': 'webkitAnimationEnd',
33 'MozAnimation': 'mozAnimationEnd',
34 'OAnimation': 'oAnimationEnd',
35 - 'msAnimation': 'MSAnimationEnd'
36 - }
35 + 'msAnimation': 'MSAnimationEnd',
36 + },
37 };
38
39 var endEvents = [];
@@ -103,7 +103,7 @@ var ReactTransitionEvents = {
103 endEvents.forEach(function(endEvent) {
104 removeEventListener(node, endEvent, eventListener);
105 });
106 - }
106 + },
107 };
108
109 module.exports = ReactTransitionEvents;
src/addons/transitions/ReactTransitionGroup.js
+5 -5
@@ -23,19 +23,19 @@ var ReactTransitionGroup = React.createClass({
23
24 propTypes: {
25 component: React.PropTypes.any,
26 - childFactory: React.PropTypes.func
26 + childFactory: React.PropTypes.func,
27 },
28
29 getDefaultProps: function() {
30 return {
31 component: 'span',
32 - childFactory: emptyFunction.thatReturnsArgument
32 + childFactory: emptyFunction.thatReturnsArgument,
33 };
34 },
35
36 getInitialState: function() {
37 return {
38 - children: ReactTransitionChildMapping.getChildMapping(this.props.children)
38 + children: ReactTransitionChildMapping.getChildMapping(this.props.children),
39 };
40 },
41
@@ -64,7 +64,7 @@ var ReactTransitionGroup = React.createClass({
64 children: ReactTransitionChildMapping.mergeChildMappings(
65 prevChildMapping,
66 nextChildMapping
67 - )
67 + ),
68 });
69
70 var key;
@@ -224,7 +224,7 @@ var ReactTransitionGroup = React.createClass({
224 this.props,
225 childrenToRender
226 );
227 - }
227 + },
228 });
229
230 module.exports = ReactTransitionGroup;
src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
+17 -17
@@ -30,24 +30,24 @@ describe('ReactTransitionChildMapping', function() {
30 ReactTransitionChildMapping.getChildMapping(component.props.children)
31 ).toEqual({
32 '.$one': one,
33 - '.$two': two
33 + '.$two': two,
34 });
35 });
36
37 it('should support mergeChildMappings for adding keys', function() {
38 var prev = {
39 one: true,
40 - two: true
40 + two: true,
41 };
42 var next = {
43 one: true,
44 two: true,
45 - three: true
45 + three: true,
46 };
47 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
48 one: true,
49 two: true,
50 - three: true
50 + three: true,
51 });
52 });
53
@@ -55,16 +55,16 @@ describe('ReactTransitionChildMapping', function() {
55 var prev = {
56 one: true,
57 two: true,
58 - three: true
58 + three: true,
59 };
60 var next = {
61 one: true,
62 - two: true
62 + two: true,
63 };
64 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
65 one: true,
66 two: true,
67 - three: true
67 + three: true,
68 });
69 });
70
@@ -72,18 +72,18 @@ describe('ReactTransitionChildMapping', function() {
72 var prev = {
73 one: true,
74 two: true,
75 - three: true
75 + three: true,
76 };
77 var next = {
78 one: true,
79 two: true,
80 - four: true
80 + four: true,
81 };
82 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
83 one: true,
84 two: true,
85 three: true,
86 - four: true
86 + four: true,
87 });
88 });
89
@@ -92,46 +92,46 @@ describe('ReactTransitionChildMapping', function() {
92 one: true,
93 two: true,
94 four: true,
95 - five: true
95 + five: true,
96 };
97 var next = {
98 one: true,
99 two: true,
100 three: true,
101 - five: true
101 + five: true,
102 };
103 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
104 one: true,
105 two: true,
106 three: true,
107 four: true,
108 - five: true
108 + five: true,
109 });
110 });
111
112 it('should support mergeChildMappings with undefined input', function() {
113 var prev = {
114 one: true,
115 - two: true
115 + two: true,
116 };
117
118 var next = undefined;
119
120 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
121 one: true,
122 - two: true
122 + two: true,
123 });
124
125 prev = undefined;
126
127 next = {
128 three: true,
129 - four: true
129 + four: true,
130 };
131
132 expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
133 three: true,
134 - four: true
134 + four: true,
135 });
136 });
137 });
src/addons/transitions/__tests__/ReactTransitionGroup-test.js
+12 -12
@@ -60,7 +60,7 @@ describe('ReactTransitionGroup', function() {
60 },
61 render: function() {
62 return <span />;
63 - }
63 + },
64 });
65
66 var Component = React.createClass({
@@ -73,7 +73,7 @@ describe('ReactTransitionGroup', function() {
73 children.push(<Child key={i} />);
74 }
75 return <ReactTransitionGroup>{children}</ReactTransitionGroup>;
76 - }
76 + },
77 });
78
79 var instance = React.render(<Component />, container);
@@ -117,7 +117,7 @@ describe('ReactTransitionGroup', function() {
117 },
118 render: function() {
119 return <span />;
120 - }
120 + },
121 });
122
123 var Component = React.createClass({
@@ -130,7 +130,7 @@ describe('ReactTransitionGroup', function() {
130 children.push(<Child key={i} />);
131 }
132 return <ReactTransitionGroup>{children}</ReactTransitionGroup>;
133 - }
133 + },
134 });
135
136 var instance = React.render(<Component />, container);
@@ -146,7 +146,7 @@ describe('ReactTransitionGroup', function() {
146 willEnterCb();
147 expect(log).toEqual([
148 'didMount', 'didMount', 'willEnter',
149 - 'didEnter', 'willLeave', 'didLeave', 'willUnmount'
149 + 'didEnter', 'willLeave', 'didLeave', 'willUnmount',
150 ]);
151 });
152
@@ -177,7 +177,7 @@ describe('ReactTransitionGroup', function() {
177 },
178 render: function() {
179 return <span />;
180 - }
180 + },
181 });
182
183 var Component = React.createClass({
@@ -190,7 +190,7 @@ describe('ReactTransitionGroup', function() {
190 children.push(<Child key={i} />);
191 }
192 return <ReactTransitionGroup>{children}</ReactTransitionGroup>;
193 - }
193 + },
194 });
195
196 var instance = React.render(<Component />, container);
@@ -204,7 +204,7 @@ describe('ReactTransitionGroup', function() {
204 }
205 willEnterCb();
206 expect(log).toEqual([
207 - 'didMount', 'didMount', 'willEnter', 'didEnter'
207 + 'didMount', 'didMount', 'willEnter', 'didEnter',
208 ]);
209 });
210
@@ -234,7 +234,7 @@ describe('ReactTransitionGroup', function() {
234 },
235 render: function() {
236 return <span />;
237 - }
237 + },
238 });
239
240 var Component = React.createClass({
@@ -247,7 +247,7 @@ describe('ReactTransitionGroup', function() {
247 children.push(<Child key={i} id={i} />);
248 }
249 return <ReactTransitionGroup>{children}</ReactTransitionGroup>;
250 - }
250 + },
251 });
252
253 var instance = React.render(<Component />, container);
@@ -257,14 +257,14 @@ describe('ReactTransitionGroup', function() {
257 instance.setState({count: 3});
258 expect(log).toEqual([
259 'didMount1', 'didMount2', 'willEnter1', 'didEnter1',
260 - 'willEnter2', 'didEnter2'
260 + 'willEnter2', 'didEnter2',
261 ]);
262 log = [];
263
264 instance.setState({count: 0});
265 expect(log).toEqual([
266 'willLeave0', 'didLeave0', 'willLeave1', 'didLeave1',
267 - 'willLeave2', 'didLeave2', 'willUnmount0', 'willUnmount1', 'willUnmount2'
267 + 'willLeave2', 'didLeave2', 'willUnmount0', 'willUnmount1', 'willUnmount2',
268 ]);
269 });
270 });
src/addons/update.js
+1 -1
@@ -41,7 +41,7 @@ var ALL_COMMANDS_LIST = [
41 COMMAND_SPLICE,
42 COMMAND_SET,
43 COMMAND_MERGE,
44 - COMMAND_APPLY
44 + COMMAND_APPLY,
45 ];
46
47 var ALL_COMMANDS_SET = {};
src/isomorphic/ReactIsomorphic.js
+2 -2
@@ -40,7 +40,7 @@ var React = {
40 map: ReactChildren.map,
41 forEach: ReactChildren.forEach,
42 count: ReactChildren.count,
43 - only: onlyChild
43 + only: onlyChild,
44 },
45
46 Component: ReactComponent,
@@ -64,7 +64,7 @@ var React = {
64 DOM: ReactDOM,
65
66 // Hook for JSX spread, don't use this for anything else.
67 - __spread: assign
67 + __spread: assign,
68 };
69
70 module.exports = React;
src/isomorphic/children/ReactChildren.js
+1 -1
@@ -144,7 +144,7 @@ function countChildren(children, context) {
144 var ReactChildren = {
145 forEach: forEachChildren,
146 map: mapChildren,
147 - count: countChildren
147 + count: countChildren,
148 };
149
150 module.exports = ReactChildren;
src/isomorphic/children/__tests__/ReactChildren-test.js
+18 -14
@@ -171,7 +171,7 @@ describe('ReactChildren', function() {
171 keyOfNthChild(mappedChildren, 1),
172 keyOfNthChild(mappedChildren, 2),
173 keyOfNthChild(mappedChildren, 3),
174 - keyOfNthChild(mappedChildren, 4)
174 + keyOfNthChild(mappedChildren, 4),
175 ]).toEqual(
176 ['.$keyZero', '.1', '.$keyTwo', '.3', '.$keyFour']
177 );
@@ -223,11 +223,13 @@ describe('ReactChildren', function() {
223
224 var instance = (
225 <div>{
226 - [ReactFragment.create({
227 - firstHalfKey: [zero, one, two],
228 - secondHalfKey: [three, four],
229 - keyFive: five
230 - })]
226 + [
227 + ReactFragment.create({
228 + firstHalfKey: [zero, one, two],
229 + secondHalfKey: [three, four],
230 + keyFive: five,
231 + }),
232 + ]
233 }</div>
234 );
235
@@ -250,14 +252,14 @@ describe('ReactChildren', function() {
252 keyOfNthChild(mappedChildren, 2),
253 keyOfNthChild(mappedChildren, 3),
254 keyOfNthChild(mappedChildren, 4),
253 - keyOfNthChild(mappedChildren, 5)
255 + keyOfNthChild(mappedChildren, 5),
256 ]).toEqual([
257 '.0:$firstHalfKey:0:$keyZero',
258 '.0:$firstHalfKey:0:1',
259 '.0:$firstHalfKey:0:$keyTwo',
260 '.0:$secondHalfKey:0:0',
261 '.0:$secondHalfKey:0:$keyFour',
260 - '.0:$keyFive:$keyFiveInner'
262 + '.0:$keyFive:$keyFiveInner',
263 ]);
264
265 expect(callback).toHaveBeenCalledWith(zero, 0);
@@ -307,7 +309,7 @@ describe('ReactChildren', function() {
309
310 var expectedRemappedForcedKeys = [
311 '.$=1$keyZero:$giraffe',
310 - '.$=1$keyOne:0'
312 + '.$=1$keyOne:0',
313 ];
314 var remappedChildrenForcedKeys =
315 ReactChildren.map(mappedChildrenForcedKeys, mapFn);
@@ -408,11 +410,13 @@ describe('ReactChildren', function() {
410
411 var instance = (
412 <div>{
411 - [ReactFragment.create({
412 - firstHalfKey: [zero, one, two],
413 - secondHalfKey: [three, four],
414 - keyFive: five
415 - })]
413 + [
414 + ReactFragment.create({
415 + firstHalfKey: [zero, one, two],
416 + secondHalfKey: [three, four],
417 + keyFive: five,
418 + }),
419 + ]
420 }</div>
421 );
422 var numberOfChildren = ReactChildren.count(instance.props.children);
src/isomorphic/children/__tests__/onlyChild-test.js
+1 -1
@@ -29,7 +29,7 @@ describe('onlyChild', function() {
29 {onlyChild(this.props.children, this.props.mapFn, this)}
30 </div>
31 );
32 - }
32 + },
33 });
34 });
35
src/isomorphic/children/__tests__/sliceChildren-test.js
+8 -8
@@ -41,7 +41,7 @@ describe('sliceChildren', function() {
41 )}
42 </div>
43 );
44 - }
44 + },
45 });
46 });
47
@@ -63,13 +63,13 @@ describe('sliceChildren', function() {
63 var fullSet = [
64 <div key="A" />,
65 <div key="B" />,
66 - <div key="C" />
66 + <div key="C" />,
67 ];
68 var children = renderAndSlice(fullSet, 0);
69 testKeyValuePairs(children, {
70 '.$A': fullSet[0],
71 '.$B': fullSet[1],
72 - '.$C': fullSet[2]
72 + '.$C': fullSet[2],
73 });
74 });
75
@@ -77,12 +77,12 @@ describe('sliceChildren', function() {
77 var fullSet = [
78 <div key="A" />,
79 <div key="B" />,
80 - <div key="C" />
80 + <div key="C" />,
81 ];
82 var children = renderAndSlice(fullSet, 1);
83 testKeyValuePairs(children, {
84 '.$B': fullSet[1],
85 - '.$C': fullSet[2]
85 + '.$C': fullSet[2],
86 });
87 });
88
@@ -91,11 +91,11 @@ describe('sliceChildren', function() {
91 <div key="A" />,
92 <div key="B" />,
93 <div key="C" />,
94 - <div key="D" />
94 + <div key="D" />,
95 ];
96 var children = renderAndSlice(fullSet, 1, 2);
97 testKeyValuePairs(children, {
98 - '.$B': fullSet[1]
98 + '.$B': fullSet[1],
99 });
100 });
101
@@ -111,7 +111,7 @@ describe('sliceChildren', function() {
111 .instance();
112
113 testKeyValuePairs(rendered.props.children, {
114 - '.1': b
114 + '.1': b,
115 });
116 });
117
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
+20 -20
@@ -39,30 +39,30 @@ describe('ReactContextValidator', function() {
39 it('should filter out context not in contextTypes', function() {
40 var Component = React.createClass({
41 contextTypes: {
42 - foo: React.PropTypes.string
42 + foo: React.PropTypes.string,
43 },
44
45 render: function() {
46 return <div />;
47 - }
47 + },
48 });
49
50 var ComponentInFooBarContext = React.createClass({
51 childContextTypes: {
52 foo: React.PropTypes.string,
53 - bar: React.PropTypes.number
53 + bar: React.PropTypes.number,
54 },
55
56 getChildContext: function() {
57 return {
58 foo: 'abc',
59 - bar: 123
59 + bar: 123,
60 };
61 },
62
63 render: function() {
64 return <Component />;
65 - }
65 + },
66 });
67
68 var instance = ReactTestUtils.renderIntoDocument(<ComponentInFooBarContext />);
@@ -78,24 +78,24 @@ describe('ReactContextValidator', function() {
78 var Parent = React.createClass({
79 childContextTypes: {
80 foo: React.PropTypes.string.isRequired,
81 - bar: React.PropTypes.string.isRequired
81 + bar: React.PropTypes.string.isRequired,
82 },
83
84 getChildContext: function() {
85 return {
86 foo: this.props.foo,
87 - bar: 'bar'
87 + bar: 'bar',
88 };
89 },
90
91 render: function() {
92 return <Component />;
93 - }
93 + },
94 });
95
96 var Component = React.createClass({
97 contextTypes: {
98 - foo: React.PropTypes.string
98 + foo: React.PropTypes.string,
99 },
100
101 componentWillReceiveProps: function(nextProps, nextContext) {
@@ -118,7 +118,7 @@ describe('ReactContextValidator', function() {
118
119 render: function() {
120 return <div />;
121 - }
121 + },
122 });
123
124 var instance = <Parent foo="abc" />;
@@ -133,12 +133,12 @@ describe('ReactContextValidator', function() {
133 it('should check context types', function() {
134 var Component = React.createClass({
135 contextTypes: {
136 - foo: React.PropTypes.string.isRequired
136 + foo: React.PropTypes.string.isRequired,
137 },
138
139 render: function() {
140 return <div />;
141 - }
141 + },
142 });
143
144 ReactTestUtils.renderIntoDocument(<Component />);
@@ -151,18 +151,18 @@ describe('ReactContextValidator', function() {
151
152 var ComponentInFooStringContext = React.createClass({
153 childContextTypes: {
154 - foo: React.PropTypes.string
154 + foo: React.PropTypes.string,
155 },
156
157 getChildContext: function() {
158 return {
159 - foo: this.props.fooValue
159 + foo: this.props.fooValue,
160 };
161 },
162
163 render: function() {
164 return <Component />;
165 - }
165 + },
166 });
167
168 ReactTestUtils.renderIntoDocument(
@@ -174,18 +174,18 @@ describe('ReactContextValidator', function() {
174
175 var ComponentInFooNumberContext = React.createClass({
176 childContextTypes: {
177 - foo: React.PropTypes.number
177 + foo: React.PropTypes.number,
178 },
179
180 getChildContext: function() {
181 return {
182 - foo: this.props.fooValue
182 + foo: this.props.fooValue,
183 };
184 },
185
186 render: function() {
187 return <Component />;
188 - }
188 + },
189 });
190
191 ReactTestUtils.renderIntoDocument(<ComponentInFooNumberContext fooValue={123} />);
@@ -203,7 +203,7 @@ describe('ReactContextValidator', function() {
203 var Component = React.createClass({
204 childContextTypes: {
205 foo: React.PropTypes.string.isRequired,
206 - bar: React.PropTypes.number
206 + bar: React.PropTypes.number,
207 },
208
209 getChildContext: function() {
@@ -212,7 +212,7 @@ describe('ReactContextValidator', function() {
212
213 render: function() {
214 return <div />;
215 - }
215 + },
216 });
217
218 ReactTestUtils.renderIntoDocument(<Component testContext={{bar: 123}} />);
src/isomorphic/classic/class/ReactClass.js
+6 -6
@@ -51,7 +51,7 @@ var SpecPolicy = keyMirror({
51 * objects. We try to merge the keys of the return values of all the mixed in
52 * functions. If there is a key conflict we throw.
53 */
54 - DEFINE_MANY_MERGED: null
54 + DEFINE_MANY_MERGED: null,
55 });
56
57
@@ -302,7 +302,7 @@ var ReactClassInterface = {
302 * @internal
303 * @overridable
304 */
305 - updateComponent: SpecPolicy.OVERRIDE_BASE
305 + updateComponent: SpecPolicy.OVERRIDE_BASE,
306
307 };
308
@@ -384,7 +384,7 @@ var RESERVED_SPEC_KEYS = {
384 },
385 statics: function(Constructor, statics) {
386 mixStaticSpecIntoComponent(Constructor, statics);
387 - }
387 + },
388 };
389
390 function validateTypeDef(Constructor, typeDef, location) {
@@ -781,7 +781,7 @@ var ReactClassMixin = {
781 if (callback) {
782 ReactUpdateQueue.enqueueCallback(this, callback);
783 }
784 - }
784 + },
785 };
786
787 var ReactClassComponent = function() {};
@@ -904,8 +904,8 @@ var ReactClass = {
904 injection: {
905 injectMixin: function(mixin) {
906 injectedMixins.push(mixin);
907 - }
908 - }
907 + },
908 + },
909
910 };
911
src/isomorphic/classic/class/__tests__/ReactBind-test.js
+6 -6
@@ -37,7 +37,7 @@ describe('autobinding', function() {
37 badIdeas: {
38 badBind: function() {
39 void this.state.something;
40 - }
40 + },
41 },
42
43 render: function() {
@@ -48,7 +48,7 @@ describe('autobinding', function() {
48 onClick={this.onClick}
49 />
50 );
51 - }
51 + },
52 });
53
54 var instance1 = <TestBindComponent />;
@@ -99,7 +99,7 @@ describe('autobinding', function() {
99 var mouseDidClick = mocks.getMockFunction();
100
101 var TestMixin = {
102 - onClick: mouseDidClick
102 + onClick: mouseDidClick,
103 };
104
105 var TestBindComponent = React.createClass({
@@ -107,7 +107,7 @@ describe('autobinding', function() {
107
108 render: function() {
109 return <div onClick={this.onClick} />;
110 - }
110 + },
111 });
112
113 var instance1 = <TestBindComponent />;
@@ -128,7 +128,7 @@ describe('autobinding', function() {
128 handleClick: function() { },
129 render: function() {
130 return <div onClick={this.handleClick.bind(this)} />;
131 - }
131 + },
132 });
133
134 ReactTestUtils.renderIntoDocument(<TestBindComponent />);
@@ -156,7 +156,7 @@ describe('autobinding', function() {
156 },
157 render: function() {
158 return <div onClick={this.handleClick} />;
159 - }
159 + },
160 });
161
162 ReactTestUtils.renderIntoDocument(<TestBindComponent />);
src/isomorphic/classic/class/__tests__/ReactClass-test.js
+30 -30
@@ -37,7 +37,7 @@ describe('ReactClass-spec', function() {
37 var TestComponent = React.createClass({
38 render: function() {
39 return <div />;
40 - }
40 + },
41 });
42
43 expect(TestComponent.displayName)
@@ -48,11 +48,11 @@ describe('ReactClass-spec', function() {
48 var propValidator = mocks.getMockFunction();
49 var TestComponent = React.createClass({
50 propTypes: {
51 - value: propValidator
51 + value: propValidator,
52 },
53 render: function() {
54 return <div />;
55 - }
55 + },
56 });
57
58 expect(TestComponent.propTypes).toBeDefined();
@@ -68,11 +68,11 @@ describe('ReactClass-spec', function() {
68 React.createClass({
69 displayName: 'Component',
70 propTypes: {
71 - prop: null
71 + prop: null,
72 },
73 render: function() {
74 return <span>{this.props.prop}</span>;
75 - }
75 + },
76 });
77 expect(console.error.mock.calls.length).toBe(1);
78 expect(console.error.mock.calls[0][0]).toBe(
@@ -91,11 +91,11 @@ describe('ReactClass-spec', function() {
91 React.createClass({
92 displayName: 'Component',
93 contextTypes: {
94 - prop: null
94 + prop: null,
95 },
96 render: function() {
97 return <span>{this.props.prop}</span>;
98 - }
98 + },
99 });
100 expect(console.error.mock.calls.length).toBe(1);
101 expect(console.error.mock.calls[0][0]).toBe(
@@ -114,11 +114,11 @@ describe('ReactClass-spec', function() {
114 React.createClass({
115 displayName: 'Component',
116 childContextTypes: {
117 - prop: null
117 + prop: null,
118 },
119 render: function() {
120 return <span>{this.props.prop}</span>;
121 - }
121 + },
122 });
123 expect(console.error.mock.calls.length).toBe(1);
124 expect(console.error.mock.calls[0][0]).toBe(
@@ -137,7 +137,7 @@ describe('ReactClass-spec', function() {
137 },
138 render: function() {
139 return <div />;
140 - }
140 + },
141 });
142 expect(console.error.argsForCall.length).toBe(1);
143 expect(console.error.argsForCall[0][0]).toBe(
@@ -153,7 +153,7 @@ describe('ReactClass-spec', function() {
153 },
154 render: function() {
155 return <div />;
156 - }
156 + },
157 });
158 expect(console.error.argsForCall.length).toBe(2);
159 expect(console.error.argsForCall[1][0]).toBe(
@@ -169,14 +169,14 @@ describe('ReactClass-spec', function() {
169 statics: {
170 getDefaultProps: function() {
171 return {
172 - foo: 0
172 + foo: 0,
173 };
174 - }
174 + },
175 },
176
177 render: function() {
178 return <span />;
179 - }
179 + },
180 });
181 }).toThrow(
182 'Invariant Violation: ReactClass: You are attempting to ' +
@@ -192,17 +192,17 @@ describe('ReactClass-spec', function() {
192 React.createClass({
193 mixins: [{}],
194 propTypes: {
195 - foo: React.PropTypes.string
195 + foo: React.PropTypes.string,
196 },
197 contextTypes: {
198 - foo: React.PropTypes.string
198 + foo: React.PropTypes.string,
199 },
200 childContextTypes: {
201 - foo: React.PropTypes.string
201 + foo: React.PropTypes.string,
202 },
203 render: function() {
204 return <div />;
205 - }
205 + },
206 });
207 expect(console.error.argsForCall.length).toBe(4);
208 expect(console.error.argsForCall[0][0]).toBe(
@@ -232,12 +232,12 @@ describe('ReactClass-spec', function() {
232 jkl: 'mno',
233 pqr: function() {
234 return this;
235 - }
235 + },
236 },
237
238 render: function() {
239 return <span />;
240 - }
240 + },
241 });
242 var instance = <Component />;
243 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -257,12 +257,12 @@ describe('ReactClass-spec', function() {
257 var Component = React.createClass({
258 getInitialState: function() {
259 return {
260 - occupation: 'clown'
260 + occupation: 'clown',
261 };
262 },
263 render: function() {
264 return <span />;
265 - }
265 + },
266 });
267 var instance = <Component />;
268 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -272,26 +272,26 @@ describe('ReactClass-spec', function() {
272 it('renders based on context getInitialState', function() {
273 var Foo = React.createClass({
274 contextTypes: {
275 - className: React.PropTypes.string
275 + className: React.PropTypes.string,
276 },
277 getInitialState() {
278 return {className: this.context.className};
279 },
280 render() {
281 return <span className={this.state.className} />;
282 - }
282 + },
283 });
284
285 var Outer = React.createClass({
286 childContextTypes: {
287 - className: React.PropTypes.string
287 + className: React.PropTypes.string,
288 },
289 getChildContext() {
290 return {className: 'foo'};
291 },
292 render() {
293 return <Foo />;
294 - }
294 + },
295 });
296
297 var container = document.createElement('div');
@@ -307,7 +307,7 @@ describe('ReactClass-spec', function() {
307 },
308 render: function() {
309 return <span />;
310 - }
310 + },
311 });
312 var instance = <Component />;
313 expect(function() {
@@ -326,7 +326,7 @@ describe('ReactClass-spec', function() {
326 },
327 render: function() {
328 return <span />;
329 - }
329 + },
330 });
331 expect(
332 () => ReactTestUtils.renderIntoDocument(<Component />)
@@ -337,7 +337,7 @@ describe('ReactClass-spec', function() {
337 var Component = React.createClass({
338 render() {
339 return <div />;
340 - }
340 + },
341 });
342
343 expect(() => Component()).toThrow();
@@ -352,7 +352,7 @@ describe('ReactClass-spec', function() {
352 var MyComponent = React.createClass({
353 render: function() {
354 return <div />;
355 - }
355 + },
356 });
357
358 var container = document.createElement('div');
src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js
+47 -47
@@ -32,59 +32,59 @@ describe('ReactClass-mixin', function() {
32
33 var MixinA = {
34 propTypes: {
35 - propA: function() {}
35 + propA: function() {},
36 },
37 componentDidMount: function() {
38 this.props.listener('MixinA didMount');
39 - }
39 + },
40 };
41
42 var MixinB = {
43 mixins: [MixinA],
44 propTypes: {
45 - propB: function() {}
45 + propB: function() {},
46 },
47 componentDidMount: function() {
48 this.props.listener('MixinB didMount');
49 - }
49 + },
50 };
51
52 var MixinBWithReverseSpec = {
53 componentDidMount: function() {
54 this.props.listener('MixinBWithReverseSpec didMount');
55 },
56 - mixins: [MixinA]
56 + mixins: [MixinA],
57 };
58
59 var MixinC = {
60 statics: {
61 - staticC: function() {}
61 + staticC: function() {},
62 },
63 componentDidMount: function() {
64 this.props.listener('MixinC didMount');
65 - }
65 + },
66 };
67
68 var MixinD = {
69 propTypes: {
70 - value: mixinPropValidator
71 - }
70 + value: mixinPropValidator,
71 + },
72 };
73
74 TestComponent = React.createClass({
75 mixins: [MixinB, MixinC, MixinD],
76 statics: {
77 - staticComponent: function() {}
77 + staticComponent: function() {},
78 },
79 propTypes: {
80 - propComponent: function() {}
80 + propComponent: function() {},
81 },
82 componentDidMount: function() {
83 this.props.listener('Component didMount');
84 },
85 render: function() {
86 return <div />;
87 - }
87 + },
88 });
89
90 TestComponentWithReverseSpec = React.createClass({
@@ -94,17 +94,17 @@ describe('ReactClass-mixin', function() {
94 componentDidMount: function() {
95 this.props.listener('Component didMount');
96 },
97 - mixins: [MixinBWithReverseSpec, MixinC, MixinD]
97 + mixins: [MixinBWithReverseSpec, MixinC, MixinD],
98 });
99
100 TestComponentWithPropTypes = React.createClass({
101 mixins: [MixinD],
102 propTypes: {
103 - value: componentPropValidator
103 + value: componentPropValidator,
104 },
105 render: function() {
106 return <div />;
107 - }
107 + },
108 });
109 });
110
@@ -132,7 +132,7 @@ describe('ReactClass-mixin', function() {
132 ['MixinA didMount'],
133 ['MixinB didMount'],
134 ['MixinC didMount'],
135 - ['Component didMount']
135 + ['Component didMount'],
136 ]);
137 });
138
@@ -145,7 +145,7 @@ describe('ReactClass-mixin', function() {
145 ['MixinA didMount'],
146 ['MixinBWithReverseSpec didMount'],
147 ['MixinC didMount'],
148 - ['Component didMount']
148 + ['Component didMount'],
149 ]);
150 });
151
@@ -172,7 +172,7 @@ describe('ReactClass-mixin', function() {
172 var Mixin = {
173 getInitialState: function() {
174 return {mixin: true};
175 - }
175 + },
176 };
177 var Component = React.createClass({
178 mixins: [Mixin],
@@ -181,7 +181,7 @@ describe('ReactClass-mixin', function() {
181 },
182 render: function() {
183 return <span />;
184 - }
184 + },
185 });
186 var instance = <Component />;
187 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -193,7 +193,7 @@ describe('ReactClass-mixin', function() {
193 var Mixin = {
194 getInitialState: function() {
195 return {x: true};
196 - }
196 + },
197 };
198 var Component = React.createClass({
199 mixins: [Mixin],
@@ -202,7 +202,7 @@ describe('ReactClass-mixin', function() {
202 },
203 render: function() {
204 return <span />;
205 - }
205 + },
206 });
207 var instance = <Component />;
208 expect(function() {
@@ -220,7 +220,7 @@ describe('ReactClass-mixin', function() {
220 var Mixin = {
221 getInitialState: function() {
222 return Object.freeze({mixin: true});
223 - }
223 + },
224 };
225 var Component = React.createClass({
226 mixins: [Mixin],
@@ -229,7 +229,7 @@ describe('ReactClass-mixin', function() {
229 },
230 render: function() {
231 return <span />;
232 - }
232 + },
233 });
234 expect(() => {
235 ReactTestUtils.renderIntoDocument(<Component />);
@@ -239,19 +239,19 @@ describe('ReactClass-mixin', function() {
239 it('should support statics in mixins', function() {
240 var Mixin = {
241 statics: {
242 - foo: 'bar'
243 - }
242 + foo: 'bar',
243 + },
244 };
245 var Component = React.createClass({
246 mixins: [Mixin],
247
248 statics: {
249 - abc: 'def'
249 + abc: 'def',
250 },
251
252 render: function() {
253 return <span />;
254 - }
254 + },
255 });
256 var instance = <Component />;
257 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -265,19 +265,19 @@ describe('ReactClass-mixin', function() {
265 expect(function() {
266 var Mixin = {
267 statics: {
268 - abc: 'foo'
269 - }
268 + abc: 'foo',
269 + },
270 };
271 React.createClass({
272 mixins: [Mixin],
273
274 statics: {
275 - abc: 'bar'
275 + abc: 'bar',
276 },
277
278 render: function() {
279 return <span />;
280 - }
280 + },
281 });
282 }).toThrow(
283 'Invariant Violation: ReactClass: You are attempting to ' +
@@ -292,8 +292,8 @@ describe('ReactClass-mixin', function() {
292 statics: {
293 abc: function() {
294 console.log('foo');
295 - }
296 - }
295 + },
296 + },
297 };
298 React.createClass({
299 mixins: [Mixin],
@@ -301,12 +301,12 @@ describe('ReactClass-mixin', function() {
301 statics: {
302 abc: function() {
303 console.log('bar');
304 - }
304 + },
305 },
306
307 render: function() {
308 return <span />;
309 - }
309 + },
310 });
311 }).toThrow(
312 'Invariant Violation: ReactClass: You are attempting to ' +
@@ -322,7 +322,7 @@ describe('ReactClass-mixin', function() {
322
323 render: function() {
324 return <span />;
325 - }
325 + },
326 });
327 }).toThrow(
328 'Invariant Violation: ReactClass: You\'re attempting to ' +
@@ -335,7 +335,7 @@ describe('ReactClass-mixin', function() {
335 var Component = React.createClass({
336 render: function() {
337 return <span />;
338 - }
338 + },
339 });
340
341 React.createClass({
@@ -343,7 +343,7 @@ describe('ReactClass-mixin', function() {
343
344 render: function() {
345 return <span />;
346 - }
346 + },
347 });
348 }).toThrow(
349 'Invariant Violation: ReactClass: You\'re attempting to ' +
@@ -355,7 +355,7 @@ describe('ReactClass-mixin', function() {
355 var mixin = {
356 mixinFunc: function() {
357 return this;
358 - }
358 + },
359 };
360
361 var Component = React.createClass({
@@ -365,7 +365,7 @@ describe('ReactClass-mixin', function() {
365 },
366 render: function() {
367 return <span />;
368 - }
368 + },
369 });
370 var instance = <Component />;
371 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -375,7 +375,7 @@ describe('ReactClass-mixin', function() {
375 function() {
376 var mixin = {
377 keyWithNullValue: null,
378 - randomCounter: 0
378 + randomCounter: 0,
379 };
380
381 var Component = React.createClass({
@@ -386,7 +386,7 @@ describe('ReactClass-mixin', function() {
386 },
387 render: function() {
388 return <span />;
389 - }
389 + },
390 });
391 var instance = <Component />;
392 instance = ReactTestUtils.renderIntoDocument(instance);
@@ -399,7 +399,7 @@ describe('ReactClass-mixin', function() {
399 var Mixin = {
400 getInitialState: function() {
401 return {foo: 'bar'};
402 - }
402 + },
403 };
404 Component = React.createClass({
405 mixins: [Mixin],
@@ -408,7 +408,7 @@ describe('ReactClass-mixin', function() {
408 },
409 render: function() {
410 return <span />;
411 - }
411 + },
412 });
413 expect(
414 () => ReactTestUtils.renderIntoDocument(<Component />)
@@ -422,7 +422,7 @@ describe('ReactClass-mixin', function() {
422 var Mixin2 = {
423 getInitialState: function() {
424 return null;
425 - }
425 + },
426 };
427 Component = React.createClass({
428 mixins: [Mixin2],
@@ -431,7 +431,7 @@ describe('ReactClass-mixin', function() {
431 },
432 render: function() {
433 return <span />;
434 - }
434 + },
435 });
436 expect(
437 () => ReactTestUtils.renderIntoDocument(<Component />)
@@ -449,7 +449,7 @@ describe('ReactClass-mixin', function() {
449 },
450 render: function() {
451 return <span />;
452 - }
452 + },
453 });
454 expect(
455 () => ReactTestUtils.renderIntoDocument(<Component />)
src/isomorphic/classic/element/ReactDOM.js
+1 -1
@@ -169,7 +169,7 @@ var ReactDOM = mapObject({
169 stop: 'stop',
170 svg: 'svg',
171 text: 'text',
172 - tspan: 'tspan'
172 + tspan: 'tspan',
173
174 }, createDOMFactory);
175
src/isomorphic/classic/element/ReactElement.js
+5 -5
@@ -18,7 +18,7 @@ var warning = require('warning');
18
19 var RESERVED_PROPS = {
20 key: true,
21 - ref: true
21 + ref: true,
22 };
23
24 /**
@@ -49,7 +49,7 @@ function defineWarningProperty(object, key) {
49 key
50 );
51 this._store[key] = value;
52 - }
52 + },
53
54 });
55 }
@@ -68,7 +68,7 @@ var useMutationMembrane = false;
68 function defineMutationMembrane(prototype) {
69 try {
70 var pseudoFrozenProperties = {
71 - props: true
71 + props: true,
72 };
73 for (var key in pseudoFrozenProperties) {
74 defineWarningProperty(prototype, key);
@@ -114,7 +114,7 @@ var ReactElement = function(type, key, ref, owner, props) {
114 Object.defineProperty(this._store, 'validated', {
115 configurable: false,
116 enumerable: false,
117 - writable: true
117 + writable: true,
118 });
119 } catch (x) {
120 }
@@ -135,7 +135,7 @@ var ReactElement = function(type, key, ref, owner, props) {
135 // We intentionally don't expose the function on the constructor property.
136 // ReactElement should be indistinguishable from a plain object.
137 ReactElement.prototype = {
138 - _isReactElement: true
138 + _isReactElement: true,
139 };
140
141 if (__DEV__) {
src/isomorphic/classic/element/ReactElementValidator.js
+3 -3
@@ -445,10 +445,10 @@ var ReactElementValidator = {
445 'before passing it to createFactory.'
446 );
447 Object.defineProperty(this, 'type', {
448 - value: type
448 + value: type,
449 });
450 return type;
451 - }
451 + },
452 }
453 );
454 } catch (x) {
@@ -467,7 +467,7 @@ var ReactElementValidator = {
467 }
468 validatePropTypes(newElement);
469 return newElement;
470 - }
470 + },
471
472 };
473
src/isomorphic/classic/element/__tests__/ReactElement-test.js
+17 -17
@@ -28,7 +28,7 @@ describe('ReactElement', function() {
28 ComponentClass = React.createClass({
29 render: function() {
30 return React.createElement('div');
31 - }
31 + },
32 });
33 });
34
@@ -65,7 +65,7 @@ describe('ReactElement', function() {
65 var element = React.createFactory(ComponentClass)({
66 key: '12',
67 ref: '34',
68 - foo: '56'
68 + foo: '56',
69 });
70 expect(element.type).toBe(ComponentClass);
71 expect(element.key).toBe('12');
@@ -76,7 +76,7 @@ describe('ReactElement', function() {
76 it('coerces the key to a string', function() {
77 var element = React.createFactory(ComponentClass)({
78 key: 12,
79 - foo: '56'
79 + foo: '56',
80 });
81 expect(element.type).toBe(ComponentClass);
82 expect(element.key).toBe('12');
@@ -92,7 +92,7 @@ describe('ReactElement', function() {
92 render: function() {
93 element = Component();
94 return element;
95 - }
95 + },
96 });
97
98 var instance = ReactTestUtils.renderIntoDocument(
@@ -106,7 +106,7 @@ describe('ReactElement', function() {
106 spyOn(console, 'error');
107 var a = 1;
108 var element = React.createFactory(ComponentClass)({
109 - children: 'text'
109 + children: 'text',
110 }, a);
111 expect(element.props.children).toBe(a);
112 expect(console.error.argsForCall.length).toBe(0);
@@ -115,7 +115,7 @@ describe('ReactElement', function() {
115 it('does not override children if no rest args are provided', function() {
116 spyOn(console, 'error');
117 var element = React.createFactory(ComponentClass)({
118 - children: 'text'
118 + children: 'text',
119 });
120 expect(element.props.children).toBe('text');
121 expect(console.error.argsForCall.length).toBe(0);
@@ -124,7 +124,7 @@ describe('ReactElement', function() {
124 it('overrides children if null is provided as an argument', function() {
125 spyOn(console, 'error');
126 var element = React.createFactory(ComponentClass)({
127 - children: 'text'
127 + children: 'text',
128 }, null);
129 expect(element.props.children).toBe(null);
130 expect(console.error.argsForCall.length).toBe(0);
@@ -145,14 +145,14 @@ describe('ReactElement', function() {
145 statics: {
146 someStaticMethod: function() {
147 return 'someReturnValue';
148 - }
148 + },
149 },
150 getInitialState: function() {
151 return {valueToReturn: 'hi'};
152 },
153 render: function() {
154 return React.createElement('div');
155 - }
155 + },
156 });
157
158 var element = React.createElement(StaticMethodComponentClass);
@@ -164,7 +164,7 @@ describe('ReactElement', function() {
164 var Component = React.createClass({
165 render: function() {
166 return React.createElement('div');
167 - }
167 + },
168 });
169
170 expect(React.isValidElement(React.createElement('div')))
@@ -187,8 +187,8 @@ describe('ReactElement', function() {
187 var Component = React.createClass({
188 render: () => null,
189 statics: {
190 - specialType: React.PropTypes.shape({monkey: React.PropTypes.any})
191 - }
190 + specialType: React.PropTypes.shape({monkey: React.PropTypes.any}),
191 + },
192 });
193
194 expect(typeof Component.specialType).toBe('function');
@@ -208,7 +208,7 @@ describe('ReactElement', function() {
208 },
209 render: function() {
210 return React.createElement('span');
211 - }
211 + },
212 });
213
214 var container = document.createElement('div');
@@ -229,7 +229,7 @@ describe('ReactElement', function() {
229 },
230 render: function() {
231 return React.createElement('span', null, this.props.prop);
232 - }
232 + },
233 });
234
235 var instance = ReactTestUtils.renderIntoDocument(
@@ -254,7 +254,7 @@ describe('ReactElement', function() {
254 expect(el.props.className).toBe('quack');
255
256 return el;
257 - }
257 + },
258 });
259 var outer = ReactTestUtils.renderIntoDocument(<Outer color="orange" />);
260 expect(React.findDOMNode(outer).className).toBe('quack');
@@ -295,7 +295,7 @@ describe('ReactElement', function() {
295 expect(el.props.className).toBe('quack');
296
297 return el;
298 - }
298 + },
299 });
300 var outer = React.render(<Outer />, container);
301 expect(React.findDOMNode(outer).textContent).toBe('meow');
@@ -328,7 +328,7 @@ describe('ReactElement', function() {
328 var Test = React.createClass({
329 render: function() {
330 return <div />;
331 - }
331 + },
332 });
333 var test = ReactTestUtils.renderIntoDocument(<Test value={+undefined} />);
334 expect(test.props.value).toBeNaN();
src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
+21 -21
@@ -27,7 +27,7 @@ describe('ReactElementClone', function() {
27 var Grandparent = React.createClass({
28 render: function() {
29 return <Parent child={<div className="child" />} />;
30 - }
30 + },
31 });
32 var Parent = React.createClass({
33 render: function() {
@@ -36,7 +36,7 @@ describe('ReactElementClone', function() {
36 {React.cloneElement(this.props.child, { className: 'xyz' })}
37 </div>
38 );
39 - }
39 + },
40 });
41 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
42 expect(React.findDOMNode(component).childNodes[0].className).toBe('xyz');
@@ -46,12 +46,12 @@ describe('ReactElementClone', function() {
46 var Child = React.createClass({
47 render: function() {
48 return <div className={this.props.className} />;
49 - }
49 + },
50 });
51 var Grandparent = React.createClass({
52 render: function() {
53 return <Parent child={<Child className="child" />} />;
54 - }
54 + },
55 });
56 var Parent = React.createClass({
57 render: function() {
@@ -60,7 +60,7 @@ describe('ReactElementClone', function() {
60 {React.cloneElement(this.props.child, { className: 'xyz' })}
61 </div>
62 );
63 - }
63 + },
64 });
65 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
66 expect(React.findDOMNode(component).childNodes[0].className).toBe('xyz');
@@ -70,7 +70,7 @@ describe('ReactElementClone', function() {
70 var Grandparent = React.createClass({
71 render: function() {
72 return <Parent child={<div ref="yolo" />} />;
73 - }
73 + },
74 });
75
76 var Parent = React.createClass({
@@ -80,7 +80,7 @@ describe('ReactElementClone', function() {
80 {React.cloneElement(this.props.child, { className: 'xyz' })}
81 </div>
82 );
83 - }
83 + },
84 });
85
86 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
@@ -91,7 +91,7 @@ describe('ReactElementClone', function() {
91 var Component = React.createClass({
92 render: function() {
93 return null;
94 - }
94 + },
95 });
96 var clone = React.cloneElement(<Component />, {key: 'xyz'});
97 expect(clone.key).toBe('xyz');
@@ -102,7 +102,7 @@ describe('ReactElementClone', function() {
102 render: function() {
103 expect(this.props.children).toBe('xyz');
104 return <div />;
105 - }
105 + },
106 });
107
108 ReactTestUtils.renderIntoDocument(
@@ -115,7 +115,7 @@ describe('ReactElementClone', function() {
115 render: function() {
116 expect(this.props.children).toBe('xyz');
117 return <div />;
118 - }
118 + },
119 });
120
121 ReactTestUtils.renderIntoDocument(
@@ -127,7 +127,7 @@ describe('ReactElementClone', function() {
127 var Component = React.createClass({
128 render: function() {
129 return null;
130 - }
130 + },
131 });
132
133 var clone = React.cloneElement(
@@ -139,7 +139,7 @@ describe('ReactElementClone', function() {
139
140 expect(clone.props.children).toEqual([
141 <div />,
142 - <span />
142 + <span />,
143 ]);
144 });
145
@@ -151,13 +151,13 @@ describe('ReactElementClone', function() {
151 expect(clone.key).toBe('xyz');
152 expect(clone.ref).toBe('xyz');
153 return <div>{clone}</div>;
154 - }
154 + },
155 });
156
157 var Grandparent = React.createClass({
158 render: function() {
159 return <Parent ref="parent"><span key="abc" /></Parent>;
160 - }
160 + },
161 });
162
163 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
@@ -169,13 +169,13 @@ describe('ReactElementClone', function() {
169 render: function() {
170 var clone = React.cloneElement(this.props.children, {ref: 'xyz'});
171 return <div>{clone}</div>;
172 - }
172 + },
173 });
174
175 var Grandparent = React.createClass({
176 render: function() {
177 return <Parent ref="parent"><span ref="child" /></Parent>;
178 - }
178 + },
179 });
180
181 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
@@ -188,7 +188,7 @@ describe('ReactElementClone', function() {
188 render: function() {
189 expect(this.props.myprop).toBe('xyz');
190 return <div />;
191 - }
191 + },
192 });
193
194 ReactTestUtils.renderIntoDocument(
@@ -235,16 +235,16 @@ describe('ReactElementClone', function() {
235 spyOn(console, 'error');
236 var Component = React.createClass({
237 propTypes: {
238 - color: React.PropTypes.string.isRequired
238 + color: React.PropTypes.string.isRequired,
239 },
240 render: function() {
241 return React.createElement('div', null, 'My color is ' + this.color);
242 - }
242 + },
243 });
244 var Parent = React.createClass({
245 render: function() {
246 return React.cloneElement(this.props.child, {color: 123});
247 - }
247 + },
248 });
249 var GrandParent = React.createClass({
250 render: function() {
@@ -252,7 +252,7 @@ describe('ReactElementClone', function() {
252 Parent,
253 { child: React.createElement(Component, {color: 'red'}) }
254 );
255 - }
255 + },
256 });
257 ReactTestUtils.renderIntoDocument(React.createElement(GrandParent));
258 expect(console.error.argsForCall.length).toBe(1);
src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
+26 -26
@@ -30,7 +30,7 @@ describe('ReactElementValidator', function() {
30 ComponentClass = React.createClass({
31 render: function() {
32 return React.createElement('div');
33 - }
33 + },
34 });
35 });
36
@@ -58,7 +58,7 @@ describe('ReactElementValidator', function() {
58 displayName: 'InnerClass',
59 render: function() {
60 return Component(null, this.props.childSet);
61 - }
61 + },
62 });
63
64 var InnerComponent = React.createFactory(InnerClass);
@@ -67,7 +67,7 @@ describe('ReactElementValidator', function() {
67 displayName: 'ComponentWrapper',
68 render: function() {
69 return InnerComponent({childSet: [Component(), Component()] });
70 - }
70 + },
71 });
72
73 ReactTestUtils.renderIntoDocument(
@@ -89,12 +89,12 @@ describe('ReactElementValidator', function() {
89 displayName: undefined,
90 render: function() {
91 return <div />;
92 - }
92 + },
93 });
94
95 var divs = [
96 <div />,
97 - <div />
97 + <div />,
98 ];
99 ReactTestUtils.renderIntoDocument(<Anonymous>{divs}</Anonymous>);
100
@@ -110,7 +110,7 @@ describe('ReactElementValidator', function() {
110
111 var divs = [
112 <div />,
113 - <div />
113 + <div />,
114 ];
115 ReactTestUtils.renderIntoDocument(<div>{divs}</div>);
116
@@ -133,7 +133,7 @@ describe('ReactElementValidator', function() {
133 <footer />
134 </div>
135 );
136 - }
136 + },
137 });
138
139 ReactTestUtils.renderIntoDocument(
@@ -157,9 +157,9 @@ describe('ReactElementValidator', function() {
157 next: function() {
158 var done = ++i > 2;
159 return {value: done ? undefined : Component(), done: done};
160 - }
160 + },
161 };
162 - }
162 + },
163 };
164
165 Component(null, iterable);
@@ -191,11 +191,11 @@ describe('ReactElementValidator', function() {
191 var done = ++i > 2;
192 return {
193 value: done ? undefined : Component({key: '#' + i}),
194 - done: done
194 + done: done,
195 };
196 - }
196 + },
197 };
198 - }
198 + },
199 };
200
201 Component(null, iterable);
@@ -227,9 +227,9 @@ describe('ReactElementValidator', function() {
227 next: function() {
228 var done = ++i > 2;
229 return {value: done ? undefined : [i, Component()], done: done};
230 - }
230 + },
231 };
232 - }
232 + },
233 };
234 iterable.entries = iterable['@@iterator'];
235
@@ -266,16 +266,16 @@ describe('ReactElementValidator', function() {
266 spyOn(console, 'error');
267 var MyComp = React.createClass({
268 propTypes: {
269 - color: React.PropTypes.string
269 + color: React.PropTypes.string,
270 },
271 render: function() {
272 return React.createElement('div', null, 'My color is ' + this.color);
273 - }
273 + },
274 });
275 var ParentComp = React.createClass({
276 render: function() {
277 return React.createElement(MyComp, {color: 123});
278 - }
278 + },
279 });
280 ReactTestUtils.renderIntoDocument(React.createElement(ParentComp));
281 expect(console.error.calls[0].args[0]).toBe(
@@ -323,7 +323,7 @@ describe('ReactElementValidator', function() {
323 var ParentComp = React.createClass({
324 render: function() {
325 return React.createElement(null);
326 - }
326 + },
327 });
328 expect(function() {
329 ReactTestUtils.renderIntoDocument(React.createElement(ParentComp));
@@ -350,7 +350,7 @@ describe('ReactElementValidator', function() {
350 },
351 render: function() {
352 return React.createElement('span', null, this.props.prop);
353 - }
353 + },
354 });
355
356 ReactTestUtils.renderIntoDocument(React.createElement(Component));
@@ -372,7 +372,7 @@ describe('ReactElementValidator', function() {
372 },
373 render: function() {
374 return React.createElement('span', null, this.props.prop);
375 - }
375 + },
376 });
377
378 ReactTestUtils.renderIntoDocument(
@@ -391,11 +391,11 @@ describe('ReactElementValidator', function() {
391
392 var Component = React.createClass({
393 propTypes: {
394 - prop: React.PropTypes.string.isRequired
394 + prop: React.PropTypes.string.isRequired,
395 },
396 render: function() {
397 return React.createElement('span', null, this.props.prop);
398 - }
398 + },
399 });
400
401 ReactTestUtils.renderIntoDocument(
@@ -430,11 +430,11 @@ describe('ReactElementValidator', function() {
430
431 var Component = React.createClass({
432 propTypes: {
433 - myProp: React.PropTypes.shape
433 + myProp: React.PropTypes.shape,
434 },
435 render: function() {
436 return React.createElement('span', null, this.props.myProp.value);
437 - }
437 + },
438 });
439
440 ReactTestUtils.renderIntoDocument(
@@ -464,7 +464,7 @@ describe('ReactElementValidator', function() {
464 var TestComponent = React.createClass({
465 render: function() {
466 return <div />;
467 - }
467 + },
468 });
469 var TestFactory = React.createFactory(TestComponent);
470 expect(TestFactory.type).toBe(TestComponent);
@@ -486,7 +486,7 @@ describe('ReactElementValidator', function() {
486 },
487 componentDidMount: function() {
488 React.findDOMNode(this).appendChild(this.props.children);
489 - }
489 + },
490 });
491
492 var node = document.createElement('div');
src/isomorphic/classic/types/ReactPropTypeLocationNames.js
+1 -1
@@ -17,7 +17,7 @@ if (__DEV__) {
17 ReactPropTypeLocationNames = {
18 prop: 'prop',
19 context: 'context',
20 - childContext: 'child context'
20 + childContext: 'child context',
21 };
22 }
23
src/isomorphic/classic/types/ReactPropTypeLocations.js
+1 -1
@@ -16,7 +16,7 @@ var keyMirror = require('keyMirror');
16 var ReactPropTypeLocations = keyMirror({
17 prop: null,
18 context: null,
19 - childContext: null
19 + childContext: null,
20 });
21
22 module.exports = ReactPropTypeLocations;
src/isomorphic/classic/types/ReactPropTypes.js
+1 -1
@@ -82,7 +82,7 @@ var ReactPropTypes = {
82 objectOf: createObjectOfTypeChecker,
83 oneOf: createEnumTypeChecker,
84 oneOfType: createUnionTypeChecker,
85 - shape: createShapeTypeChecker
85 + shape: createShapeTypeChecker,
86 };
87
88 function createChainableTypeChecker(validate) {
src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
+16 -16
@@ -226,12 +226,12 @@ describe('ReactPropTypes', function() {
226 beforeEach(function() {
227 Component = React.createClass({
228 propTypes: {
229 - label: PropTypes.element.isRequired
229 + label: PropTypes.element.isRequired,
230 },
231
232 render: function() {
233 return <div>{this.props.label}</div>;
234 - }
234 + },
235 });
236 spyOn(console, 'error');
237 });
@@ -345,7 +345,7 @@ describe('ReactPropTypes', function() {
345 MyComponent = React.createClass({
346 render: function() {
347 return <div />;
348 - }
348 + },
349 });
350 });
351
@@ -371,7 +371,7 @@ describe('ReactPropTypes', function() {
371 'Some string',
372 <div />,
373 ['Another string', [456], <span />, <MyComponent />],
374 - <MyComponent />
374 + <MyComponent />,
375 ]);
376
377 // Object of renderable things
@@ -383,10 +383,10 @@ describe('ReactPropTypes', function() {
383 k3: frag({
384 k30: <MyComponent />,
385 k31: frag({k310: <a />}),
386 - k32: 'Another string'
386 + k32: 'Another string',
387 }),
388 k4: null,
389 - k5: undefined
389 + k5: undefined,
390 }));
391 expect(console.error.calls).toEqual([]);
392
@@ -398,10 +398,10 @@ describe('ReactPropTypes', function() {
398 k3: {
399 k30: <MyComponent />,
400 k31: {k310: <a />},
401 - k32: 'Another string'
401 + k32: 'Another string',
402 },
403 k4: null,
404 - k5: undefined
404 + k5: undefined,
405 });
406 });
407
@@ -597,7 +597,7 @@ describe('ReactPropTypes', function() {
597
598 var checker = PropTypes.oneOfType([
599 PropTypes.shape({a: PropTypes.number.isRequired}),
600 - PropTypes.shape({b: PropTypes.number.isRequired})
600 + PropTypes.shape({b: PropTypes.number.isRequired}),
601 ]);
602 typeCheckFail(
603 checker,
@@ -609,7 +609,7 @@ describe('ReactPropTypes', function() {
609 it('should not warn if one of the types are valid', function() {
610 var checker = PropTypes.oneOfType([
611 PropTypes.string,
612 - PropTypes.number
612 + PropTypes.number,
613 ]);
614 typeCheckPass(checker, null);
615 typeCheckPass(checker, 'foo');
@@ -617,7 +617,7 @@ describe('ReactPropTypes', function() {
617
618 checker = PropTypes.oneOfType([
619 PropTypes.shape({a: PropTypes.number.isRequired}),
620 - PropTypes.shape({b: PropTypes.number.isRequired})
620 + PropTypes.shape({b: PropTypes.number.isRequired}),
621 ]);
622 typeCheckPass(checker, {a: 1});
623 typeCheckPass(checker, {b: 1});
@@ -692,7 +692,7 @@ describe('ReactPropTypes', function() {
692 typeCheckFail(
693 PropTypes.shape({
694 key: PropTypes.number.isRequired,
695 - secondKey: PropTypes.number.isRequired
695 + secondKey: PropTypes.number.isRequired,
696 }),
697 {},
698 'Required prop `testProp.key` was not specified in `testComponent`.'
@@ -743,7 +743,7 @@ describe('ReactPropTypes', function() {
743
744 render: function() {
745 return <div />;
746 - }
746 + },
747 });
748
749 var instance = <Component num={5} />;
@@ -761,7 +761,7 @@ describe('ReactPropTypes', function() {
761
762 render: function() {
763 return <div />;
764 - }
764 + },
765 });
766
767 var instance = <Component bla={5} />;
@@ -783,7 +783,7 @@ describe('ReactPropTypes', function() {
783
784 render: function() {
785 return <div />;
786 - }
786 + },
787 });
788
789 var instance = <Component num={6} />;
@@ -806,7 +806,7 @@ describe('ReactPropTypes', function() {
806
807 render: function() {
808 return <div />;
809 - }
809 + },
810 });
811
812 var instance = <Component num={5} />;
src/isomorphic/deprecated/OrderedMap.js
+3 -3
@@ -460,7 +460,7 @@ var OrderedMapMethods = {
460 _computePositions: function() {
461 this._computedPositions = {
462 keyByIndex: {},
463 - indexByKey: {}
463 + indexByKey: {},
464 };
465 var keyByIndex = this._computedPositions.keyByIndex;
466 var indexByKey = this._computedPositions.indexByKey;
@@ -473,7 +473,7 @@ var OrderedMapMethods = {
473 index++;
474 }
475 }
476 - }
476 + },
477 };
478
479 assign(OrderedMapImpl.prototype, OrderedMapMethods);
@@ -501,7 +501,7 @@ var OrderedMap = {
501 extractObjectFromArray(arr, keyExtractor),
502 arr.length
503 );
504 - }
504 + },
505 };
506
507 module.exports = OrderedMap;
src/isomorphic/deprecated/ReactPropTransferer.js
+2 -2
@@ -56,7 +56,7 @@ var TransferStrategies = {
56 /**
57 * Transfer the `style` prop (which is an object) by merging them.
58 */
59 - style: transferStrategyMerge
59 + style: transferStrategyMerge,
60 };
61
62 /**
@@ -101,7 +101,7 @@ var ReactPropTransferer = {
101 */
102 mergeProps: function(oldProps, newProps) {
103 return transferInto(assign({}, oldProps), newProps);
104 - }
104 + },
105
106 };
107
src/isomorphic/deprecated/__tests__/cloneWithProps-test.js
+14 -14
@@ -36,7 +36,7 @@ describe('cloneWithProps', function() {
36 var Grandparent = React.createClass({
37 render: function() {
38 return <Parent><div className="child" /></Parent>;
39 - }
39 + },
40 });
41 var Parent = React.createClass({
42 render: function() {
@@ -45,7 +45,7 @@ describe('cloneWithProps', function() {
45 {cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
46 </div>
47 );
48 - }
48 + },
49 });
50 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
51 expect(React.findDOMNode(component).childNodes[0].className)
@@ -57,13 +57,13 @@ describe('cloneWithProps', function() {
57 var Child = React.createClass({
58 render: function() {
59 return <div className={this.props.className} />;
60 - }
60 + },
61 });
62
63 var Grandparent = React.createClass({
64 render: function() {
65 return <Parent><Child className="child" /></Parent>;
66 - }
66 + },
67 });
68 var Parent = React.createClass({
69 render: function() {
@@ -72,7 +72,7 @@ describe('cloneWithProps', function() {
72 {cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
73 </div>
74 );
75 - }
75 + },
76 });
77 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
78 expect(React.findDOMNode(component).childNodes[0].className)
@@ -85,7 +85,7 @@ describe('cloneWithProps', function() {
85 var Grandparent = React.createClass({
86 render: function() {
87 return <Parent><div ref="yolo" /></Parent>;
88 - }
88 + },
89 });
90 var Parent = React.createClass({
91 render: function() {
@@ -94,7 +94,7 @@ describe('cloneWithProps', function() {
94 {cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
95 </div>
96 );
97 - }
97 + },
98 });
99
100 var component = ReactTestUtils.renderIntoDocument(<Grandparent />);
@@ -106,7 +106,7 @@ describe('cloneWithProps', function() {
106 var Component = React.createClass({
107 render: function() {
108 return null;
109 - }
109 + },
110 });
111 var clone = cloneWithProps(<Component />, {key: 'xyz'});
112 expect(clone.key).toBe('xyz');
@@ -117,7 +117,7 @@ describe('cloneWithProps', function() {
117 render: function() {
118 expect(this.props.children).toBe('xyz');
119 return <div />;
120 - }
120 + },
121 });
122
123 ReactTestUtils.renderIntoDocument(
@@ -130,7 +130,7 @@ describe('cloneWithProps', function() {
130 render: function() {
131 expect(this.props.children).toBe('xyz');
132 return <div />;
133 - }
133 + },
134 });
135
136 ReactTestUtils.renderIntoDocument(
@@ -142,7 +142,7 @@ describe('cloneWithProps', function() {
142 var Component = React.createClass({
143 render: function() {
144 return <div />;
145 - }
145 + },
146 });
147
148 var Parent = React.createClass({
@@ -152,13 +152,13 @@ describe('cloneWithProps', function() {
152 expect(clone.key).toBe('xyz');
153 expect(clone.ref).toBe('xyz');
154 return <div>{clone}</div>;
155 - }
155 + },
156 });
157
158 var Grandparent = React.createClass({
159 render: function() {
160 return <Parent><Component key="abc" /></Parent>;
161 - }
161 + },
162 });
163
164 ReactTestUtils.renderIntoDocument(<Grandparent />);
@@ -169,7 +169,7 @@ describe('cloneWithProps', function() {
169 render: function() {
170 expect(this.props.myprop).toBe('xyz');
171 return <div />;
172 - }
172 + },
173 });
174
175 ReactTestUtils.renderIntoDocument(
src/isomorphic/modern/class/ReactComponent.js
+7 -7
@@ -100,26 +100,26 @@ if (__DEV__) {
100 var deprecatedAPIs = {
101 getDOMNode: [
102 'getDOMNode',
103 - 'Use React.findDOMNode(component) instead.'
103 + 'Use React.findDOMNode(component) instead.',
104 ],
105 isMounted: [
106 'isMounted',
107 'Instead, make sure to clean up subscriptions and pending requests in ' +
108 - 'componentWillUnmount to prevent memory leaks.'
108 + 'componentWillUnmount to prevent memory leaks.',
109 ],
110 replaceProps: [
111 'replaceProps',
112 - 'Instead, call React.render again at the top level.'
112 + 'Instead, call React.render again at the top level.',
113 ],
114 replaceState: [
115 'replaceState',
116 'Refactor your code to use setState instead (see ' +
117 - 'https://github.com/facebook/react/issues/3236).'
117 + 'https://github.com/facebook/react/issues/3236).',
118 ],
119 setProps: [
120 'setProps',
121 - 'Instead, call React.render again at the top level.'
122 - ]
121 + 'Instead, call React.render again at the top level.',
122 + ],
123 };
124 var defineDeprecationWarning = function(methodName, info) {
125 try {
@@ -132,7 +132,7 @@ if (__DEV__) {
132 info[1]
133 );
134 return undefined;
135 - }
135 + },
136 });
137 } catch (x) {
138 // IE will fail on defineProperty (es5-shim/sham too)
src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
+5 -5
@@ -112,7 +112,7 @@ describe('ReactES6Class', function() {
112 }
113 Foo.contextTypes = {
114 tag: React.PropTypes.string,
115 - className: React.PropTypes.string
115 + className: React.PropTypes.string,
116 };
117
118 class Outer extends React.Component {
@@ -125,7 +125,7 @@ describe('ReactES6Class', function() {
125 }
126 Outer.childContextTypes = {
127 tag: React.PropTypes.string,
128 - className: React.PropTypes.string
128 + className: React.PropTypes.string,
129 };
130 test(<Outer />, 'SPAN', 'foo');
131 });
@@ -283,7 +283,7 @@ describe('ReactES6Class', function() {
283 test(<Foo value="foo" />, 'SPAN', 'foo');
284 expect(lifeCycles).toEqual([
285 'will-mount',
286 - 'did-mount'
286 + 'did-mount',
287 ]);
288 lifeCycles = []; // reset
289 test(<Foo value="bar" />, 'SPAN', 'bar');
@@ -291,12 +291,12 @@ describe('ReactES6Class', function() {
291 'receive-props', {value: 'bar'},
292 'should-update', {value: 'bar'}, {},
293 'will-update', {value: 'bar'}, {},
294 - 'did-update', {value: 'foo'}, {}
294 + 'did-update', {value: 'foo'}, {},
295 ]);
296 lifeCycles = []; // reset
297 React.unmountComponentAtNode(container);
298 expect(lifeCycles).toEqual([
299 - 'will-unmount'
299 + 'will-unmount',
300 ]);
301 });
302
src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
+12 -12
@@ -89,9 +89,9 @@ describe('ReactJSXElementValidator', function() {
89 next: function() {
90 var done = ++i > 2;
91 return {value: done ? undefined : <Component />, done: done};
92 - }
92 + },
93 };
94 - }
94 + },
95 };
96
97 void <Component>{iterable}</Component>;
@@ -121,11 +121,11 @@ describe('ReactJSXElementValidator', function() {
121 var done = ++i > 2;
122 return {
123 value: done ? undefined : <Component key={'#' + i} />,
124 - done: done
124 + done: done,
125 };
126 - }
126 + },
127 };
128 - }
128 + },
129 };
130
131 void <Component>{iterable}</Component>;
@@ -154,9 +154,9 @@ describe('ReactJSXElementValidator', function() {
154 next: function() {
155 var done = ++i > 2;
156 return {value: done ? undefined : [i, <Component />], done: done};
157 - }
157 + },
158 };
159 - }
159 + },
160 };
161 iterable.entries = iterable['@@iterator'];
162
@@ -195,7 +195,7 @@ describe('ReactJSXElementValidator', function() {
195 }
196 }
197 MyComp.propTypes = {
198 - color: React.PropTypes.string
198 + color: React.PropTypes.string,
199 };
200 class ParentComp {
201 render() {
@@ -291,7 +291,7 @@ describe('ReactJSXElementValidator', function() {
291 }
292 }
293 Component.propTypes = {
294 - prop: React.PropTypes.string.isRequired
294 + prop: React.PropTypes.string.isRequired,
295 };
296
297 ReactTestUtils.renderIntoDocument(<Component />);
@@ -327,7 +327,7 @@ describe('ReactJSXElementValidator', function() {
327 }
328 }
329 Component.propTypes = {
330 - prop: null
330 + prop: null,
331 };
332 ReactTestUtils.renderIntoDocument(<Component />);
333 expect(console.error.calls.length).toBe(1);
@@ -345,7 +345,7 @@ describe('ReactJSXElementValidator', function() {
345 }
346 }
347 Component.contextTypes = {
348 - prop: null
348 + prop: null,
349 };
350 ReactTestUtils.renderIntoDocument(<Component />);
351 expect(console.error.calls.length).toBe(1);
@@ -363,7 +363,7 @@ describe('ReactJSXElementValidator', function() {
363 }
364 }
365 Component.getDefaultProps = () => ({
366 - prop: 'foo'
366 + prop: 'foo',
367 });
368 ReactTestUtils.renderIntoDocument(<Component />);
369 expect(console.error.calls.length).toBe(1);
src/renderers/dom/ReactDOMClient.js
+3 -3
@@ -33,7 +33,7 @@ var React = {
33 constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
34 findDOMNode: findDOMNode,
35 render: render,
36 - unmountComponentAtNode: ReactMount.unmountComponentAtNode
36 + unmountComponentAtNode: ReactMount.unmountComponentAtNode,
37 };
38
39 // Inject the runtime into a devtools global hook regardless of browser.
@@ -46,7 +46,7 @@ if (
46 InstanceHandles: ReactInstanceHandles,
47 Mount: ReactMount,
48 Reconciler: ReactReconciler,
49 - TextComponent: ReactDOMTextComponent
49 + TextComponent: ReactDOMTextComponent,
50 });
51 }
52
@@ -92,7 +92,7 @@ if (__DEV__) {
92
93 // shams
94 Object.create,
95 - Object.freeze
95 + Object.freeze,
96 ];
97
98 for (var i = 0; i < expectedFeatures.length; i++) {
src/renderers/dom/ReactDOMServer.js
+1 -1
@@ -18,7 +18,7 @@ ReactDefaultInjection.inject();
18
19 var ReactDOMServer = {
20 renderToString: ReactServerRendering.renderToString,
21 - renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup
21 + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
22 };
23
24 module.exports = ReactDOMServer;
src/renderers/dom/client/ClientReactRootIndex.js
+1 -1
@@ -17,7 +17,7 @@ var nextReactRootIndex = 0;
17 var ClientReactRootIndex = {
18 createReactRootIndex: function() {
19 return nextReactRootIndex++;
20 - }
20 + },
21 };
22
23 module.exports = ClientReactRootIndex;
src/renderers/dom/client/ReactBrowserEventEmitter.js
+3 -3
@@ -120,7 +120,7 @@ var topEventMapping = {
120 topTouchEnd: 'touchend',
121 topTouchMove: 'touchmove',
122 topTouchStart: 'touchstart',
123 - topWheel: 'wheel'
123 + topWheel: 'wheel',
124 };
125
126 /**
@@ -164,7 +164,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
164 ReactBrowserEventEmitter.handleTopLevel
165 );
166 ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
167 - }
167 + },
168 },
169
170 /**
@@ -346,7 +346,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
346
347 deleteListener: EventPluginHub.deleteListener,
348
349 - deleteAllListeners: EventPluginHub.deleteAllListeners
349 + deleteAllListeners: EventPluginHub.deleteAllListeners,
350
351 });
352
src/renderers/dom/client/ReactDOMIDOperations.js
+3 -3
@@ -30,7 +30,7 @@ var setInnerHTML = require('setInnerHTML');
30 var INVALID_PROPERTY_ERRORS = {
31 dangerouslySetInnerHTML:
32 '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',
33 - style: '`style` must be set using `updateStylesByID()`.'
33 + style: '`style` must be set using `updateStylesByID()`.',
34 };
35
36 /**
@@ -146,7 +146,7 @@ var ReactDOMIDOperations = {
146 updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
147 }
148 DOMChildrenOperations.processUpdates(updates, markup);
149 - }
149 + },
150 };
151
152 ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
@@ -156,7 +156,7 @@ ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
156 updateInnerHTMLByID: 'updateInnerHTMLByID',
157 updateTextContentByID: 'updateTextContentByID',
158 dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
159 - dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
159 + dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates',
160 });
161
162 module.exports = ReactDOMIDOperations;
src/renderers/dom/client/ReactDOMSelection.js
+3 -3
@@ -54,7 +54,7 @@ function getIEOffsets(node) {
54
55 return {
56 start: startOffset,
57 - end: endOffset
57 + end: endOffset,
58 };
59 }
60
@@ -110,7 +110,7 @@ function getModernOffsets(node) {
110
111 return {
112 start: isBackward ? end : start,
113 - end: isBackward ? start : end
113 + end: isBackward ? start : end,
114 };
115 }
116
@@ -205,7 +205,7 @@ var ReactDOMSelection = {
205 * @param {DOMElement|DOMTextNode} node
206 * @param {object} offsets
207 */
208 - setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
208 + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets,
209 };
210
211 module.exports = ReactDOMSelection;
src/renderers/dom/client/ReactEventListener.js
+2 -2
@@ -52,7 +52,7 @@ assign(TopLevelCallbackBookKeeping.prototype, {
52 this.topLevelType = null;
53 this.nativeEvent = null;
54 this.ancestors.length = 0;
55 - }
55 + },
56 });
57 PooledClass.addPoolingTo(
58 TopLevelCallbackBookKeeping,
@@ -175,7 +175,7 @@ var ReactEventListener = {
175 } finally {
176 TopLevelCallbackBookKeeping.release(bookKeeping);
177 }
178 - }
178 + },
179 };
180
181 module.exports = ReactEventListener;
src/renderers/dom/client/ReactInputSelection.js
+4 -4
@@ -44,7 +44,7 @@ var ReactInputSelection = {
44 selectionRange:
45 ReactInputSelection.hasSelectionCapabilities(focusedElem) ?
46 ReactInputSelection.getSelection(focusedElem) :
47 - null
47 + null,
48 };
49 },
50
@@ -82,7 +82,7 @@ var ReactInputSelection = {
82 // Modern browser with input or textarea.
83 selection = {
84 start: input.selectionStart,
85 - end: input.selectionEnd
85 + end: input.selectionEnd,
86 };
87 } else if (document.selection && input.nodeName === 'INPUT') {
88 // IE8 input.
@@ -92,7 +92,7 @@ var ReactInputSelection = {
92 if (range.parentElement() === input) {
93 selection = {
94 start: -range.moveStart('character', -input.value.length),
95 - end: -range.moveEnd('character', -input.value.length)
95 + end: -range.moveEnd('character', -input.value.length),
96 };
97 }
98 } else {
@@ -128,7 +128,7 @@ var ReactInputSelection = {
128 } else {
129 ReactDOMSelection.setOffsets(input, offsets);
130 }
131 - }
131 + },
132 };
133
134 module.exports = ReactInputSelection;
src/renderers/dom/client/ReactMount.js
+2 -2
@@ -956,12 +956,12 @@ var ReactMount = {
956
957 getNodeFromInstance: getNodeFromInstance,
958
959 - purgeID: purgeID
959 + purgeID: purgeID,
960 };
961
962 ReactPerf.measureMethods(ReactMount, 'ReactMount', {
963 _renderNewRootComponent: '_renderNewRootComponent',
964 - _mountImageIntoNode: '_mountImageIntoNode'
964 + _mountImageIntoNode: '_mountImageIntoNode',
965 });
966
967 module.exports = ReactMount;
src/renderers/dom/client/ReactReconcileTransaction.js
+5 -5
@@ -32,7 +32,7 @@ var SELECTION_RESTORATION = {
32 /**
33 * @param {Selection} sel Selection information returned from `initialize`.
34 */
35 - close: ReactInputSelection.restoreSelection
35 + close: ReactInputSelection.restoreSelection,
36 };
37
38 /**
@@ -58,7 +58,7 @@ var EVENT_SUPPRESSION = {
58 */
59 close: function(previouslyEnabled) {
60 ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
61 - }
61 + },
62 };
63
64 /**
@@ -78,7 +78,7 @@ var ON_DOM_READY_QUEUEING = {
78 */
79 close: function() {
80 this.reactMountReady.notifyAll();
81 - }
81 + },
82 };
83
84 /**
@@ -89,7 +89,7 @@ var ON_DOM_READY_QUEUEING = {
89 var TRANSACTION_WRAPPERS = [
90 SELECTION_RESTORATION,
91 EVENT_SUPPRESSION,
92 - ON_DOM_READY_QUEUEING
92 + ON_DOM_READY_QUEUEING,
93 ];
94
95 /**
@@ -143,7 +143,7 @@ var Mixin = {
143 destructor: function() {
144 CallbackQueue.release(this.reactMountReady);
145 this.reactMountReady = null;
146 - }
146 + },
147 };
148
149
src/renderers/dom/client/__tests__/ReactBrowserEventEmitter-test.js
+1 -1
@@ -100,7 +100,7 @@ describe('ReactBrowserEventEmitter', function() {
100 idCallOrder = [];
101 tapMoveThreshold = TapEventPlugin.tapMoveThreshold;
102 EventPluginHub.injection.injectEventPluginsByName({
103 - TapEventPlugin: TapEventPlugin
103 + TapEventPlugin: TapEventPlugin,
104 });
105 });
106
src/renderers/dom/client/__tests__/ReactDOM-test.js
+8 -8
@@ -82,28 +82,28 @@ describe('ReactDOM', function() {
82 myDiv.setProps({
83 children: [
84 <div key="theDog" className="dogbeforedelete" />,
85 - <div key="theBird" className="bird" />
86 - ]
85 + <div key="theBird" className="bird" />,
86 + ],
87 });
88 // Remove theDog - this should purge the cache
89 myDiv.setProps({
90 children: [
91 - <div key="theBird" className="bird" />
92 - ]
91 + <div key="theBird" className="bird" />,
92 + ],
93 });
94 // Now, put theDog back. It's now a different DOM node.
95 myDiv.setProps({
96 children: [
97 <div key="theDog" className="dog" />,
98 - <div key="theBird" className="bird" />
99 - ]
98 + <div key="theBird" className="bird" />,
99 + ],
100 });
101 // Change the className of theDog. It will use the same element
102 myDiv.setProps({
103 children: [
104 <div key="theDog" className="bigdog" />,
105 - <div key="theBird" className="bird" />
106 - ]
105 + <div key="theBird" className="bird" />,
106 + ],
107 });
108 var root = React.findDOMNode(myDiv);
109 var dog = root.childNodes[0];
src/renderers/dom/client/__tests__/ReactEventListener-test.js
+6 -6
@@ -49,7 +49,7 @@ describe('ReactEventListener', function() {
49
50 var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
51 callback({
52 - target: React.findDOMNode(childControl)
52 + target: React.findDOMNode(childControl),
53 });
54
55 var calls = handleTopLevel.mock.calls;
@@ -77,7 +77,7 @@ describe('ReactEventListener', function() {
77
78 var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
79 callback({
80 - target: React.findDOMNode(childControl)
80 + target: React.findDOMNode(childControl),
81 });
82
83 var calls = handleTopLevel.mock.calls;
@@ -115,7 +115,7 @@ describe('ReactEventListener', function() {
115
116 var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
117 callback({
118 - target: childNode
118 + target: childNode,
119 });
120
121 var calls = handleTopLevel.mock.calls;
@@ -155,7 +155,7 @@ describe('ReactEventListener', function() {
155 var callback =
156 ReactEventListener.dispatchEvent.bind(ReactEventListener, 'test');
157 callback({
158 - target: childNode
158 + target: childNode,
159 });
160
161 var calls = handleTopLevel.mock.calls;
@@ -174,7 +174,7 @@ describe('ReactEventListener', function() {
174 render: function() {
175 var inner = <div ref="inner">Inner</div>;
176 return <div><div id="outer">{inner}</div></div>;
177 - }
177 + },
178
179 });
180
@@ -182,7 +182,7 @@ describe('ReactEventListener', function() {
182
183 var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
184 callback({
185 - target: React.findDOMNode(instance.getInner())
185 + target: React.findDOMNode(instance.getInner()),
186 });
187
188 var calls = handleTopLevel.mock.calls;
src/renderers/dom/client/__tests__/ReactMount-test.js
+4 -4
@@ -67,7 +67,7 @@ describe('ReactMount', function() {
67 var Component = React.createClass({
68 render: function() {
69 return <div />;
70 - }
70 + },
71 });
72 expect(function() {
73 ReactTestUtils.renderIntoDocument(Component);
@@ -100,7 +100,7 @@ describe('ReactMount', function() {
100 componentWillUnmount: mockUnmount,
101 render: function() {
102 return <span>{this.props.text}</span>;
103 - }
103 + },
104 });
105
106 expect(mockMount.mock.calls.length).toBe(0);
@@ -181,8 +181,8 @@ describe('ReactMount', function() {
181 expect(shadowRoot.firstChild.tagName).toBe('DIV');
182 React.render(<span>Hi, from within a WC!</span>, shadowRoot);
183 expect(shadowRoot.firstChild.tagName).toBe('SPAN');
184 - }
185 - }
184 + },
185 + },
186 });
187 proto.unmount = function() {
188 React.unmountComponentAtNode(shadowRoot);
src/renderers/dom/client/__tests__/ReactRenderDocument-test.js
+7 -7
@@ -53,7 +53,7 @@ describe('rendering React components at document', function() {
53 </body>
54 </html>
55 );
56 - }
56 + },
57 });
58
59 var markup = React.renderToString(<Root />);
@@ -82,7 +82,7 @@ describe('rendering React components at document', function() {
82 </body>
83 </html>
84 );
85 - }
85 + },
86 });
87
88 var markup = React.renderToString(<Root />);
@@ -112,7 +112,7 @@ describe('rendering React components at document', function() {
112 </body>
113 </html>
114 );
115 - }
115 + },
116 });
117
118 var Component2 = React.createClass({
@@ -127,7 +127,7 @@ describe('rendering React components at document', function() {
127 </body>
128 </html>
129 );
130 - }
130 + },
131 });
132
133 var markup = React.renderToString(<Component />);
@@ -160,7 +160,7 @@ describe('rendering React components at document', function() {
160 </body>
161 </html>
162 );
163 - }
163 + },
164 });
165
166 var markup = React.renderToString(
@@ -188,7 +188,7 @@ describe('rendering React components at document', function() {
188 </body>
189 </html>
190 );
191 - }
191 + },
192 });
193
194 var markup = React.renderToString(
@@ -231,7 +231,7 @@ describe('rendering React components at document', function() {
231 </body>
232 </html>
233 );
234 - }
234 + },
235 });
236
237 expect(function() {
src/renderers/dom/client/__tests__/findDOMNode-test.js
+1 -1
@@ -23,7 +23,7 @@ describe('findDOMNode', function() {
23 var MyNode = React.createClass({
24 render: function() {
25 return <div><span>Noise</span></div>;
26 - }
26 + },
27 });
28
29 var myNode = ReactTestUtils.renderIntoDocument(<MyNode />);
src/renderers/dom/client/__tests__/validateDOMNesting-test.js
+2 -2
@@ -24,13 +24,13 @@ var specialTags = [
24 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol',
25 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source',
26 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot',
27 - 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'
27 + 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp',
28 ];
29
30 // https://html.spec.whatwg.org/multipage/syntax.html#formatting
31 var formattingTags = [
32 'a', 'b', 'big', 'code', 'em', 'font', 'i', 'nobr', 's', 'small', 'strike',
33 - 'strong', 'tt', 'u'
33 + 'strong', 'tt', 'u',
34 ];
35
36 function isTagStackValid(stack) {
src/renderers/dom/client/eventPlugins/AnalyticsEventPluginFactory.js
+3 -3
@@ -104,7 +104,7 @@ var topLevelTypesToAnalyticsEvent = {
104 topFocus: 'focus',
105 topBlur: 'blur',
106 topScroll: 'scroll',
107 - topChange: 'change'
107 + topChange: 'change',
108 };
109
110 if (__DEV__) {
@@ -122,7 +122,7 @@ if (__DEV__) {
122 'focus': topLevelTypes.topFocus,
123 'blur': topLevelTypes.topBlur,
124 'scroll': topLevelTypes.topScroll,
125 - 'change': topLevelTypes.topChange
125 + 'change': topLevelTypes.topChange,
126 };
127 }
128
@@ -220,7 +220,7 @@ var createAnalyticsPlugin = function(cb, interval) {
220 };
221
222 var AnalyticsEventPluginFactory = {
223 - createAnalyticsPlugin: createAnalyticsPlugin
223 + createAnalyticsPlugin: createAnalyticsPlugin,
224 };
225
226 module.exports = AnalyticsEventPluginFactory;
src/renderers/dom/client/eventPlugins/BeforeInputEventPlugin.js
+15 -15
@@ -78,19 +78,19 @@ var eventTypes = {
78 beforeInput: {
79 phasedRegistrationNames: {
80 bubbled: keyOf({onBeforeInput: null}),
81 - captured: keyOf({onBeforeInputCapture: null})
81 + captured: keyOf({onBeforeInputCapture: null}),
82 },
83 dependencies: [
84 topLevelTypes.topCompositionEnd,
85 topLevelTypes.topKeyPress,
86 topLevelTypes.topTextInput,
87 - topLevelTypes.topPaste
88 - ]
87 + topLevelTypes.topPaste,
88 + ],
89 },
90 compositionEnd: {
91 phasedRegistrationNames: {
92 bubbled: keyOf({onCompositionEnd: null}),
93 - captured: keyOf({onCompositionEndCapture: null})
93 + captured: keyOf({onCompositionEndCapture: null}),
94 },
95 dependencies: [
96 topLevelTypes.topBlur,
@@ -98,13 +98,13 @@ var eventTypes = {
98 topLevelTypes.topKeyDown,
99 topLevelTypes.topKeyPress,
100 topLevelTypes.topKeyUp,
101 - topLevelTypes.topMouseDown
102 - ]
101 + topLevelTypes.topMouseDown,
102 + ],
103 },
104 compositionStart: {
105 phasedRegistrationNames: {
106 bubbled: keyOf({onCompositionStart: null}),
107 - captured: keyOf({onCompositionStartCapture: null})
107 + captured: keyOf({onCompositionStartCapture: null}),
108 },
109 dependencies: [
110 topLevelTypes.topBlur,
@@ -112,13 +112,13 @@ var eventTypes = {
112 topLevelTypes.topKeyDown,
113 topLevelTypes.topKeyPress,
114 topLevelTypes.topKeyUp,
115 - topLevelTypes.topMouseDown
116 - ]
115 + topLevelTypes.topMouseDown,
116 + ],
117 },
118 compositionUpdate: {
119 phasedRegistrationNames: {
120 bubbled: keyOf({onCompositionUpdate: null}),
121 - captured: keyOf({onCompositionUpdateCapture: null})
121 + captured: keyOf({onCompositionUpdateCapture: null}),
122 },
123 dependencies: [
124 topLevelTypes.topBlur,
@@ -126,9 +126,9 @@ var eventTypes = {
126 topLevelTypes.topKeyDown,
127 topLevelTypes.topKeyPress,
128 topLevelTypes.topKeyUp,
129 - topLevelTypes.topMouseDown
130 - ]
131 - }
129 + topLevelTypes.topMouseDown,
130 + ],
131 + },
132 };
133
134 // Track whether we've ever handled a keypress on the space key.
@@ -486,9 +486,9 @@ var BeforeInputEventPlugin = {
486 topLevelTarget,
487 topLevelTargetID,
488 nativeEvent
489 - )
489 + ),
490 ];
491 - }
491 + },
492 };
493
494 module.exports = BeforeInputEventPlugin;
src/renderers/dom/client/eventPlugins/ChangeEventPlugin.js
+6 -6
@@ -28,7 +28,7 @@ var eventTypes = {
28 change: {
29 phasedRegistrationNames: {
30 bubbled: keyOf({onChange: null}),
31 - captured: keyOf({onChangeCapture: null})
31 + captured: keyOf({onChangeCapture: null}),
32 },
33 dependencies: [
34 topLevelTypes.topBlur,
@@ -38,9 +38,9 @@ var eventTypes = {
38 topLevelTypes.topInput,
39 topLevelTypes.topKeyDown,
40 topLevelTypes.topKeyUp,
41 - topLevelTypes.topSelectionChange
42 - ]
43 - }
41 + topLevelTypes.topSelectionChange,
42 + ],
43 + },
44 };
45
46 /**
@@ -158,7 +158,7 @@ var newValueProp = {
158 // Cast to a string so we can do equality checks.
159 activeElementValue = '' + val;
160 activeElementValueProp.set.call(this, val);
161 - }
161 + },
162 };
163
164 /**
@@ -373,7 +373,7 @@ var ChangeEventPlugin = {
373 topLevelTargetID
374 );
375 }
376 - }
376 + },
377
378 };
379
src/renderers/dom/client/eventPlugins/DefaultEventPluginOrder.js
+1 -1
@@ -30,7 +30,7 @@ var DefaultEventPluginOrder = [
30 keyOf({ChangeEventPlugin: null}),
31 keyOf({SelectEventPlugin: null}),
32 keyOf({BeforeInputEventPlugin: null}),
33 - keyOf({AnalyticsEventPlugin: null})
33 + keyOf({AnalyticsEventPlugin: null}),
34 ];
35
36 module.exports = DefaultEventPluginOrder;
src/renderers/dom/client/eventPlugins/EnterLeaveEventPlugin.js
+6 -6
@@ -27,16 +27,16 @@ var eventTypes = {
27 registrationName: keyOf({onMouseEnter: null}),
28 dependencies: [
29 topLevelTypes.topMouseOut,
30 - topLevelTypes.topMouseOver
31 - ]
30 + topLevelTypes.topMouseOver,
31 + ],
32 },
33 mouseLeave: {
34 registrationName: keyOf({onMouseLeave: null}),
35 dependencies: [
36 topLevelTypes.topMouseOut,
37 - topLevelTypes.topMouseOver
38 - ]
39 - }
37 + topLevelTypes.topMouseOver,
38 + ],
39 + },
40 };
41
42 var extractedEvents = [null, null];
@@ -131,7 +131,7 @@ var EnterLeaveEventPlugin = {
131 extractedEvents[1] = enter;
132
133 return extractedEvents;
134 - }
134 + },
135
136 };
137
src/renderers/dom/client/eventPlugins/FallbackCompositionState.js
+1 -1
@@ -81,7 +81,7 @@ assign(FallbackCompositionState.prototype, {
81 var sliceTail = end > 1 ? 1 - end : undefined;
82 this._fallbackText = endValue.slice(start, sliceTail);
83 return this._fallbackText;
84 - }
84 + },
85 });
86
87 PooledClass.addPoolingTo(FallbackCompositionState);
src/renderers/dom/client/eventPlugins/SelectEventPlugin.js
+8 -8
@@ -27,7 +27,7 @@ var eventTypes = {
27 select: {
28 phasedRegistrationNames: {
29 bubbled: keyOf({onSelect: null}),
30 - captured: keyOf({onSelectCapture: null})
30 + captured: keyOf({onSelectCapture: null}),
31 },
32 dependencies: [
33 topLevelTypes.topBlur,
@@ -36,9 +36,9 @@ var eventTypes = {
36 topLevelTypes.topKeyDown,
37 topLevelTypes.topMouseDown,
38 topLevelTypes.topMouseUp,
39 - topLevelTypes.topSelectionChange
40 - ]
41 - }
39 + topLevelTypes.topSelectionChange,
40 + ],
41 + },
42 };
43
44 var activeElement = null;
@@ -65,7 +65,7 @@ function getSelection(node) {
65 ReactInputSelection.hasSelectionCapabilities(node)) {
66 return {
67 start: node.selectionStart,
68 - end: node.selectionEnd
68 + end: node.selectionEnd,
69 };
70 } else if (window.getSelection) {
71 var selection = window.getSelection();
@@ -73,7 +73,7 @@ function getSelection(node) {
73 anchorNode: selection.anchorNode,
74 anchorOffset: selection.anchorOffset,
75 focusNode: selection.focusNode,
76 - focusOffset: selection.focusOffset
76 + focusOffset: selection.focusOffset,
77 };
78 } else if (document.selection) {
79 var range = document.selection.createRange();
@@ -81,7 +81,7 @@ function getSelection(node) {
81 parentElement: range.parentElement(),
82 text: range.text,
83 top: range.boundingTop,
84 - left: range.boundingLeft
84 + left: range.boundingLeft,
85 };
86 }
87 }
@@ -206,7 +206,7 @@ var SelectEventPlugin = {
206 if (registrationName === ON_SELECT_KEY) {
207 hasListener = true;
208 }
209 - }
209 + },
210 };
211
212 module.exports = SelectEventPlugin;
src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js
+73 -73
@@ -38,215 +38,215 @@ var eventTypes = {
38 blur: {
39 phasedRegistrationNames: {
40 bubbled: keyOf({onBlur: true}),
41 - captured: keyOf({onBlurCapture: true})
42 - }
41 + captured: keyOf({onBlurCapture: true}),
42 + },
43 },
44 click: {
45 phasedRegistrationNames: {
46 bubbled: keyOf({onClick: true}),
47 - captured: keyOf({onClickCapture: true})
48 - }
47 + captured: keyOf({onClickCapture: true}),
48 + },
49 },
50 contextMenu: {
51 phasedRegistrationNames: {
52 bubbled: keyOf({onContextMenu: true}),
53 - captured: keyOf({onContextMenuCapture: true})
54 - }
53 + captured: keyOf({onContextMenuCapture: true}),
54 + },
55 },
56 copy: {
57 phasedRegistrationNames: {
58 bubbled: keyOf({onCopy: true}),
59 - captured: keyOf({onCopyCapture: true})
60 - }
59 + captured: keyOf({onCopyCapture: true}),
60 + },
61 },
62 cut: {
63 phasedRegistrationNames: {
64 bubbled: keyOf({onCut: true}),
65 - captured: keyOf({onCutCapture: true})
66 - }
65 + captured: keyOf({onCutCapture: true}),
66 + },
67 },
68 doubleClick: {
69 phasedRegistrationNames: {
70 bubbled: keyOf({onDoubleClick: true}),
71 - captured: keyOf({onDoubleClickCapture: true})
72 - }
71 + captured: keyOf({onDoubleClickCapture: true}),
72 + },
73 },
74 drag: {
75 phasedRegistrationNames: {
76 bubbled: keyOf({onDrag: true}),
77 - captured: keyOf({onDragCapture: true})
78 - }
77 + captured: keyOf({onDragCapture: true}),
78 + },
79 },
80 dragEnd: {
81 phasedRegistrationNames: {
82 bubbled: keyOf({onDragEnd: true}),
83 - captured: keyOf({onDragEndCapture: true})
84 - }
83 + captured: keyOf({onDragEndCapture: true}),
84 + },
85 },
86 dragEnter: {
87 phasedRegistrationNames: {
88 bubbled: keyOf({onDragEnter: true}),
89 - captured: keyOf({onDragEnterCapture: true})
90 - }
89 + captured: keyOf({onDragEnterCapture: true}),
90 + },
91 },
92 dragExit: {
93 phasedRegistrationNames: {
94 bubbled: keyOf({onDragExit: true}),
95 - captured: keyOf({onDragExitCapture: true})
96 - }
95 + captured: keyOf({onDragExitCapture: true}),
96 + },
97 },
98 dragLeave: {
99 phasedRegistrationNames: {
100 bubbled: keyOf({onDragLeave: true}),
101 - captured: keyOf({onDragLeaveCapture: true})
102 - }
101 + captured: keyOf({onDragLeaveCapture: true}),
102 + },
103 },
104 dragOver: {
105 phasedRegistrationNames: {
106 bubbled: keyOf({onDragOver: true}),
107 - captured: keyOf({onDragOverCapture: true})
108 - }
107 + captured: keyOf({onDragOverCapture: true}),
108 + },
109 },
110 dragStart: {
111 phasedRegistrationNames: {
112 bubbled: keyOf({onDragStart: true}),
113 - captured: keyOf({onDragStartCapture: true})
114 - }
113 + captured: keyOf({onDragStartCapture: true}),
114 + },
115 },
116 drop: {
117 phasedRegistrationNames: {
118 bubbled: keyOf({onDrop: true}),
119 - captured: keyOf({onDropCapture: true})
120 - }
119 + captured: keyOf({onDropCapture: true}),
120 + },
121 },
122 focus: {
123 phasedRegistrationNames: {
124 bubbled: keyOf({onFocus: true}),
125 - captured: keyOf({onFocusCapture: true})
126 - }
125 + captured: keyOf({onFocusCapture: true}),
126 + },
127 },
128 input: {
129 phasedRegistrationNames: {
130 bubbled: keyOf({onInput: true}),
131 - captured: keyOf({onInputCapture: true})
132 - }
131 + captured: keyOf({onInputCapture: true}),
132 + },
133 },
134 keyDown: {
135 phasedRegistrationNames: {
136 bubbled: keyOf({onKeyDown: true}),
137 - captured: keyOf({onKeyDownCapture: true})
138 - }
137 + captured: keyOf({onKeyDownCapture: true}),
138 + },
139 },
140 keyPress: {
141 phasedRegistrationNames: {
142 bubbled: keyOf({onKeyPress: true}),
143 - captured: keyOf({onKeyPressCapture: true})
144 - }
143 + captured: keyOf({onKeyPressCapture: true}),
144 + },
145 },
146 keyUp: {
147 phasedRegistrationNames: {
148 bubbled: keyOf({onKeyUp: true}),
149 - captured: keyOf({onKeyUpCapture: true})
150 - }
149 + captured: keyOf({onKeyUpCapture: true}),
150 + },
151 },
152 load: {
153 phasedRegistrationNames: {
154 bubbled: keyOf({onLoad: true}),
155 - captured: keyOf({onLoadCapture: true})
156 - }
155 + captured: keyOf({onLoadCapture: true}),
156 + },
157 },
158 error: {
159 phasedRegistrationNames: {
160 bubbled: keyOf({onError: true}),
161 - captured: keyOf({onErrorCapture: true})
162 - }
161 + captured: keyOf({onErrorCapture: true}),
162 + },
163 },
164 // Note: We do not allow listening to mouseOver events. Instead, use the
165 // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`.
166 mouseDown: {
167 phasedRegistrationNames: {
168 bubbled: keyOf({onMouseDown: true}),
169 - captured: keyOf({onMouseDownCapture: true})
170 - }
169 + captured: keyOf({onMouseDownCapture: true}),
170 + },
171 },
172 mouseMove: {
173 phasedRegistrationNames: {
174 bubbled: keyOf({onMouseMove: true}),
175 - captured: keyOf({onMouseMoveCapture: true})
176 - }
175 + captured: keyOf({onMouseMoveCapture: true}),
176 + },
177 },
178 mouseOut: {
179 phasedRegistrationNames: {
180 bubbled: keyOf({onMouseOut: true}),
181 - captured: keyOf({onMouseOutCapture: true})
182 - }
181 + captured: keyOf({onMouseOutCapture: true}),
182 + },
183 },
184 mouseOver: {
185 phasedRegistrationNames: {
186 bubbled: keyOf({onMouseOver: true}),
187 - captured: keyOf({onMouseOverCapture: true})
188 - }
187 + captured: keyOf({onMouseOverCapture: true}),
188 + },
189 },
190 mouseUp: {
191 phasedRegistrationNames: {
192 bubbled: keyOf({onMouseUp: true}),
193 - captured: keyOf({onMouseUpCapture: true})
194 - }
193 + captured: keyOf({onMouseUpCapture: true}),
194 + },
195 },
196 paste: {
197 phasedRegistrationNames: {
198 bubbled: keyOf({onPaste: true}),
199 - captured: keyOf({onPasteCapture: true})
200 - }
199 + captured: keyOf({onPasteCapture: true}),
200 + },
201 },
202 reset: {
203 phasedRegistrationNames: {
204 bubbled: keyOf({onReset: true}),
205 - captured: keyOf({onResetCapture: true})
206 - }
205 + captured: keyOf({onResetCapture: true}),
206 + },
207 },
208 scroll: {
209 phasedRegistrationNames: {
210 bubbled: keyOf({onScroll: true}),
211 - captured: keyOf({onScrollCapture: true})
212 - }
211 + captured: keyOf({onScrollCapture: true}),
212 + },
213 },
214 submit: {
215 phasedRegistrationNames: {
216 bubbled: keyOf({onSubmit: true}),
217 - captured: keyOf({onSubmitCapture: true})
218 - }
217 + captured: keyOf({onSubmitCapture: true}),
218 + },
219 },
220 touchCancel: {
221 phasedRegistrationNames: {
222 bubbled: keyOf({onTouchCancel: true}),
223 - captured: keyOf({onTouchCancelCapture: true})
224 - }
223 + captured: keyOf({onTouchCancelCapture: true}),
224 + },
225 },
226 touchEnd: {
227 phasedRegistrationNames: {
228 bubbled: keyOf({onTouchEnd: true}),
229 - captured: keyOf({onTouchEndCapture: true})
230 - }
229 + captured: keyOf({onTouchEndCapture: true}),
230 + },
231 },
232 touchMove: {
233 phasedRegistrationNames: {
234 bubbled: keyOf({onTouchMove: true}),
235 - captured: keyOf({onTouchMoveCapture: true})
236 - }
235 + captured: keyOf({onTouchMoveCapture: true}),
236 + },
237 },
238 touchStart: {
239 phasedRegistrationNames: {
240 bubbled: keyOf({onTouchStart: true}),
241 - captured: keyOf({onTouchStartCapture: true})
242 - }
241 + captured: keyOf({onTouchStartCapture: true}),
242 + },
243 },
244 wheel: {
245 phasedRegistrationNames: {
246 bubbled: keyOf({onWheel: true}),
247 - captured: keyOf({onWheelCapture: true})
248 - }
249 - }
247 + captured: keyOf({onWheelCapture: true}),
248 + },
249 + },
250 };
251
252 var topLevelEventsToDispatchConfig = {
@@ -284,7 +284,7 @@ var topLevelEventsToDispatchConfig = {
284 topTouchEnd: eventTypes.touchEnd,
285 topTouchMove: eventTypes.touchMove,
286 topTouchStart: eventTypes.touchStart,
287 - topWheel: eventTypes.wheel
287 + topWheel: eventTypes.wheel,
288 };
289
290 for (var type in topLevelEventsToDispatchConfig) {
@@ -446,7 +446,7 @@ var SimpleEventPlugin = {
446 onClickListeners[id].remove();
447 delete onClickListeners[id];
448 }
449 - }
449 + },
450
451 };
452
src/renderers/dom/client/eventPlugins/TapEventPlugin.js
+7 -7
@@ -34,7 +34,7 @@ var startCoords = {x: null, y: null};
34
35 var Axis = {
36 x: {page: 'pageX', client: 'clientX', envScroll: 'currentPageScrollLeft'},
37 - y: {page: 'pageY', client: 'clientY', envScroll: 'currentPageScrollTop'}
37 + y: {page: 'pageY', client: 'clientY', envScroll: 'currentPageScrollTop'},
38 };
39
40 function getAxisCoordOfEvent(axis, nativeEvent) {
@@ -60,23 +60,23 @@ var touchEvents = [
60 topLevelTypes.topTouchStart,
61 topLevelTypes.topTouchCancel,
62 topLevelTypes.topTouchEnd,
63 - topLevelTypes.topTouchMove
63 + topLevelTypes.topTouchMove,
64 ];
65
66 var dependencies = [
67 topLevelTypes.topMouseDown,
68 topLevelTypes.topMouseMove,
69 - topLevelTypes.topMouseUp
69 + topLevelTypes.topMouseUp,
70 ].concat(touchEvents);
71
72 var eventTypes = {
73 touchTap: {
74 phasedRegistrationNames: {
75 bubbled: keyOf({onTouchTap: null}),
76 - captured: keyOf({onTouchTapCapture: null})
76 + captured: keyOf({onTouchTapCapture: null}),
77 },
78 - dependencies: dependencies
79 - }
78 + dependencies: dependencies,
79 + },
80 };
81
82 var usedTouch = false;
@@ -134,7 +134,7 @@ var TapEventPlugin = {
134 }
135 EventPropagators.accumulateTwoPhaseDispatches(event);
136 return event;
137 - }
137 + },
138
139 };
140
src/renderers/dom/client/eventPlugins/__tests__/AnalyticsEventPlugin-test.js
+5 -5
@@ -48,7 +48,7 @@ describe('AnalyticsEventPlugin', function() {
48 EventPluginHub.injection.injectEventPluginsByName({
49 'SimpleEventPlugin': SimpleEventPlugin,
50 'EnterLeaveEventPlugin': EnterLeaveEventPlugin,
51 - 'ChangeEventPlugin': ChangeEventPlugin
51 + 'ChangeEventPlugin': ChangeEventPlugin,
52 });
53
54 spyOn(console, 'error');
@@ -67,7 +67,7 @@ describe('AnalyticsEventPlugin', function() {
67 Test
68 </div>
69 );
70 - }
70 + },
71 });
72 var renderedComponent =
73 ReactTestUtils.renderIntoDocument(<TestValidEvents />);
@@ -85,7 +85,7 @@ describe('AnalyticsEventPlugin', function() {
85
86 EventPluginHub.injection.injectEventPluginsByName({
87 AnalyticsEventPlugin:
88 - AnalyticsEventPluginFactory.createAnalyticsPlugin(cb)
88 + AnalyticsEventPluginFactory.createAnalyticsPlugin(cb),
89 });
90
91 // Simulate some clicks
@@ -121,7 +121,7 @@ describe('AnalyticsEventPlugin', function() {
121 Test
122 </div>
123 );
124 - }
124 + },
125 });
126 var renderedComponent =
127 ReactTestUtils.renderIntoDocument(<TestInvalidEvents />);
@@ -131,7 +131,7 @@ describe('AnalyticsEventPlugin', function() {
131 EventPluginHub.injection.injectEventPluginsByName({
132 AnalyticsEventPlugin: AnalyticsEventPluginFactory.createAnalyticsPlugin(
133 cb
134 - )
134 + ),
135 });
136
137 ReactTestUtils.SimulateNative.click(renderedComponent.refs.testDiv);
src/renderers/dom/client/eventPlugins/__tests__/SelectEventPlugin-test.js
+2 -2
@@ -52,7 +52,7 @@ describe('SelectEventPlugin', function() {
52 var WithoutSelect = React.createClass({
53 render: function() {
54 return <input type="text" />;
55 - }
55 + },
56 });
57
58 var rendered = ReactTestUtils.renderIntoDocument(<WithoutSelect />);
@@ -72,7 +72,7 @@ describe('SelectEventPlugin', function() {
72 var WithSelect = React.createClass({
73 render: function() {
74 return <input type="text" onSelect={this.props.onSelect} />;
75 - }
75 + },
76 });
77
78 var cb = mocks.getMockFunction();
src/renderers/dom/client/syntheticEvents/SyntheticClipboardEvent.js
+1 -1
@@ -25,7 +25,7 @@ var ClipboardEventInterface = {
25 event.clipboardData :
26 window.clipboardData
27 );
28 - }
28 + },
29 };
30
31 /**
src/renderers/dom/client/syntheticEvents/SyntheticCompositionEvent.js
+1 -1
@@ -19,7 +19,7 @@ var SyntheticEvent = require('SyntheticEvent');
19 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
20 */
21 var CompositionEventInterface = {
22 - data: null
22 + data: null,
23 };
24
25 /**
src/renderers/dom/client/syntheticEvents/SyntheticDragEvent.js
+1 -1
@@ -19,7 +19,7 @@ var SyntheticMouseEvent = require('SyntheticMouseEvent');
19 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20 */
21 var DragEventInterface = {
22 - dataTransfer: null
22 + dataTransfer: null,
23 };
24
25 /**
src/renderers/dom/client/syntheticEvents/SyntheticEvent.js
+2 -2
@@ -34,7 +34,7 @@ var EventInterface = {
34 return event.timeStamp || Date.now();
35 },
36 defaultPrevented: null,
37 - isTrusted: null
37 + isTrusted: null,
38 };
39
40 /**
@@ -133,7 +133,7 @@ assign(SyntheticEvent.prototype, {
133 this.dispatchConfig = null;
134 this.dispatchMarker = null;
135 this.nativeEvent = null;
136 - }
136 + },
137
138 });
139
src/renderers/dom/client/syntheticEvents/SyntheticFocusEvent.js
+1 -1
@@ -19,7 +19,7 @@ var SyntheticUIEvent = require('SyntheticUIEvent');
19 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20 */
21 var FocusEventInterface = {
22 - relatedTarget: null
22 + relatedTarget: null,
23 };
24
25 /**
src/renderers/dom/client/syntheticEvents/SyntheticInputEvent.js
+1 -1
@@ -20,7 +20,7 @@ var SyntheticEvent = require('SyntheticEvent');
20 * /#events-inputevents
21 */
22 var InputEventInterface = {
23 - data: null
23 + data: null,
24 };
25
26 /**
src/renderers/dom/client/syntheticEvents/SyntheticKeyboardEvent.js
+1 -1
@@ -67,7 +67,7 @@ var KeyboardEventInterface = {
67 return event.keyCode;
68 }
69 return 0;
70 - }
70 + },
71 };
72
73 /**
src/renderers/dom/client/syntheticEvents/SyntheticMouseEvent.js
+1 -1
@@ -63,7 +63,7 @@ var MouseEventInterface = {
63 return 'pageY' in event ?
64 event.pageY :
65 event.clientY + ViewportMetrics.currentScrollTop;
66 - }
66 + },
67 };
68
69 /**
src/renderers/dom/client/syntheticEvents/SyntheticTouchEvent.js
+1 -1
@@ -28,7 +28,7 @@ var TouchEventInterface = {
28 metaKey: null,
29 ctrlKey: null,
30 shiftKey: null,
31 - getModifierState: getEventModifierState
31 + getModifierState: getEventModifierState,
32 };
33
34 /**
src/renderers/dom/client/syntheticEvents/SyntheticUIEvent.js
+1 -1
@@ -42,7 +42,7 @@ var UIEventInterface = {
42 },
43 detail: function(event) {
44 return event.detail || 0;
45 - }
45 + },
46 };
47
48 /**
src/renderers/dom/client/syntheticEvents/SyntheticWheelEvent.js
+1 -1
@@ -41,7 +41,7 @@ var WheelEventInterface = {
41 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
42 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
43 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
44 - deltaMode: null
44 + deltaMode: null,
45 };
46
47 /**
src/renderers/dom/client/utils/DOMChildrenOperations.js
+1 -1
@@ -134,7 +134,7 @@ var DOMChildrenOperations = {
134 break;
135 }
136 }
137 - }
137 + },
138
139 };
140
src/renderers/dom/client/utils/ViewportMetrics.js
+1 -1
@@ -20,7 +20,7 @@ var ViewportMetrics = {
20 refreshScrollValues: function(scrollPosition) {
21 ViewportMetrics.currentScrollLeft = scrollPosition.x;
22 ViewportMetrics.currentScrollTop = scrollPosition.y;
23 - }
23 + },
24
25 };
26
src/renderers/dom/client/utils/getEventKey.js
+2 -2
@@ -30,7 +30,7 @@ var normalizeKey = {
30 'Menu': 'ContextMenu',
31 'Apps': 'ContextMenu',
32 'Scroll': 'ScrollLock',
33 - 'MozPrintableKey': 'Unidentified'
33 + 'MozPrintableKey': 'Unidentified',
34 };
35
36 /**
@@ -64,7 +64,7 @@ var translateToKey = {
64 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
65 144: 'NumLock',
66 145: 'ScrollLock',
67 - 224: 'Meta'
67 + 224: 'Meta',
68 };
69
70 /**
src/renderers/dom/client/utils/getEventModifierState.js
+1 -1
@@ -21,7 +21,7 @@ var modifierKeyToProp = {
21 'Alt': 'altKey',
22 'Control': 'ctrlKey',
23 'Meta': 'metaKey',
24 - 'Shift': 'shiftKey'
24 + 'Shift': 'shiftKey',
25 };
26
27 // IE8 does not implement getModifierState so we simply map it to the only
src/renderers/dom/client/utils/getNodeForCharacterOffset.js
+1 -1
@@ -59,7 +59,7 @@ function getNodeForCharacterOffset(root, offset) {
59 if (nodeStart <= offset && nodeEnd >= offset) {
60 return {
61 node: node,
62 - offset: offset - nodeStart
62 + offset: offset - nodeStart,
63 };
64 }
65
src/renderers/dom/client/validateDOMNesting.js
+3 -3
@@ -41,7 +41,7 @@ if (__DEV__) {
41 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section',
42 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template',
43 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr',
44 - 'xmp'
44 + 'xmp',
45 ];
46
47 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
@@ -52,7 +52,7 @@ if (__DEV__) {
52 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
53 // TODO: Distinguish by namespace here -- for <title>, including it here
54 // errs on the side of fewer warnings
55 - 'foreignObject', 'desc', 'title'
55 + 'foreignObject', 'desc', 'title',
56 ];
57
58 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
@@ -72,7 +72,7 @@ if (__DEV__) {
72 pTagInButtonScope: null,
73
74 listItemTagAutoclosing: null,
75 - dlItemTagAutoclosing: null
75 + dlItemTagAutoclosing: null,
76 };
77
78 var updatedAncestorInfo = function(oldInfo, tag, instance) {
src/renderers/dom/client/wrappers/AutoFocusUtils.js
+2 -2
@@ -22,7 +22,7 @@ var Mixin = {
22 if (this.props.autoFocus) {
23 focusNode(findDOMNode(this));
24 }
25 - }
25 + },
26 };
27
28 var AutoFocusUtils = {
@@ -30,7 +30,7 @@ var AutoFocusUtils = {
30
31 focusDOMComponent: function() {
32 focusNode(ReactMount.getNode(this._rootNodeID));
33 - }
33 + },
34 };
35
36 module.exports = AutoFocusUtils;
src/renderers/dom/client/wrappers/LinkedValueUtils.js
+3 -3
@@ -24,7 +24,7 @@ var hasReadOnlyValue = {
24 'hidden': true,
25 'radio': true,
26 'reset': true,
27 - 'submit': true
27 + 'submit': true,
28 };
29
30 function _assertSingleLink(inputProps) {
@@ -83,7 +83,7 @@ var propTypes = {
83 'set either `onChange` or `readOnly`.'
84 );
85 },
86 - onChange: ReactPropTypes.func
86 + onChange: ReactPropTypes.func,
87 };
88
89 var loggedTypeFailures = {};
@@ -157,7 +157,7 @@ var LinkedValueUtils = {
157 } else if (inputProps.onChange) {
158 return inputProps.onChange.call(undefined, event);
159 }
160 - }
160 + },
161 };
162
163 module.exports = LinkedValueUtils;
src/renderers/dom/client/wrappers/LocalEventTrapMixin.js
+1 -1
@@ -48,7 +48,7 @@ var LocalEventTrapMixin = {
48 if (this._localEventListeners) {
49 forEachAccumulated(this._localEventListeners, remove);
50 }
51 - }
51 + },
52 };
53
54 module.exports = LocalEventTrapMixin;
src/renderers/dom/client/wrappers/ReactDOMButton.js
+2 -2
@@ -30,7 +30,7 @@ var mouseListenerNames = keyMirror({
30 onDoubleClickCapture: true,
31 onMouseDownCapture: true,
32 onMouseMoveCapture: true,
33 - onMouseUpCapture: true
33 + onMouseUpCapture: true,
34 });
35
36 /**
@@ -55,7 +55,7 @@ var ReactDOMButton = ReactClass.createClass({
55 }
56
57 return button(props, this.props.children);
58 - }
58 + },
59
60 });
61
src/renderers/dom/client/wrappers/ReactDOMForm.js
+1 -1
@@ -41,7 +41,7 @@ var ReactDOMForm = ReactClass.createClass({
41 componentDidMount: function() {
42 this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset');
43 this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit');
44 - }
44 + },
45 });
46
47 module.exports = ReactDOMForm;
src/renderers/dom/client/wrappers/ReactDOMIframe.js
+1 -1
@@ -37,7 +37,7 @@ var ReactDOMIframe = ReactClass.createClass({
37
38 componentDidMount: function() {
39 this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
40 - }
40 + },
41 });
42
43 module.exports = ReactDOMIframe;
src/renderers/dom/client/wrappers/ReactDOMImg.js
+1 -1
@@ -38,7 +38,7 @@ var ReactDOMImg = ReactClass.createClass({
38 componentDidMount: function() {
39 this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
40 this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error');
41 - }
41 + },
42 });
43
44 module.exports = ReactDOMImg;
src/renderers/dom/client/wrappers/ReactDOMInput.js
+3 -3
@@ -56,7 +56,7 @@ var ReactDOMInput = {
56 defaultValue: undefined,
57 value: value != null ? value : inst._wrapperState.initialValue,
58 checked: checked != null ? checked : inst._wrapperState.initialChecked,
59 - onChange: inst._wrapperState.onChange
59 + onChange: inst._wrapperState.onChange,
60 });
61
62 return nativeProps;
@@ -73,7 +73,7 @@ var ReactDOMInput = {
73 inst._wrapperState = {
74 initialChecked: props.defaultChecked || false,
75 initialValue: defaultValue != null ? defaultValue : null,
76 - onChange: _handleChange.bind(inst)
76 + onChange: _handleChange.bind(inst),
77 };
78
79 instancesByReactID[inst._rootNodeID] = inst;
@@ -115,7 +115,7 @@ var ReactDOMInput = {
115 '' + value
116 );
117 }
118 - }
118 + },
119 };
120
121 function _handleChange(event) {
src/renderers/dom/client/wrappers/ReactDOMOption.js
+1 -1
@@ -105,7 +105,7 @@ var ReactDOMOption = ReactClass.createClass({
105 });
106
107 return option(props, content);
108 - }
108 + },
109
110 });
111
src/renderers/dom/client/wrappers/ReactDOMSelect.js
+3 -3
@@ -122,12 +122,12 @@ var ReactDOMSelect = ReactClass.createClass({
122 mixins: [AutoFocusUtils.Mixin, ReactBrowserComponentMixin],
123
124 statics: {
125 - valueContextKey: valueContextKey
125 + valueContextKey: valueContextKey,
126 },
127
128 propTypes: {
129 defaultValue: selectValueType,
130 - value: selectValueType
130 + value: selectValueType,
131 },
132
133 componentWillMount: function() {
@@ -201,7 +201,7 @@ var ReactDOMSelect = ReactClass.createClass({
201 this._pendingUpdate = true;
202 ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
203 return returnValue;
204 - }
204 + },
205
206 });
207
src/renderers/dom/client/wrappers/ReactDOMTextarea.js
+2 -2
@@ -99,7 +99,7 @@ var ReactDOMTextarea = ReactClass.createClass({
99 // `textContent` (unnecessary since we update value).
100 // The initial value can be a boolean or object so that's why it's
101 // forced to be a string.
102 - initialValue: '' + (value != null ? value : defaultValue)
102 + initialValue: '' + (value != null ? value : defaultValue),
103 };
104 },
105
@@ -135,7 +135,7 @@ var ReactDOMTextarea = ReactClass.createClass({
135 var returnValue = LinkedValueUtils.executeOnChange(this.props, event);
136 ReactUpdates.asap(forceUpdateIfMounted, this);
137 return returnValue;
138 - }
138 + },
139
140 });
141
src/renderers/dom/client/wrappers/__tests__/LocalEventTrapMixin-test.js
+1 -1
@@ -32,7 +32,7 @@ describe('LocalEventTrapMixin', function() {
32 },
33 componentDidMount: function() {
34 this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');
35 - }
35 + },
36 });
37
38 expect(function() {
src/renderers/dom/client/wrappers/__tests__/ReactDOMButton-test.js
+1 -1
@@ -72,7 +72,7 @@ describe('ReactDOMButton', function() {
72
73 btn.setProps({
74 disabled: false,
75 - onClick: onClick
75 + onClick: onClick,
76 });
77
78 expectClickThru(btn);
src/renderers/dom/client/wrappers/__tests__/ReactDOMInput-test.js
+3 -3
@@ -57,7 +57,7 @@ describe('ReactDOMInput', function() {
57 var objToString = {
58 toString: function() {
59 return 'foobar';
60 - }
60 + },
61 };
62
63 var stub = <input type="text" defaultValue={objToString} />;
@@ -107,7 +107,7 @@ describe('ReactDOMInput', function() {
107 var objToString = {
108 toString: function() {
109 return 'foobar';
110 - }
110 + },
111 };
112
113 stub.replaceProps({value: objToString, onChange: emptyFunction});
@@ -168,7 +168,7 @@ describe('ReactDOMInput', function() {
168 </form>
169 </div>
170 );
171 - }
171 + },
172 });
173
174 var stub = ReactTestUtils.renderIntoDocument(<RadioGroup />);
src/renderers/dom/client/wrappers/__tests__/ReactDOMSelect-test.js
+3 -3
@@ -161,8 +161,8 @@ describe('ReactDOMSelect', function() {
161 children: [
162 <option value="a">a</option>,
163 <option value="b">b</option>,
164 - <option value="c">c</option>
165 - ]
164 + <option value="c">c</option>,
165 + ],
166 });
167
168 var node = React.findDOMNode(stub);
@@ -177,7 +177,7 @@ describe('ReactDOMSelect', function() {
177 animal: 'giraffe',
178 toString: function() {
179 return this.animal;
180 - }
180 + },
181 };
182
183 var stub =
src/renderers/dom/client/wrappers/__tests__/ReactDOMTextarea-test.js
+3 -3
@@ -68,7 +68,7 @@ describe('ReactDOMTextarea', function() {
68 var objToString = {
69 toString: function() {
70 return 'foobar';
71 - }
71 + },
72 };
73
74 var stub = <textarea type="text" defaultValue={objToString} />;
@@ -137,7 +137,7 @@ describe('ReactDOMTextarea', function() {
137 var objToString = {
138 toString: function() {
139 return 'foo';
140 - }
140 + },
141 };
142 stub.replaceProps({value: objToString, onChange: emptyFunction});
143 expect(node.value).toEqual('foo');
@@ -187,7 +187,7 @@ describe('ReactDOMTextarea', function() {
187 var obj = {
188 toString: function() {
189 return 'sharkswithlasers';
190 - }
190 + },
191 };
192 var node = React.findDOMNode(renderTextarea(<textarea>{obj}</textarea>));
193 expect(console.error.argsForCall.length).toBe(1);
src/renderers/dom/client/wrappers/createFullPageComponent.js
+1 -1
@@ -49,7 +49,7 @@ function createFullPageComponent(tag) {
49
50 render: function() {
51 return elementFactory(this.props);
52 - }
52 + },
53 });
54
55 return FullPageComponent;
src/renderers/dom/server/ReactMarkupChecksum.js
+1 -1
@@ -40,7 +40,7 @@ var ReactMarkupChecksum = {
40 existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
41 var markupChecksum = adler32(markup);
42 return markupChecksum === existingChecksum;
43 - }
43 + },
44 };
45
46 module.exports = ReactMarkupChecksum;
src/renderers/dom/server/ReactServerRendering.js
+1 -1
@@ -74,5 +74,5 @@ function renderToStaticMarkup(element) {
74
75 module.exports = {
76 renderToString: renderToString,
77 - renderToStaticMarkup: renderToStaticMarkup
77 + renderToStaticMarkup: renderToStaticMarkup,
78 };
src/renderers/dom/server/ReactServerRenderingTransaction.js
+3 -3
@@ -31,7 +31,7 @@ var ON_DOM_READY_QUEUEING = {
31 this.reactMountReady.reset();
32 },
33
34 - close: emptyFunction
34 + close: emptyFunction,
35 };
36
37 /**
@@ -40,7 +40,7 @@ var ON_DOM_READY_QUEUEING = {
40 * each other.
41 */
42 var TRANSACTION_WRAPPERS = [
43 - ON_DOM_READY_QUEUEING
43 + ON_DOM_READY_QUEUEING,
44 ];
45
46 /**
@@ -78,7 +78,7 @@ var Mixin = {
78 destructor: function() {
79 CallbackQueue.release(this.reactMountReady);
80 this.reactMountReady = null;
81 - }
81 + },
82 };
83
84
src/renderers/dom/server/ServerReactRootIndex.js
+1 -1
@@ -23,7 +23,7 @@ var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53);
23 var ServerReactRootIndex = {
24 createReactRootIndex: function() {
25 return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX);
26 - }
26 + },
27 };
28
29 module.exports = ServerReactRootIndex;
src/renderers/dom/server/__tests__/ReactServerRendering-test.js
+9 -9
@@ -71,12 +71,12 @@ describe('ReactServerRendering', function() {
71 var Parent = React.createClass({
72 render: function() {
73 return <div><Child name="child" /></div>;
74 - }
74 + },
75 });
76 var Child = React.createClass({
77 render: function() {
78 return <span>My name is {this.props.name}</span>;
79 - }
79 + },
80 });
81 var response = ReactServerRendering.renderToString(
82 <Parent />
@@ -124,7 +124,7 @@ describe('ReactServerRendering', function() {
124 },
125 componentWillUnmount: function() {
126 lifecycle.push('componentWillUnmount');
127 - }
127 + },
128 });
129
130 var response = ReactServerRendering.renderToString(
@@ -168,7 +168,7 @@ describe('ReactServerRendering', function() {
168 return (
169 <span ref="span" onClick={this.click}>Name: {this.props.name}</span>
170 );
171 - }
171 + },
172 });
173
174 var element = document.createElement('div');
@@ -242,13 +242,13 @@ describe('ReactServerRendering', function() {
242 var NestedComponent = React.createClass({
243 render: function() {
244 return <div>inner text</div>;
245 - }
245 + },
246 });
247
248 var TestComponent = React.createClass({
249 render: function() {
250 return <span><NestedComponent /></span>;
251 - }
251 + },
252 });
253
254 var response = ReactServerRendering.renderToStaticMarkup(
@@ -262,7 +262,7 @@ describe('ReactServerRendering', function() {
262 var TestComponent = React.createClass({
263 render: function() {
264 return <span>{'hello'} {'world'}</span>;
265 - }
265 + },
266 });
267
268 var response = ReactServerRendering.renderToStaticMarkup(
@@ -314,7 +314,7 @@ describe('ReactServerRendering', function() {
314 },
315 componentWillUnmount: function() {
316 lifecycle.push('componentWillUnmount');
317 - }
317 + },
318 });
319
320 var response = ReactServerRendering.renderToStaticMarkup(
@@ -353,7 +353,7 @@ describe('ReactServerRendering', function() {
353 },
354 render: function() {
355 return <div>{this.state.text}</div>;
356 - }
356 + },
357 });
358
359 ReactReconcileTransaction.prototype.perform = function() {
src/renderers/dom/shared/CSSProperty.js
+10 -10
@@ -38,7 +38,7 @@ var isUnitlessNumber = {
38 fillOpacity: true,
39 strokeDashoffset: true,
40 strokeOpacity: true,
41 - strokeWidth: true
41 + strokeWidth: true,
42 };
43
44 /**
@@ -79,32 +79,32 @@ var shorthandPropertyExpansions = {
79 backgroundImage: true,
80 backgroundPosition: true,
81 backgroundRepeat: true,
82 - backgroundColor: true
82 + backgroundColor: true,
83 },
84 border: {
85 borderWidth: true,
86 borderStyle: true,
87 - borderColor: true
87 + borderColor: true,
88 },
89 borderBottom: {
90 borderBottomWidth: true,
91 borderBottomStyle: true,
92 - borderBottomColor: true
92 + borderBottomColor: true,
93 },
94 borderLeft: {
95 borderLeftWidth: true,
96 borderLeftStyle: true,
97 - borderLeftColor: true
97 + borderLeftColor: true,
98 },
99 borderRight: {
100 borderRightWidth: true,
101 borderRightStyle: true,
102 - borderRightColor: true
102 + borderRightColor: true,
103 },
104 borderTop: {
105 borderTopWidth: true,
106 borderTopStyle: true,
107 - borderTopColor: true
107 + borderTopColor: true,
108 },
109 font: {
110 fontStyle: true,
@@ -112,13 +112,13 @@ var shorthandPropertyExpansions = {
112 fontWeight: true,
113 fontSize: true,
114 lineHeight: true,
115 - fontFamily: true
116 - }
115 + fontFamily: true,
116 + },
117 };
118
119 var CSSProperty = {
120 isUnitlessNumber: isUnitlessNumber,
121 - shorthandPropertyExpansions: shorthandPropertyExpansions
121 + shorthandPropertyExpansions: shorthandPropertyExpansions,
122 };
123
124 module.exports = CSSProperty;
src/renderers/dom/shared/CSSPropertyOperations.js
+1 -1
@@ -171,7 +171,7 @@ var CSSPropertyOperations = {
171 }
172 }
173 }
174 - }
174 + },
175
176 };
177
src/renderers/dom/shared/DOMProperty.js
+2 -2
@@ -150,7 +150,7 @@ var DOMPropertyInjection = {
150 propName
151 );
152 }
153 - }
153 + },
154 };
155 var defaultValueCache = {};
156
@@ -300,7 +300,7 @@ var DOMProperty = {
300 return nodeDefaults[prop];
301 },
302
303 - injection: DOMPropertyInjection
303 + injection: DOMPropertyInjection,
304 };
305
306 module.exports = DOMProperty;
src/renderers/dom/shared/DOMPropertyOperations.js
+2 -2
@@ -30,7 +30,7 @@ if (__DEV__) {
30 children: true,
31 dangerouslySetInnerHTML: true,
32 key: true,
33 - ref: true
33 + ref: true,
34 };
35 var warnedProperties = {};
36
@@ -187,7 +187,7 @@ var DOMPropertyOperations = {
187 } else if (__DEV__) {
188 warnUnknownProperty(name);
189 }
190 - }
190 + },
191
192 };
193
src/renderers/dom/shared/Danger.js
+1 -1
@@ -174,7 +174,7 @@ var Danger = {
174
175 var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
176 oldChild.parentNode.replaceChild(newChild, oldChild);
177 - }
177 + },
178
179 };
180
src/renderers/dom/shared/HTMLDOMPropertyConfig.js
+4 -4
@@ -184,13 +184,13 @@ var HTMLDOMPropertyConfig = {
184 // property is supported for OpenGraph in meta tags.
185 property: null,
186 // IE-only attribute that controls focus behavior
187 - unselectable: MUST_USE_ATTRIBUTE
187 + unselectable: MUST_USE_ATTRIBUTE,
188 },
189 DOMAttributeNames: {
190 acceptCharset: 'accept-charset',
191 className: 'class',
192 htmlFor: 'for',
193 - httpEquiv: 'http-equiv'
193 + httpEquiv: 'http-equiv',
194 },
195 DOMPropertyNames: {
196 autoCapitalize: 'autocapitalize',
@@ -205,8 +205,8 @@ var HTMLDOMPropertyConfig = {
205 radioGroup: 'radiogroup',
206 spellCheck: 'spellcheck',
207 srcDoc: 'srcdoc',
208 - srcSet: 'srcset'
209 - }
208 + srcSet: 'srcset',
209 + },
210 };
211
212 module.exports = HTMLDOMPropertyConfig;
src/renderers/dom/shared/ReactBrowserComponentMixin.js
+1 -1
@@ -35,7 +35,7 @@ var ReactBrowserComponentMixin = {
35 );
36 this.constructor[didWarnKey] = true;
37 return findDOMNode(this);
38 - }
38 + },
39 };
40
41 module.exports = ReactBrowserComponentMixin;
src/renderers/dom/shared/ReactComponentBrowserEnvironment.js
+1 -1
@@ -36,7 +36,7 @@ var ReactComponentBrowserEnvironment = {
36 */
37 unmountIDFromEnvironment: function(rootNodeID) {
38 ReactMount.purgeID(rootNodeID);
39 - }
39 + },
40
41 };
42
src/renderers/dom/shared/ReactDOMComponent.js
+7 -7
@@ -160,7 +160,7 @@ function enqueuePutListener(id, registrationName, listener, transaction) {
160 transaction.getReactMountReady().enqueue(putListener, {
161 id: id,
162 registrationName: registrationName,
163 - listener: listener
163 + listener: listener,
164 });
165 }
166
@@ -191,21 +191,21 @@ var omittedCloseTags = {
191 'param': true,
192 'source': true,
193 'track': true,
194 - 'wbr': true
194 + 'wbr': true,
195 // NOTE: menuitem's close tag should be omitted, but that causes problems.
196 };
197
198 var newlineEatingTags = {
199 'listing': true,
200 'pre': true,
201 - 'textarea': true
201 + 'textarea': true,
202 };
203
204 // For HTML, certain tags cannot have children. This has the same purpose as
205 // `omittedCloseTags` except that `menuitem` should still have its closing tag.
206
207 var voidElementTags = assign({
208 - 'menuitem': true
208 + 'menuitem': true,
209 }, omittedCloseTags);
210
211 // We accept any tag to be rendered but since this gets injected into arbitrary
@@ -653,13 +653,13 @@ ReactDOMComponent.Mixin = {
653 ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
654 this._rootNodeID = null;
655 this._wrapperState = null;
656 - }
656 + },
657
658 };
659
660 ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {
661 mountComponent: 'mountComponent',
662 - updateComponent: 'updateComponent'
662 + updateComponent: 'updateComponent',
663 });
664
665 assign(
@@ -671,7 +671,7 @@ assign(
671 ReactDOMComponent.injection = {
672 injectIDOperations: function(IDOperations) {
673 ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations;
674 - }
674 + },
675 };
676
677 module.exports = ReactDOMComponent;
src/renderers/dom/shared/ReactDOMTextComponent.js
+1 -1
@@ -119,7 +119,7 @@ assign(ReactDOMTextComponent.prototype, {
119
120 unmountComponent: function() {
121 ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
122 - }
122 + },
123
124 });
125
src/renderers/dom/shared/ReactDefaultInjection.js
+4 -4
@@ -60,7 +60,7 @@ function autoGenerateWrapperClass(type) {
60 internalInstance._currentElement._owner, // owner
61 this.props
62 );
63 - }
63 + },
64 });
65 }
66
@@ -95,7 +95,7 @@ function inject() {
95 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
96 ChangeEventPlugin: ChangeEventPlugin,
97 SelectEventPlugin: SelectEventPlugin,
98 - BeforeInputEventPlugin: BeforeInputEventPlugin
98 + BeforeInputEventPlugin: BeforeInputEventPlugin,
99 });
100
101 ReactInjection.NativeComponent.injectGenericComponentClass(
@@ -125,7 +125,7 @@ function inject() {
125
126 'html': createFullPageComponent('html'),
127 'head': createFullPageComponent('head'),
128 - 'body': createFullPageComponent('body')
128 + 'body': createFullPageComponent('body'),
129 });
130
131 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
@@ -159,5 +159,5 @@ function inject() {
159 }
160
161 module.exports = {
162 - inject: inject
162 + inject: inject,
163 };
src/renderers/dom/shared/ReactInjection.js
+1 -1
@@ -34,7 +34,7 @@ var ReactInjection = {
34 NativeComponent: ReactNativeComponent.injection,
35 Perf: ReactPerf.injection,
36 RootIndex: ReactRootIndex.injection,
37 - Updates: ReactUpdates.injection
37 + Updates: ReactUpdates.injection,
38 };
39
40 module.exports = ReactInjection;
src/renderers/dom/shared/SVGDOMPropertyConfig.js
+5 -5
@@ -17,7 +17,7 @@ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
17
18 var NS = {
19 xlink: 'http://www.w3.org/1999/xlink',
20 - xml: 'http://www.w3.org/XML/1998/namespace'
20 + xml: 'http://www.w3.org/XML/1998/namespace',
21 };
22
23 var SVGDOMPropertyConfig = {
@@ -75,7 +75,7 @@ var SVGDOMPropertyConfig = {
75 xmlSpace: MUST_USE_ATTRIBUTE,
76 y1: MUST_USE_ATTRIBUTE,
77 y2: MUST_USE_ATTRIBUTE,
78 - y: MUST_USE_ATTRIBUTE
78 + y: MUST_USE_ATTRIBUTE,
79 },
80 DOMAttributeNamespaces: {
81 xlinkActuate: NS.xlink,
@@ -87,7 +87,7 @@ var SVGDOMPropertyConfig = {
87 xlinkType: NS.xlink,
88 xmlBase: NS.xml,
89 xmlLang: NS.xml,
90 - xmlSpace: NS.xml
90 + xmlSpace: NS.xml,
91 },
92 DOMAttributeNames: {
93 clipPath: 'clip-path',
@@ -120,8 +120,8 @@ var SVGDOMPropertyConfig = {
120 xlinkType: 'xlink:type',
121 xmlBase: 'xml:base',
122 xmlLang: 'xml:lang',
123 - xmlSpace: 'xml:space'
124 - }
123 + xmlSpace: 'xml:space',
124 + },
125 };
126
127 module.exports = SVGDOMPropertyConfig;
src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
+13 -13
@@ -24,28 +24,28 @@ describe('CSSPropertyOperations', function() {
24 it('should create markup for simple styles', function() {
25 expect(CSSPropertyOperations.createMarkupForStyles({
26 backgroundColor: '#3b5998',
27 - display: 'none'
27 + display: 'none',
28 })).toBe('background-color:#3b5998;display:none;');
29 });
30
31 it('should ignore undefined styles', function() {
32 expect(CSSPropertyOperations.createMarkupForStyles({
33 backgroundColor: undefined,
34 - display: 'none'
34 + display: 'none',
35 })).toBe('display:none;');
36 });
37
38 it('should ignore null styles', function() {
39 expect(CSSPropertyOperations.createMarkupForStyles({
40 backgroundColor: null,
41 - display: 'none'
41 + display: 'none',
42 })).toBe('display:none;');
43 });
44
45 it('should return null for no styles', function() {
46 expect(CSSPropertyOperations.createMarkupForStyles({
47 backgroundColor: null,
48 - display: null
48 + display: null,
49 })).toBe(null);
50 });
51
@@ -54,7 +54,7 @@ describe('CSSPropertyOperations', function() {
54 left: 0,
55 margin: 16,
56 opacity: 0.5,
57 - padding: '4px'
57 + padding: '4px',
58 })).toBe('left:0;margin:16px;opacity:0.5;padding:4px;');
59 });
60
@@ -62,7 +62,7 @@ describe('CSSPropertyOperations', function() {
62 expect(CSSPropertyOperations.createMarkupForStyles({
63 margin: '16 ',
64 opacity: 0.5,
65 - padding: ' 4 '
65 + padding: ' 4 ',
66 })).toBe('margin:16px;opacity:0.5;padding:4px;');
67 });
68
@@ -80,14 +80,14 @@ describe('CSSPropertyOperations', function() {
80 it('should create vendor-prefixed markup correctly', function() {
81 expect(CSSPropertyOperations.createMarkupForStyles({
82 msTransition: 'none',
83 - MozTransition: 'none'
83 + MozTransition: 'none',
84 })).toBe('-ms-transition:none;-moz-transition:none;');
85 });
86
87 it('should set style attribute when styles exist', function() {
88 var styles = {
89 backgroundColor: '#000',
90 - display: 'none'
90 + display: 'none',
91 };
92 var div = <div style={styles} />;
93 var root = document.createElement('div');
@@ -98,7 +98,7 @@ describe('CSSPropertyOperations', function() {
98 it('should not set style attribute when no styles exist', function() {
99 var styles = {
100 backgroundColor: null,
101 - display: null
101 + display: null,
102 };
103 var div = <div style={styles} />;
104 var root = document.createElement('div');
@@ -110,7 +110,7 @@ describe('CSSPropertyOperations', function() {
110 spyOn(console, 'error');
111
112 expect(CSSPropertyOperations.createMarkupForStyles({
113 - 'background-color': 'crimson'
113 + 'background-color': 'crimson',
114 })).toBe('background-color:crimson;');
115
116 expect(console.error.argsForCall.length).toBe(1);
@@ -123,7 +123,7 @@ describe('CSSPropertyOperations', function() {
123 var root = document.createElement('div');
124 var styles = {
125 '-ms-transform': 'translate3d(0, 0, 0)',
126 - '-webkit-transform': 'translate3d(0, 0, 0)'
126 + '-webkit-transform': 'translate3d(0, 0, 0)',
127 };
128
129 React.render(<div />, root);
@@ -140,7 +140,7 @@ describe('CSSPropertyOperations', function() {
140 CSSPropertyOperations.createMarkupForStyles({
141 msTransform: 'translate3d(0, 0, 0)',
142 oTransform: 'translate3d(0, 0, 0)',
143 - webkitTransform: 'translate3d(0, 0, 0)'
143 + webkitTransform: 'translate3d(0, 0, 0)',
144 });
145
146 // msTransform is correct already and shouldn't warn
@@ -158,7 +158,7 @@ describe('CSSPropertyOperations', function() {
158 fontFamily: 'Helvetica, arial',
159 backgroundImage: 'url(foo;bar)',
160 backgroundColor: 'blue;',
161 - color: 'red; '
161 + color: 'red; ',
162 });
163
164 expect(console.error.calls.length).toBe(2);
src/renderers/dom/shared/__tests__/DOMPropertyOperations-test.js
+6 -6
@@ -215,7 +215,7 @@ describe('DOMPropertyOperations', function() {
215 var obj = {
216 toString: function() {
217 return '<html>';
218 - }
218 + },
219 };
220 DOMPropertyOperations.setValueForProperty(stubNode, 'role', obj);
221 expect(stubNode.getAttribute('role')).toBe('<html>');
@@ -251,8 +251,8 @@ describe('DOMPropertyOperations', function() {
251 DOMProperty.injection.injectDOMPropertyConfig({
252 Properties: {foobar: null},
253 DOMMutationMethods: {
254 - foobar: foobarSetter
255 - }
254 + foobar: foobarSetter,
255 + },
256 });
257
258 DOMPropertyOperations.setValueForProperty(
@@ -290,8 +290,8 @@ describe('DOMPropertyOperations', function() {
290 DOMProperty.injection.injectDOMPropertyConfig({
291 Properties: {foobar: DOMProperty.injection.MUST_USE_PROPERTY},
292 DOMPropertyNames: {
293 - foobar: 'className'
294 - }
293 + foobar: 'className',
294 + },
295 });
296
297 DOMPropertyOperations.setValueForProperty(
@@ -332,7 +332,7 @@ describe('DOMPropertyOperations', function() {
332 isCustomAttribute: function(name) {
333 return name.indexOf('foo-') === 0;
334 },
335 - Properties: {foobar: null}
335 + Properties: {foobar: null},
336 });
337
338 // Ensure old attributes still work
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
+19 -19
@@ -108,7 +108,7 @@ describe('ReactDOMComponent', function() {
108 },
109 render: function() {
110 return <div style={this.state.style}>asd</div>;
111 - }
111 + },
112 });
113
114 var stub = ReactTestUtils.renderIntoDocument(<App />);
@@ -272,7 +272,7 @@ describe('ReactDOMComponent', function() {
272 },
273 set: nodeValueSetter.mockImplementation(function(newValue) {
274 nodeValue = newValue;
275 - })
275 + }),
276 });
277
278 React.render(<div value="" />, container);
@@ -320,7 +320,7 @@ describe('ReactDOMComponent', function() {
320 expected += quoteRegexp(value) + '[\\\'"]';
321 }
322 return this.actual.match(new RegExp(expected));
323 - }
323 + },
324 });
325 });
326
@@ -332,7 +332,7 @@ describe('ReactDOMComponent', function() {
332
333 it('should escape style names and values', function() {
334 expect(genMarkup({
335 - style: {'b&ckground': '<3'}
335 + style: {'b&ckground': '<3'},
336 })).toHaveAttribute('style', 'b&amp;ckground:&lt;3;');
337 });
338 });
@@ -369,7 +369,7 @@ describe('ReactDOMComponent', function() {
369 toHaveInnerhtml: function(html) {
370 var expected = '^' + quoteRegexp(html) + '$';
371 return this.actual.match(new RegExp(expected));
372 - }
372 + },
373 });
374 });
375
@@ -404,7 +404,7 @@ describe('ReactDOMComponent', function() {
404 var stubComponent = new StubNativeComponent({
405 type: StubNativeComponent,
406 props: props,
407 - _owner: null
407 + _owner: null,
408 });
409 return stubComponent.mountComponent('test', transaction, {});
410 };
@@ -638,8 +638,8 @@ describe('ReactDOMComponent', function() {
638 React.DOM.div({
639 title: '\'"<>&',
640 style: {
641 - textAlign: '\'"<>&'
642 - }
641 + textAlign: '\'"<>&',
642 + },
643 }, '\'"<>&')
644 )
645 ).toBe(
@@ -761,12 +761,12 @@ describe('ReactDOMComponent', function() {
761 var Row = React.createClass({
762 render: function() {
763 return <tr />;
764 - }
764 + },
765 });
766 var Foo = React.createClass({
767 render: function() {
768 return <table><Row /></table>;
769 - }
769 + },
770 });
771 ReactTestUtils.renderIntoDocument(<Foo />);
772
@@ -781,27 +781,27 @@ describe('ReactDOMComponent', function() {
781 it('gives useful context in warnings', () => {
782 spyOn(console, 'error');
783 var Row = React.createClass({
784 - render: () => <tr />
784 + render: () => <tr />,
785 });
786 var FancyRow = React.createClass({
787 - render: () => <Row />
787 + render: () => <Row />,
788 });
789 var Table = React.createClass({
790 render: function() {
791 return <table>{this.props.children}</table>;
792 - }
792 + },
793 });
794 var FancyTable = React.createClass({
795 render: function() {
796 return <Table>{this.props.children}</Table>;
797 - }
797 + },
798 });
799
800 var Viz1 = React.createClass({
801 - render: () => <table><FancyRow /></table>
801 + render: () => <table><FancyRow /></table>,
802 });
803 var App1 = React.createClass({
804 - render: () => <Viz1 />
804 + render: () => <Viz1 />,
805 });
806 ReactTestUtils.renderIntoDocument(<App1 />);
807 expect(console.error.calls.length).toBe(1);
@@ -810,10 +810,10 @@ describe('ReactDOMComponent', function() {
810 );
811
812 var Viz2 = React.createClass({
813 - render: () => <FancyTable><FancyRow /></FancyTable>
813 + render: () => <FancyTable><FancyRow /></FancyTable>,
814 });
815 var App2 = React.createClass({
816 - render: () => <Viz2 />
816 + render: () => <Viz2 />,
817 });
818 ReactTestUtils.renderIntoDocument(<App2 />);
819 expect(console.error.calls.length).toBe(2);
@@ -842,7 +842,7 @@ describe('ReactDOMComponent', function() {
842 var Link = React.createClass({
843 render: function() {
844 return <a>{this.props.children}</a>;
845 - }
845 + },
846 });
847 ReactTestUtils.renderIntoDocument(<Link><div><Link /></div></Link>);
848 expect(console.error.calls.length).toBe(6);
src/renderers/shared/event/EventConstants.js
+2 -2
@@ -59,12 +59,12 @@ var topLevelTypes = keyMirror({
59 topTouchEnd: null,
60 topTouchMove: null,
61 topTouchStart: null,
62 - topWheel: null
62 + topWheel: null,
63 });
64
65 var EventConstants = {
66 topLevelTypes: topLevelTypes,
67 - PropagationPhases: PropagationPhases
67 + PropagationPhases: PropagationPhases,
68 };
69
70 module.exports = EventConstants;
src/renderers/shared/event/EventPluginHub.js
+2 -2
@@ -131,7 +131,7 @@ var EventPluginHub = {
131 /**
132 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
133 */
134 - injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
134 + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName,
135
136 },
137
@@ -291,7 +291,7 @@ var EventPluginHub = {
291
292 __getListenerBank: function() {
293 return listenerBank;
294 - }
294 + },
295
296 };
297
src/renderers/shared/event/EventPluginRegistry.js
+1 -1
@@ -265,7 +265,7 @@ var EventPluginRegistry = {
265 delete registrationNameModules[registrationName];
266 }
267 }
268 - }
268 + },
269
270 };
271
src/renderers/shared/event/EventPluginUtils.js
+2 -2
@@ -35,7 +35,7 @@ var injection = {
35 'module is missing getNode or getID.'
36 );
37 }
38 - }
38 + },
39 };
40
41 var topLevelTypes = EventConstants.topLevelTypes;
@@ -219,7 +219,7 @@ var EventPluginUtils = {
219 return injection.Mount.getID(node);
220 },
221
222 - injection: injection
222 + injection: injection,
223 };
224
225 module.exports = EventPluginUtils;
src/renderers/shared/event/EventPropagators.js
+1 -1
@@ -153,7 +153,7 @@ var EventPropagators = {
153 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
154 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
155 accumulateDirectDispatches: accumulateDirectDispatches,
156 - accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
156 + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches,
157 };
158
159 module.exports = EventPropagators;
src/renderers/shared/event/__tests__/EventPluginRegistry-test.js
+28 -28
@@ -34,10 +34,10 @@ describe('EventPluginRegistry', function() {
34 EventPluginRegistry.injectEventPluginOrder(['one', 'two', 'three']);
35 EventPluginRegistry.injectEventPluginsByName({
36 one: OnePlugin,
37 - two: TwoPlugin
37 + two: TwoPlugin,
38 });
39 EventPluginRegistry.injectEventPluginsByName({
40 - three: ThreePlugin
40 + three: ThreePlugin,
41 });
42
43 expect(EventPluginRegistry.plugins.length).toBe(3);
@@ -53,11 +53,11 @@ describe('EventPluginRegistry', function() {
53
54 EventPluginRegistry.injectEventPluginsByName({
55 one: OnePlugin,
56 - two: TwoPlugin
56 + two: TwoPlugin,
57 });
58 EventPluginRegistry.injectEventPluginOrder(['one', 'two', 'three']);
59 EventPluginRegistry.injectEventPluginsByName({
60 - three: ThreePlugin
60 + three: ThreePlugin,
61 });
62
63 expect(EventPluginRegistry.plugins.length).toBe(3);
@@ -73,12 +73,12 @@ describe('EventPluginRegistry', function() {
73
74 EventPluginRegistry.injectEventPluginsByName({
75 one: OnePlugin,
76 - three: ThreePlugin
76 + three: ThreePlugin,
77 });
78 EventPluginRegistry.injectEventPluginOrder(['one', 'two', 'three']);
79 EventPluginRegistry.injectEventPluginsByName({
80 two: TwoPlugin,
81 - three: ThreePlugin
81 + three: ThreePlugin,
82 });
83
84 expect(EventPluginRegistry.plugins.length).toBe(3);
@@ -94,7 +94,7 @@ describe('EventPluginRegistry', function() {
94
95 expect(function() {
96 EventPluginRegistry.injectEventPluginsByName({
97 - bad: BadPlugin
97 + bad: BadPlugin,
98 });
99 }).toThrow(
100 'Invariant Violation: EventPluginRegistry: Event plugins must ' +
@@ -111,7 +111,7 @@ describe('EventPluginRegistry', function() {
111 expect(function() {
112 EventPluginRegistry.injectEventPluginsByName({
113 one: OnePlugin,
114 - random: RandomPlugin
114 + random: RandomPlugin,
115 });
116 }).toThrow(
117 'Invariant Violation: EventPluginRegistry: Cannot inject event plugins ' +
@@ -151,18 +151,18 @@ describe('EventPluginRegistry', function() {
151 var OnePlugin = createPlugin({
152 eventTypes: {
153 click: {registrationName: 'onClick'},
154 - focus: {registrationName: 'onFocus'}
155 - }
154 + focus: {registrationName: 'onFocus'},
155 + },
156 });
157 var TwoPlugin = createPlugin({
158 eventTypes: {
159 magic: {
160 phasedRegistrationNames: {
161 bubbled: 'onMagicBubble',
162 - captured: 'onMagicCapture'
163 - }
164 - }
165 - }
162 + captured: 'onMagicCapture',
163 + },
164 + },
165 + },
166 });
167
168 EventPluginRegistry.injectEventPluginsByName({one: OnePlugin});
@@ -184,23 +184,23 @@ describe('EventPluginRegistry', function() {
184 it('should throw if multiple registration names collide', function() {
185 var OnePlugin = createPlugin({
186 eventTypes: {
187 - photoCapture: {registrationName: 'onPhotoCapture'}
188 - }
187 + photoCapture: {registrationName: 'onPhotoCapture'},
188 + },
189 });
190 var TwoPlugin = createPlugin({
191 eventTypes: {
192 photo: {
193 phasedRegistrationNames: {
194 bubbled: 'onPhotoBubble',
195 - captured: 'onPhotoCapture'
196 - }
197 - }
198 - }
195 + captured: 'onPhotoCapture',
196 + },
197 + },
198 + },
199 });
200
201 EventPluginRegistry.injectEventPluginsByName({
202 one: OnePlugin,
203 - two: TwoPlugin
203 + two: TwoPlugin,
204 });
205
206 expect(function() {
@@ -214,8 +214,8 @@ describe('EventPluginRegistry', function() {
214 it('should throw if an invalid event is published', function() {
215 var OnePlugin = createPlugin({
216 eventTypes: {
217 - badEvent: {/* missing configuration */}
218 - }
217 + badEvent: {/* missing configuration */},
218 + },
219 });
220
221 EventPluginRegistry.injectEventPluginsByName({one: OnePlugin});
@@ -230,20 +230,20 @@ describe('EventPluginRegistry', function() {
230
231 it('should be able to get the plugin from synthetic events', function() {
232 var clickDispatchConfig = {
233 - registrationName: 'onClick'
233 + registrationName: 'onClick',
234 };
235 var magicDispatchConfig = {
236 phasedRegistrationNames: {
237 bubbled: 'onMagicBubble',
238 - captured: 'onMagicCapture'
239 - }
238 + captured: 'onMagicCapture',
239 + },
240 };
241
242 var OnePlugin = createPlugin({
243 eventTypes: {
244 click: clickDispatchConfig,
245 - magic: magicDispatchConfig
246 - }
245 + magic: magicDispatchConfig,
246 + },
247 });
248
249 var clickEvent = {dispatchConfig: clickDispatchConfig};
src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
+12 -12
@@ -66,8 +66,8 @@ var eventTypes = {
66 startShouldSetResponder: {
67 phasedRegistrationNames: {
68 bubbled: keyOf({onStartShouldSetResponder: null}),
69 - captured: keyOf({onStartShouldSetResponderCapture: null})
70 - }
69 + captured: keyOf({onStartShouldSetResponderCapture: null}),
70 + },
71 },
72
73 /**
@@ -82,8 +82,8 @@ var eventTypes = {
82 scrollShouldSetResponder: {
83 phasedRegistrationNames: {
84 bubbled: keyOf({onScrollShouldSetResponder: null}),
85 - captured: keyOf({onScrollShouldSetResponderCapture: null})
86 - }
85 + captured: keyOf({onScrollShouldSetResponderCapture: null}),
86 + },
87 },
88
89 /**
@@ -96,8 +96,8 @@ var eventTypes = {
96 selectionChangeShouldSetResponder: {
97 phasedRegistrationNames: {
98 bubbled: keyOf({onSelectionChangeShouldSetResponder: null}),
99 - captured: keyOf({onSelectionChangeShouldSetResponderCapture: null})
100 - }
99 + captured: keyOf({onSelectionChangeShouldSetResponderCapture: null}),
100 + },
101 },
102
103 /**
@@ -107,8 +107,8 @@ var eventTypes = {
107 moveShouldSetResponder: {
108 phasedRegistrationNames: {
109 bubbled: keyOf({onMoveShouldSetResponder: null}),
110 - captured: keyOf({onMoveShouldSetResponderCapture: null})
111 - }
110 + captured: keyOf({onMoveShouldSetResponderCapture: null}),
111 + },
112 },
113
114 /**
@@ -119,11 +119,11 @@ var eventTypes = {
119 responderEnd: {registrationName: keyOf({onResponderEnd: null})},
120 responderRelease: {registrationName: keyOf({onResponderRelease: null})},
121 responderTerminationRequest: {
122 - registrationName: keyOf({onResponderTerminationRequest: null})
122 + registrationName: keyOf({onResponderTerminationRequest: null}),
123 },
124 responderGrant: {registrationName: keyOf({onResponderGrant: null})},
125 responderReject: {registrationName: keyOf({onResponderReject: null})},
126 - responderTerminate: {registrationName: keyOf({onResponderTerminate: null})}
126 + responderTerminate: {registrationName: keyOf({onResponderTerminate: null})},
127 };
128
129 /**
@@ -584,8 +584,8 @@ var ResponderEventPlugin = {
584 */
585 injectGlobalInteractionHandler: function(GlobalInteractionHandler) {
586 ResponderEventPlugin.GlobalInteractionHandler = GlobalInteractionHandler;
587 - }
588 - }
587 + },
588 + },
589 };
590
591 module.exports = ResponderEventPlugin;
src/renderers/shared/event/eventPlugins/ResponderSyntheticEvent.js
+1 -1
@@ -22,7 +22,7 @@ var SyntheticEvent = require('SyntheticEvent');
22 var ResponderEventInterface = {
23 touchHistory: function(nativeEvent) {
24 return null; // Actually doesn't even look at the native event.
25 - }
25 + },
26 };
27
28 /**
src/renderers/shared/event/eventPlugins/ResponderTouchHistoryStore.js
+3 -3
@@ -43,7 +43,7 @@ var touchHistory = {
43 // us having to loop through all of the touches all the time in the most
44 // common case.
45 indexOfSingleActiveTouch: -1,
46 - mostRecentTimeStamp: 0
46 + mostRecentTimeStamp: 0,
47 };
48
49 var timestampForTouch = function(touch) {
@@ -69,7 +69,7 @@ var initializeTouchData = function(touch) {
69 currentTimeStamp: timestampForTouch(touch),
70 previousPageX: touch.pageX,
71 previousPageY: touch.pageY,
72 - previousTimeStamp: timestampForTouch(touch)
72 + previousTimeStamp: timestampForTouch(touch),
73 };
74 };
75
@@ -178,7 +178,7 @@ var ResponderTouchHistoryStore = {
178 }
179 },
180
181 - touchHistory: touchHistory
181 + touchHistory: touchHistory,
182 };
183
184
src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js
+8 -8
@@ -39,7 +39,7 @@ var touchEvent = function(nodeHandle, touches, changedTouches) {
39 return {
40 target: nodeHandle,
41 changedTouches: changedTouches,
42 - touches: touches
42 + touches: touches,
43 };
44 };
45
@@ -85,7 +85,7 @@ var _touchConfig =
85 ),
86 topLevelType: topType,
87 target: targetNodeHandle,
88 - targetID: targetNodeHandle
88 + targetID: targetNodeHandle,
89 };
90 };
91
@@ -183,7 +183,7 @@ var oneEventLoopTestConfig = function(readableIDToID) {
183 responderMove: {},
184 responderTerminate: {},
185 responderEnd: {},
186 - responderRelease: {}
186 + responderRelease: {},
187 };
188 for (var eventName in ret) {
189 for (var readableNodeName in readableIDToID) {
@@ -309,13 +309,13 @@ var run = function(config, hierarchyConfig, nativeEventConfig) {
309 var three = {
310 grandParent: GRANDPARENT_ID,
311 parent: PARENT_ID,
312 - child: CHILD_ID
312 + child: CHILD_ID,
313 };
314
315 var siblings = {
316 parent: PARENT_ID,
317 childOne: CHILD_ID,
318 - childTwo: CHILD_ID2
318 + childTwo: CHILD_ID2,
319 };
320
321 describe('ResponderEventPlugin', function() {
@@ -338,7 +338,7 @@ describe('ResponderEventPlugin', function() {
338 },
339 getID: function(nodeHandle) {
340 return nodeHandle;
341 - }
341 + },
342 });
343
344 topLevelTypes = EventConstants.topLevelTypes;
@@ -913,7 +913,7 @@ describe('ResponderEventPlugin', function() {
913 topLevelType: topLevelTypes.topScroll,
914 target: three.parent,
915 targetID: three.parent,
916 - nativeEvent: {}
916 + nativeEvent: {},
917 });
918 expect(ResponderEventPlugin.getResponderID()).toBe(three.child);
919
@@ -931,7 +931,7 @@ describe('ResponderEventPlugin', function() {
931 topLevelType: topLevelTypes.topScroll,
932 target: three.parent,
933 targetID: three.parent,
934 - nativeEvent: {}
934 + nativeEvent: {},
935 });
936 expect(ResponderEventPlugin.getResponderID()).toBe(three.parent);
937
src/renderers/shared/reconciler/ReactChildReconciler.js
+1 -1
@@ -120,7 +120,7 @@ var ReactChildReconciler = {
120 ReactReconciler.unmountComponent(renderedChild);
121 }
122 }
123 - }
123 + },
124
125 };
126
src/renderers/shared/reconciler/ReactComponentEnvironment.js
+2 -2
@@ -49,8 +49,8 @@ var ReactComponentEnvironment = {
49 ReactComponentEnvironment.processChildrenUpdates =
50 environment.processChildrenUpdates;
51 injected = true;
52 - }
53 - }
52 + },
53 + },
54
55 };
56
src/renderers/shared/reconciler/ReactCompositeComponent.js
+3 -3
@@ -828,7 +828,7 @@ var ReactCompositeComponentMixin = {
828 },
829
830 // Stub
831 - _instantiateReactComponent: null
831 + _instantiateReactComponent: null,
832
833 };
834
@@ -838,13 +838,13 @@ ReactPerf.measureMethods(
838 {
839 mountComponent: 'mountComponent',
840 updateComponent: 'updateComponent',
841 - _renderValidatedComponent: '_renderValidatedComponent'
841 + _renderValidatedComponent: '_renderValidatedComponent',
842 }
843 );
844
845 var ReactCompositeComponent = {
846
847 - Mixin: ReactCompositeComponentMixin
847 + Mixin: ReactCompositeComponentMixin,
848
849 };
850
src/renderers/shared/reconciler/ReactCurrentOwner.js
+1 -1
@@ -23,7 +23,7 @@ var ReactCurrentOwner = {
23 * @internal
24 * @type {ReactComponent}
25 */
26 - current: null
26 + current: null,
27
28 };
29
src/renderers/shared/reconciler/ReactDefaultBatchingStrategy.js
+4 -4
@@ -21,12 +21,12 @@ var RESET_BATCHED_UPDATES = {
21 initialize: emptyFunction,
22 close: function() {
23 ReactDefaultBatchingStrategy.isBatchingUpdates = false;
24 - }
24 + },
25 };
26
27 var FLUSH_BATCHED_UPDATES = {
28 initialize: emptyFunction,
29 - close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
29 + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates),
30 };
31
32 var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
@@ -41,7 +41,7 @@ assign(
41 {
42 getTransactionWrappers: function() {
43 return TRANSACTION_WRAPPERS;
44 - }
44 + },
45 }
46 );
47
@@ -65,7 +65,7 @@ var ReactDefaultBatchingStrategy = {
65 } else {
66 transaction.perform(callback, null, a, b, c, d, e);
67 }
68 - }
68 + },
69 };
70
71 module.exports = ReactDefaultBatchingStrategy;
src/renderers/shared/reconciler/ReactEmptyComponent.js
+2 -2
@@ -24,7 +24,7 @@ var nullComponentIDsRegistry = {};
24 var ReactEmptyComponentInjection = {
25 injectEmptyComponent: function(emptyComponent) {
26 component = ReactElement.createFactory(emptyComponent);
27 - }
27 + },
28 };
29
30 var ReactEmptyComponentType = function() {};
@@ -85,7 +85,7 @@ function isNullComponentID(id) {
85 var ReactEmptyComponent = {
86 emptyElement: emptyElement,
87 injection: ReactEmptyComponentInjection,
88 - isNullComponentID: isNullComponentID
88 + isNullComponentID: isNullComponentID,
89 };
90
91 module.exports = ReactEmptyComponent;
src/renderers/shared/reconciler/ReactEventEmitterMixin.js
+1 -1
@@ -42,7 +42,7 @@ var ReactEventEmitterMixin = {
42 );
43
44 runEventQueueInBatch(events);
45 - }
45 + },
46 };
47
48 module.exports = ReactEventEmitterMixin;
src/renderers/shared/reconciler/ReactInstanceHandles.js
+1 -1
@@ -331,7 +331,7 @@ var ReactInstanceHandles = {
331
332 isAncestorIDOf: isAncestorIDOf,
333
334 - SEPARATOR: SEPARATOR
334 + SEPARATOR: SEPARATOR,
335
336 };
337
src/renderers/shared/reconciler/ReactInstanceMap.js
+1 -1
@@ -40,7 +40,7 @@ var ReactInstanceMap = {
40
41 set: function(key, value) {
42 key._reactInternalInstance = value;
43 - }
43 + },
44
45 };
46
src/renderers/shared/reconciler/ReactLifeCycle.js
+1 -1
@@ -29,7 +29,7 @@
29
30 var ReactLifeCycle = {
31 currentlyMountingInstance: null,
32 - currentlyUnmountingInstance: null
32 + currentlyUnmountingInstance: null,
33 };
34
35 module.exports = ReactLifeCycle;
src/renderers/shared/reconciler/ReactMultiChild.js
+6 -6
@@ -62,7 +62,7 @@ function enqueueMarkup(parentID, markup, toIndex) {
62 markupIndex: markupQueue.push(markup) - 1,
63 textContent: null,
64 fromIndex: null,
65 - toIndex: toIndex
65 + toIndex: toIndex,
66 });
67 }
68
@@ -83,7 +83,7 @@ function enqueueMove(parentID, fromIndex, toIndex) {
83 markupIndex: null,
84 textContent: null,
85 fromIndex: fromIndex,
86 - toIndex: toIndex
86 + toIndex: toIndex,
87 });
88 }
89
@@ -103,7 +103,7 @@ function enqueueRemove(parentID, fromIndex) {
103 markupIndex: null,
104 textContent: null,
105 fromIndex: fromIndex,
106 - toIndex: null
106 + toIndex: null,
107 });
108 }
109
@@ -123,7 +123,7 @@ function enqueueTextContent(parentID, textContent) {
123 markupIndex: null,
124 textContent: textContent,
125 fromIndex: null,
126 - toIndex: null
126 + toIndex: null,
127 });
128 }
129
@@ -419,9 +419,9 @@ var ReactMultiChild = {
419 _unmountChildByName: function(child, name) {
420 this.removeChild(child);
421 child._mountIndex = null;
422 - }
422 + },
423
424 - }
424 + },
425
426 };
427
src/renderers/shared/reconciler/ReactMultiChildUpdateTypes.js
+1 -1
@@ -25,7 +25,7 @@ var ReactMultiChildUpdateTypes = keyMirror({
25 INSERT_MARKUP: null,
26 MOVE_EXISTING: null,
27 REMOVE_NODE: null,
28 - TEXT_CONTENT: null
28 + TEXT_CONTENT: null,
29 });
30
31 module.exports = ReactMultiChildUpdateTypes;
src/renderers/shared/reconciler/ReactNativeComponent.js
+2 -2
@@ -40,7 +40,7 @@ var ReactNativeComponentInjection = {
40 // for this release.
41 injectAutoWrapper: function(wrapperFactory) {
42 autoGenerateWrapperClass = wrapperFactory;
43 - }
43 + },
44 };
45
46 /**
@@ -97,7 +97,7 @@ var ReactNativeComponent = {
97 createInternalComponent: createInternalComponent,
98 createInstanceForText: createInstanceForText,
99 isTextComponent: isTextComponent,
100 - injection: ReactNativeComponentInjection
100 + injection: ReactNativeComponentInjection,
101 };
102
103 module.exports = ReactNativeComponent;
src/renderers/shared/reconciler/ReactOwner.js
+1 -1
@@ -102,7 +102,7 @@ var ReactOwner = {
102 if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) {
103 owner.detachRef(ref);
104 }
105 - }
105 + },
106
107 };
108
src/renderers/shared/reconciler/ReactReconciler.js
+1 -1
@@ -113,7 +113,7 @@ var ReactReconciler = {
113 transaction
114 ) {
115 internalInstance.performUpdateIfNecessary(transaction);
116 - }
116 + },
117
118 };
119
src/renderers/shared/reconciler/ReactRootIndex.js
+2 -2
@@ -18,12 +18,12 @@ var ReactRootIndexInjection = {
18 */
19 injectCreateReactRootIndex: function(_createReactRootIndex) {
20 ReactRootIndex.createReactRootIndex = _createReactRootIndex;
21 - }
21 + },
22 };
23
24 var ReactRootIndex = {
25 createReactRootIndex: null,
26 - injection: ReactRootIndexInjection
26 + injection: ReactRootIndexInjection,
27 };
28
29 module.exports = ReactRootIndex;
src/renderers/shared/reconciler/ReactStateSetters.js
+2 -2
@@ -46,7 +46,7 @@ var ReactStateSetters = {
46 // Memoize the setters.
47 var cache = component.__keySetters || (component.__keySetters = {});
48 return cache[key] || (cache[key] = createStateKeySetter(component, key));
49 - }
49 + },
50 };
51
52 function createStateKeySetter(component, key) {
@@ -98,7 +98,7 @@ ReactStateSetters.Mixin = {
98 */
99 createStateKeySetter: function(key) {
100 return ReactStateSetters.createStateKeySetter(this, key);
101 - }
101 + },
102 };
103
104 module.exports = ReactStateSetters;
src/renderers/shared/reconciler/ReactUpdateQueue.js
+1 -1
@@ -288,7 +288,7 @@ var ReactUpdateQueue = {
288 enqueueElementInternal: function(internalInstance, newElement) {
289 internalInstance._pendingElement = newElement;
290 enqueueUpdate(internalInstance);
291 - }
291 + },
292
293 };
294
src/renderers/shared/reconciler/ReactUpdates.js
+5 -5
@@ -52,7 +52,7 @@ var NESTED_UPDATES = {
52 } else {
53 dirtyComponents.length = 0;
54 }
55 - }
55 + },
56 };
57
58 var UPDATE_QUEUEING = {
@@ -61,7 +61,7 @@ var UPDATE_QUEUEING = {
61 },
62 close: function() {
63 this.callbackQueue.notifyAll();
64 - }
64 + },
65 };
66
67 var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
@@ -100,7 +100,7 @@ assign(
100 scope,
101 a
102 );
103 - }
103 + },
104 });
105
106 PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
@@ -256,7 +256,7 @@ var ReactUpdatesInjection = {
256 'ReactUpdates: must provide an isBatchingUpdates boolean attribute'
257 );
258 batchingStrategy = _batchingStrategy;
259 - }
259 + },
260 };
261
262 var ReactUpdates = {
@@ -272,7 +272,7 @@ var ReactUpdates = {
272 enqueueUpdate: enqueueUpdate,
273 flushBatchedUpdates: flushBatchedUpdates,
274 injection: ReactUpdatesInjection,
275 - asap: asap
275 + asap: asap,
276 };
277
278 module.exports = ReactUpdates;
src/renderers/shared/reconciler/__tests__/ReactComponent-test.js
+11 -11
@@ -59,7 +59,7 @@ describe('ReactComponent', function() {
59
60 render: function() {
61 return <div>{this.props.children}</div>;
62 - }
62 + },
63
64 });
65
@@ -72,7 +72,7 @@ describe('ReactComponent', function() {
72 componentDidMount: function() {
73 expect(this.refs.inner.getObject()).toEqual(innerObj);
74 expect(this.refs.outer.getObject()).toEqual(outerObj);
75 - }
75 + },
76 });
77
78 var instance = <Component />;
@@ -86,12 +86,12 @@ describe('ReactComponent', function() {
86 },
87 componentDidMount: function() {
88 expect(this.refs && this.refs.test).toEqual(undefined);
89 - }
89 + },
90 });
91 var Child = React.createClass({
92 render: function() {
93 return <div />;
94 - }
94 + },
95 });
96
97 var instance = <Parent child={<span />} />;
@@ -107,7 +107,7 @@ describe('ReactComponent', function() {
107 },
108 render: function() {
109 return <div>{this.props.children}</div>;
110 - }
110 + },
111 });
112
113 var mounted = false;
@@ -125,7 +125,7 @@ describe('ReactComponent', function() {
125 expect(this.innerRef.getObject()).toEqual(innerObj);
126 expect(this.outerRef.getObject()).toEqual(outerObj);
127 mounted = true;
128 - }
128 + },
129 });
130
131 var instance = <Component />;
@@ -137,7 +137,7 @@ describe('ReactComponent', function() {
137 var Wrapper = React.createClass({
138 render: function() {
139 return this.props.getContent();
140 - }
140 + },
141 });
142
143 var mounted = false;
@@ -161,7 +161,7 @@ describe('ReactComponent', function() {
161 expect(this.wrapperRef.props.title).toBe('wrapper');
162 expect(this.innerRef.props.title).toBe('inner');
163 mounted = true;
164 - }
164 + },
165 });
166
167 var instance = <Component />;
@@ -185,7 +185,7 @@ describe('ReactComponent', function() {
185 },
186 componentWillUnmount: function() {
187 log.push(`inner ${this.props.id} componentWillUnmount`);
188 - }
188 + },
189 });
190
191 var Outer = React.createClass({
@@ -209,7 +209,7 @@ describe('ReactComponent', function() {
209 },
210 componentWillUnmount: function() {
211 log.push('outer componentWillUnmount');
212 - }
212 + },
213 });
214
215 // mount, update, unmount
@@ -246,7 +246,7 @@ describe('ReactComponent', function() {
246 'ref 1 got null',
247 'inner 1 componentWillUnmount',
248 'ref 2 got null',
249 - 'inner 2 componentWillUnmount'
249 + 'inner 2 componentWillUnmount',
250 ]);
251 });
252
src/renderers/shared/reconciler/__tests__/ReactComponentLifeCycle-test.js
+32 -32
@@ -27,42 +27,42 @@ var GET_INIT_STATE_RETURN_VAL = {
27 hasWillMountCompleted: false,
28 hasRenderCompleted: false,
29 hasDidMountCompleted: false,
30 - hasWillUnmountCompleted: false
30 + hasWillUnmountCompleted: false,
31 };
32
33 var INIT_RENDER_STATE = {
34 hasWillMountCompleted: true,
35 hasRenderCompleted: false,
36 hasDidMountCompleted: false,
37 - hasWillUnmountCompleted: false
37 + hasWillUnmountCompleted: false,
38 };
39
40 var DID_MOUNT_STATE = {
41 hasWillMountCompleted: true,
42 hasRenderCompleted: true,
43 hasDidMountCompleted: false,
44 - hasWillUnmountCompleted: false
44 + hasWillUnmountCompleted: false,
45 };
46
47 var NEXT_RENDER_STATE = {
48 hasWillMountCompleted: true,
49 hasRenderCompleted: true,
50 hasDidMountCompleted: true,
51 - hasWillUnmountCompleted: false
51 + hasWillUnmountCompleted: false,
52 };
53
54 var WILL_UNMOUNT_STATE = {
55 hasWillMountCompleted: true,
56 hasDidMountCompleted: true,
57 hasRenderCompleted: true,
58 - hasWillUnmountCompleted: false
58 + hasWillUnmountCompleted: false,
59 };
60
61 var POST_WILL_UNMOUNT_STATE = {
62 hasWillMountCompleted: true,
63 hasDidMountCompleted: true,
64 hasRenderCompleted: true,
65 - hasWillUnmountCompleted: true
65 + hasWillUnmountCompleted: true,
66 };
67
68 /**
@@ -77,7 +77,7 @@ var ComponentLifeCycle = keyMirror({
77 /**
78 * Unmounted components are inactive and cannot receive new props.
79 */
80 - UNMOUNTED: null
80 + UNMOUNTED: null,
81 });
82
83 /**
@@ -92,7 +92,7 @@ var CompositeComponentLifeCycle = keyMirror({
92 /**
93 * Unmounted components are inactive and cannot receive new props.
94 */
95 - UNMOUNTING: null
95 + UNMOUNTING: null,
96 });
97
98 function getCompositeLifeCycle(instance) {
@@ -144,7 +144,7 @@ describe('ReactComponentLifeCycle', function() {
144 return (
145 <div></div>
146 );
147 - }
147 + },
148 });
149 var element = <StatefulComponent />;
150 var firstInstance = React.render(element, container);
@@ -167,7 +167,7 @@ describe('ReactComponentLifeCycle', function() {
167 },
168 render: function() {
169 return <div></div>;
170 - }
170 + },
171 });
172
173 var SwitcherParent = React.createClass({
@@ -190,7 +190,7 @@ describe('ReactComponentLifeCycle', function() {
190 <div> </div>
191 }</div>
192 );
193 - }
193 + },
194 });
195
196 var instance = <SwitcherParent />;
@@ -198,7 +198,7 @@ describe('ReactComponentLifeCycle', function() {
198 expect(_testJournal).toEqual([
199 'SwitcherParent:getInitialState',
200 'SwitcherParent:onDOMReady',
201 - 'Child:onDOMReady'
201 + 'Child:onDOMReady',
202 ]);
203 });
204
@@ -213,7 +213,7 @@ describe('ReactComponentLifeCycle', function() {
213 return (
214 <div></div>
215 );
216 - }
216 + },
217 });
218 var instance = <StatefulComponent />;
219 expect(function() {
@@ -230,7 +230,7 @@ describe('ReactComponentLifeCycle', function() {
230 return (
231 <div></div>
232 );
233 - }
233 + },
234 });
235 var instance = <StatefulComponent />;
236 expect(function() {
@@ -250,7 +250,7 @@ describe('ReactComponentLifeCycle', function() {
250 return (
251 <div></div>
252 );
253 - }
253 + },
254 });
255 ReactTestUtils.renderIntoDocument(<StatefulComponent />);
256 expect(console.error.calls.length).toBe(1);
@@ -273,7 +273,7 @@ describe('ReactComponentLifeCycle', function() {
273 render: function() {
274 expect(this.isMounted()).toBeFalsy();
275 return <div/>;
276 - }
276 + },
277 });
278
279 var element = <Component />;
@@ -291,7 +291,7 @@ describe('ReactComponentLifeCycle', function() {
291 var Component = React.createClass({
292 render: function() {
293 return <div/>;
294 - }
294 + },
295 });
296
297 var container = document.createElement('div');
@@ -318,7 +318,7 @@ describe('ReactComponentLifeCycle', function() {
318 expect(React.findDOMNode(this).tagName).toBe('DIV');
319 }
320 return <div/>;
321 - }
321 + },
322 });
323
324 ReactTestUtils.renderIntoDocument(<Component />);
@@ -336,7 +336,7 @@ describe('ReactComponentLifeCycle', function() {
336 hasWillMountCompleted: false,
337 hasDidMountCompleted: false,
338 hasRenderCompleted: false,
339 - hasWillUnmountCompleted: false
339 + hasWillUnmountCompleted: false,
340 };
341 this._testJournal.returnedFromGetInitialState = clone(initState);
342 this._testJournal.lifeCycleAtStartOfGetInitialState =
@@ -387,7 +387,7 @@ describe('ReactComponentLifeCycle', function() {
387 this._testJournal.lifeCycleAtStartOfWillUnmount =
388 getLifeCycleState(this);
389 this.state.hasWillUnmountCompleted = true;
390 - }
390 + },
391 });
392
393 // A component that is merely "constructed" (as in "constructor") but not
@@ -466,7 +466,7 @@ describe('ReactComponentLifeCycle', function() {
466 var PropsUpdaterInOnDOMReady = React.createClass({
467 componentDidMount: function() {
468 this.refs.theSimpleComponent.setProps({
469 - valueToUseInitially: this.props.valueToUseInOnDOMReady
469 + valueToUseInitially: this.props.valueToUseInOnDOMReady,
470 });
471 },
472 render: function() {
@@ -476,7 +476,7 @@ describe('ReactComponentLifeCycle', function() {
476 ref="theSimpleComponent"
477 />
478 );
479 - }
479 + },
480 });
481 var instance =
482 <PropsUpdaterInOnDOMReady
@@ -510,7 +510,7 @@ describe('ReactComponentLifeCycle', function() {
510 // Even though this.props.tooltip has an owner, updating it shouldn't
511 // throw here because it's mounted as a root component
512 React.render(this.props.tooltip, this.container);
513 - }
513 + },
514 });
515 var Component = React.createClass({
516 render: function() {
@@ -521,7 +521,7 @@ describe('ReactComponentLifeCycle', function() {
521 {this.props.text}
522 </Tooltip>
523 );
524 - }
524 + },
525 });
526
527 var instance = ReactTestUtils.renderIntoDocument(
@@ -538,7 +538,7 @@ describe('ReactComponentLifeCycle', function() {
538 var PropsToUpdate = React.createClass({
539 render: function() {
540 return <div className={this.props.value} ref="theSimpleComponent" />;
541 - }
541 + },
542 });
543 var instance = <PropsToUpdate value="hello" />;
544 expect(instance.setProps).not.toBeDefined();
@@ -551,7 +551,7 @@ describe('ReactComponentLifeCycle', function() {
551 var SetStateInComponentDidMount = React.createClass({
552 getInitialState: function() {
553 return {
554 - stateField: this.props.valueToUseInitially
554 + stateField: this.props.valueToUseInitially,
555 };
556 },
557 componentDidMount: function() {
@@ -559,7 +559,7 @@ describe('ReactComponentLifeCycle', function() {
559 },
560 render: function() {
561 return (<div></div>);
562 - }
562 + },
563 });
564 var instance =
565 <SetStateInComponentDidMount
@@ -589,7 +589,7 @@ describe('ReactComponentLifeCycle', function() {
589 shouldComponentUpdate: logger('outer shouldComponentUpdate'),
590 componentWillUpdate: logger('outer componentWillUpdate'),
591 componentDidUpdate: logger('outer componentDidUpdate'),
592 - componentWillUnmount: logger('outer componentWillUnmount')
592 + componentWillUnmount: logger('outer componentWillUnmount'),
593 });
594 var Inner = React.createClass({
595 render: function() {
@@ -601,7 +601,7 @@ describe('ReactComponentLifeCycle', function() {
601 shouldComponentUpdate: logger('inner shouldComponentUpdate'),
602 componentWillUpdate: logger('inner componentWillUpdate'),
603 componentDidUpdate: logger('inner componentDidUpdate'),
604 - componentWillUnmount: logger('inner componentWillUnmount')
604 + componentWillUnmount: logger('inner componentWillUnmount'),
605 });
606
607
@@ -612,7 +612,7 @@ describe('ReactComponentLifeCycle', function() {
612 'outer componentWillMount',
613 'inner componentWillMount',
614 'inner componentDidMount',
615 - 'outer componentDidMount'
615 + 'outer componentDidMount',
616 ]);
617
618 log = [];
@@ -625,14 +625,14 @@ describe('ReactComponentLifeCycle', function() {
625 'inner shouldComponentUpdate',
626 'inner componentWillUpdate',
627 'inner componentDidUpdate',
628 - 'outer componentDidUpdate'
628 + 'outer componentDidUpdate',
629 ]);
630
631 log = [];
632 React.unmountComponentAtNode(container);
633 expect(log).toEqual([
634 'outer componentWillUnmount',
635 - 'inner componentWillUnmount'
635 + 'inner componentWillUnmount',
636 ]);
637 });
638 });
src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js
+57 -57
@@ -52,7 +52,7 @@ describe('ReactCompositeComponent', function() {
52 return !this.state.activated ?
53 <a ref="x" onClick={toggleActivatedState} /> :
54 <b ref="x" onClick={toggleActivatedState} />;
55 - }
55 + },
56 });
57
58 /**
@@ -68,7 +68,7 @@ describe('ReactCompositeComponent', function() {
68 return this.props.renderAnchor ?
69 <a ref="anch" className={className}></a> :
70 <b></b>;
71 - }
71 + },
72 });
73
74 console.error = mocks.getMockFunction();
@@ -98,12 +98,12 @@ describe('ReactCompositeComponent', function() {
98 var Child = React.createClass({
99 render: function() {
100 return null;
101 - }
101 + },
102 });
103 var Parent = React.createClass({
104 render: function() {
105 return <div><Child /></div>;
106 - }
106 + },
107 });
108
109 var markup = ReactServerRendering.renderToString(<Parent />);
@@ -165,7 +165,7 @@ describe('ReactCompositeComponent', function() {
165 },
166 render: function() {
167 return <div></div>;
168 - }
168 + },
169 });
170 var instance = <ComponentClass />;
171
@@ -204,7 +204,7 @@ describe('ReactCompositeComponent', function() {
204 },
205 render: function() {
206 return <div />;
207 - }
207 + },
208 });
209 ReactTestUtils.renderIntoDocument(<Component />);
210 });
@@ -216,7 +216,7 @@ describe('ReactCompositeComponent', function() {
216 },
217 render: function() {
218 return <span />;
219 - }
219 + },
220 });
221
222 var instance1 = <Component />;
@@ -239,7 +239,7 @@ describe('ReactCompositeComponent', function() {
239 },
240 render: function() {
241 return <span />;
242 - }
242 + },
243 });
244
245 var inputProps = {};
@@ -259,7 +259,7 @@ describe('ReactCompositeComponent', function() {
259 var Component = React.createClass({
260 render: function() {
261 return <div />;
262 - }
262 + },
263 });
264
265 var instance = <Component />;
@@ -291,7 +291,7 @@ describe('ReactCompositeComponent', function() {
291 },
292 render: function() {
293 return <div />;
294 - }
294 + },
295 });
296
297 var instance = <Component />;
@@ -331,7 +331,7 @@ describe('ReactCompositeComponent', function() {
331 },
332 render: function() {
333 return <div />;
334 - }
334 + },
335 });
336
337 var instance = React.render(<Component />, container);
@@ -351,7 +351,7 @@ describe('ReactCompositeComponent', function() {
351 var Component = React.createClass({
352 render: function() {
353 return <div />;
354 - }
354 + },
355 });
356
357 var instance = <Component />;
@@ -388,7 +388,7 @@ describe('ReactCompositeComponent', function() {
388 },
389 componentDidMount: function() {
390 innerInstance = this.refs.inner;
391 - }
391 + },
392 });
393 React.render(<Component />, container);
394
@@ -408,7 +408,7 @@ describe('ReactCompositeComponent', function() {
408 var BadComponent = React.createClass({
409 render: function() {
410 throw new Error();
411 - }
411 + },
412 });
413 var instance = <BadComponent />;
414
@@ -433,7 +433,7 @@ describe('ReactCompositeComponent', function() {
433 <Inner />
434 Text
435 </div>;
436 - }
436 + },
437 });
438 var Inner = React.createClass({
439 componentWillUnmount: function() {
@@ -446,7 +446,7 @@ describe('ReactCompositeComponent', function() {
446 },
447 render: function() {
448 return <div />;
449 - }
449 + },
450 });
451
452 React.render(<Component />, container);
@@ -472,7 +472,7 @@ describe('ReactCompositeComponent', function() {
472
473 render: function() {
474 return <div />;
475 - }
475 + },
476 });
477
478 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -489,33 +489,33 @@ describe('ReactCompositeComponent', function() {
489 var Parent = React.createClass({
490 render: function() {
491 return <Child><Grandchild /></Child>;
492 - }
492 + },
493 });
494
495 var Child = React.createClass({
496 childContextTypes: {
497 - foo: ReactPropTypes.string
497 + foo: ReactPropTypes.string,
498 },
499
500 getChildContext: function() {
501 return {
502 - foo: 'bar'
502 + foo: 'bar',
503 };
504 },
505
506 render: function() {
507 return React.Children.only(this.props.children);
508 - }
508 + },
509 });
510
511 var Grandchild = React.createClass({
512 contextTypes: {
513 - foo: ReactPropTypes.string
513 + foo: ReactPropTypes.string,
514 },
515
516 render: function() {
517 return <div>{this.context.foo}</div>;
518 - }
518 + },
519 });
520
521 var component = ReactTestUtils.renderIntoDocument(<Parent />);
@@ -529,53 +529,53 @@ describe('ReactCompositeComponent', function() {
529 var Parent = React.createClass({
530 childContextTypes: {
531 foo: ReactPropTypes.string,
532 - depth: ReactPropTypes.number
532 + depth: ReactPropTypes.number,
533 },
534
535 getChildContext: function() {
536 return {
537 foo: 'bar',
538 - depth: 0
538 + depth: 0,
539 };
540 },
541
542 render: function() {
543 return <Child />;
544 - }
544 + },
545 });
546
547 var Child = React.createClass({
548 contextTypes: {
549 foo: ReactPropTypes.string,
550 - depth: ReactPropTypes.number
550 + depth: ReactPropTypes.number,
551 },
552
553 childContextTypes: {
554 - depth: ReactPropTypes.number
554 + depth: ReactPropTypes.number,
555 },
556
557 getChildContext: function() {
558 return {
559 - depth: this.context.depth + 1
559 + depth: this.context.depth + 1,
560 };
561 },
562
563 render: function() {
564 childInstance = this;
565 return <Grandchild />;
566 - }
566 + },
567 });
568
569 var Grandchild = React.createClass({
570 contextTypes: {
571 foo: ReactPropTypes.string,
572 - depth: ReactPropTypes.number
572 + depth: ReactPropTypes.number,
573 },
574
575 render: function() {
576 grandchildInstance = this;
577 return <div />;
578 - }
578 + },
579 });
580
581 ReactTestUtils.renderIntoDocument(<Parent />);
@@ -590,19 +590,19 @@ describe('ReactCompositeComponent', function() {
590 var Parent = React.createClass({
591 childContextTypes: {
592 foo: ReactPropTypes.string,
593 - depth: ReactPropTypes.number
593 + depth: ReactPropTypes.number,
594 },
595
596 getChildContext: function() {
597 return {
598 foo: 'bar',
599 - depth: 0
599 + depth: 0,
600 };
601 },
602
603 getInitialState: function() {
604 return {
605 - flag: false
605 + flag: false,
606 };
607 },
608
@@ -612,19 +612,19 @@ describe('ReactCompositeComponent', function() {
612 output = <span>Child</span>;
613 }
614 return output;
615 - }
615 + },
616 });
617
618 var Child = React.createClass({
619 contextTypes: {
620 foo: ReactPropTypes.string,
621 - depth: ReactPropTypes.number
621 + depth: ReactPropTypes.number,
622 },
623
624 render: function() {
625 childInstance = this;
626 return <span>Child</span>;
627 - }
627 + },
628 });
629
630 parentInstance = ReactTestUtils.renderIntoDocument(<Parent />);
@@ -645,7 +645,7 @@ describe('ReactCompositeComponent', function() {
645
646 var Leaf = React.createClass({
647 contextTypes: {
648 - foo: ReactPropTypes.string.isRequired
648 + foo: ReactPropTypes.string.isRequired,
649 },
650
651 componentWillReceiveProps: function(nextProps, nextContext) {
@@ -663,7 +663,7 @@ describe('ReactCompositeComponent', function() {
663
664 render: function() {
665 return <span>{this.context.foo}</span>;
666 - }
666 + },
667 });
668
669 var Intermediary = React.createClass({
@@ -683,23 +683,23 @@ describe('ReactCompositeComponent', function() {
683
684 render: function() {
685 return <Leaf />;
686 - }
686 + },
687 });
688
689 var Parent = React.createClass({
690 childContextTypes: {
691 - foo: ReactPropTypes.string
691 + foo: ReactPropTypes.string,
692 },
693
694 getChildContext: function() {
695 return {
696 - foo: this.props.cntxt
696 + foo: this.props.cntxt,
697 };
698 },
699
700 render: function() {
701 return <Intermediary />;
702 - }
702 + },
703 });
704
705 var div = document.createElement('div');
@@ -718,13 +718,13 @@ describe('ReactCompositeComponent', function() {
718 var Inner = React.createClass({
719 render: function() {
720 return <div />;
721 - }
721 + },
722 });
723 var Outer = React.createClass({
724 render: function() {
725 ReactTestUtils.renderIntoDocument(<Inner />);
726 return <div />;
727 - }
727 + },
728 });
729
730 ReactTestUtils.renderIntoDocument(<Outer />);
@@ -750,7 +750,7 @@ describe('ReactCompositeComponent', function() {
750 render: function() {
751 renders++;
752 return <div />;
753 - }
753 + },
754 });
755
756 var container = document.createElement('div');
@@ -769,7 +769,7 @@ describe('ReactCompositeComponent', function() {
769 },
770 render: function() {
771 return <div>{this.props.children}</div>;
772 - }
772 + },
773 });
774 var Component = React.createClass({
775 render: function() {
@@ -784,7 +784,7 @@ describe('ReactCompositeComponent', function() {
784 <Static ref="static1" key="B">B</Static>
785 </div>;
786 }
787 - }
787 + },
788 });
789
790 var comp = ReactTestUtils.renderIntoDocument(<Component flipped={false} />);
@@ -822,7 +822,7 @@ describe('ReactCompositeComponent', function() {
822 },
823 render: function() {
824 return <div />;
825 - }
825 + },
826 });
827 var container = document.createElement('div');
828 expect(a).toBe(container.firstChild);
@@ -847,28 +847,28 @@ describe('ReactCompositeComponent', function() {
847 it('context should be passed down from the parent', function() {
848 var Parent = React.createClass({
849 childContextTypes: {
850 - foo: ReactPropTypes.string
850 + foo: ReactPropTypes.string,
851 },
852
853 getChildContext: function() {
854 return {
855 - foo: 'bar'
855 + foo: 'bar',
856 };
857 },
858
859 render: function() {
860 return <div>{this.props.children}</div>;
861 - }
861 + },
862 });
863
864 var Component = React.createClass({
865 contextTypes: {
866 - foo: ReactPropTypes.string.isRequired
866 + foo: ReactPropTypes.string.isRequired,
867 },
868
869 render: function() {
870 return <div />;
871 - }
871 + },
872 });
873
874 var div = document.createElement('div');
@@ -884,7 +884,7 @@ describe('ReactCompositeComponent', function() {
884 },
885 render: function() {
886 return <div />;
887 - }
887 + },
888 });
889
890 var moo = ReactTestUtils.renderIntoDocument(<Moo />);
@@ -906,7 +906,7 @@ describe('ReactCompositeComponent', function() {
906 },
907 render: function() {
908 return <div />;
909 - }
909 + },
910 });
911
912 var moo = ReactTestUtils.renderIntoDocument(<Moo />);
src/renderers/shared/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js
+2 -2
@@ -41,7 +41,7 @@ describe('ReactCompositeComponentDOMMinimalism', function() {
41 {this.props.children}
42 </div>
43 );
44 - }
44 + },
45 });
46
47 MyCompositeComponent = React.createClass({
@@ -51,7 +51,7 @@ describe('ReactCompositeComponentDOMMinimalism', function() {
51 {this.props.children}
52 </LowerLevelComposite>
53 );
54 - }
54 + },
55 });
56
57 expectSingleChildlessDiv = function(instance) {
src/renderers/shared/reconciler/__tests__/ReactCompositeComponentError-test.js
+1 -1
@@ -22,7 +22,7 @@ describe('ReactCompositeComponent-error', function() {
22 someHandler: function() {},
23 render: function() {
24 return <div />;
25 - }
25 + },
26 });
27
28 void new Component();
src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js
+3 -3
@@ -43,7 +43,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
43 color={this.state.color}
44 onSelectColor={this.handleColor}
45 />;
46 - }
46 + },
47 });
48
49 var ChildComponent = React.createClass({
@@ -80,7 +80,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
80 Light Green
81 </button>
82 </div>;
83 - }
83 + },
84 });
85
86 var container = document.createElement('div');
@@ -109,7 +109,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
109 ['setState-args', 'dark blue', 'green'],
110 ['render', 'light green', 'green'],
111 ['parent-after-setState', 'green'],
112 - ['after-setState', 'light green', 'green']
112 + ['after-setState', 'light green', 'green'],
113 ]);
114 });
115 });
src/renderers/shared/reconciler/__tests__/ReactCompositeComponentState-test.js
+4 -4
@@ -121,7 +121,7 @@ describe('ReactCompositeComponent-state', function() {
121
122 componentWillUnmount: function() {
123 this.peekAtState('componentWillUnmount');
124 - }
124 + },
125 });
126
127 });
@@ -209,7 +209,7 @@ describe('ReactCompositeComponent-state', function() {
209 ['forceUpdate', 'blue'],
210 // unmountComponent()
211 // state is available within `componentWillUnmount()`
212 - ['componentWillUnmount', 'blue']
212 + ['componentWillUnmount', 'blue'],
213 ]);
214 });
215
@@ -223,7 +223,7 @@ describe('ReactCompositeComponent-state', function() {
223 // This should get silently ignored (maybe with a warning), but it
224 // shouldn't break React.
225 outer.setState({showInner: false});
226 - }
226 + },
227 });
228 var Outer = React.createClass({
229 getInitialState: function() {
@@ -231,7 +231,7 @@ describe('ReactCompositeComponent-state', function() {
231 },
232 render: function() {
233 return <div>{this.state.showInner && <Inner />}</div>;
234 - }
234 + },
235 });
236
237 var container = document.createElement('div');
src/renderers/shared/reconciler/__tests__/ReactEmptyComponent-test.js
+10 -10
@@ -42,7 +42,7 @@ describe('ReactEmptyComponent', function() {
42 render: function() {
43 var Component = this.state.component;
44 return Component ? <Component /> : null;
45 - }
45 + },
46 });
47 });
48
@@ -50,12 +50,12 @@ describe('ReactEmptyComponent', function() {
50 var Component1 = React.createClass({
51 render: function() {
52 return null;
53 - }
53 + },
54 });
55 var Component2 = React.createClass({
56 render: function() {
57 return false;
58 - }
58 + },
59 });
60
61 var instance1 = ReactTestUtils.renderIntoDocument(<Component1 />);
@@ -70,7 +70,7 @@ describe('ReactEmptyComponent', function() {
70
71 it('should still throw when rendering to undefined', () => {
72 var Component = React.createClass({
73 - render: function() {}
73 + render: function() {},
74 });
75 expect(function() {
76 ReactTestUtils.renderIntoDocument(<Component />);
@@ -144,13 +144,13 @@ describe('ReactEmptyComponent', function() {
144 var GrandChild = React.createClass({
145 render: function() {
146 return null;
147 - }
147 + },
148 });
149
150 var Child = React.createClass({
151 render: function() {
152 return <GrandChild />;
153 - }
153 + },
154 });
155
156 var instance1 =
@@ -196,12 +196,12 @@ describe('ReactEmptyComponent', function() {
196 // replaced yet!
197 expect(React.findDOMNode(this)).not.toBe(null);
198 assertions++;
199 - }
199 + },
200 });
201 var Wrapper = React.createClass({
202 render: function() {
203 return this.props.showInner ? <Inner /> : null;
204 - }
204 + },
205 });
206
207 var el = document.createElement('div');
@@ -245,7 +245,7 @@ describe('ReactEmptyComponent', function() {
245 }
246
247 return <div>hello world</div>;
248 - }
248 + },
249 });
250
251 var Parent = React.createClass({
@@ -260,7 +260,7 @@ describe('ReactEmptyComponent', function() {
260 <Child key="2" visible={false} />
261 </div>
262 );
263 - }
263 + },
264 });
265
266 expect(function() {
src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js
+11 -11
@@ -46,7 +46,7 @@ describe('ReactIdentity', function() {
46 <div>
47 {frag({
48 first: <div />,
49 - second: <div />
49 + second: <div />,
50 })}
51 </div>;
52
@@ -80,7 +80,7 @@ describe('ReactIdentity', function() {
80 var Wrapper = React.createClass({
81 render: function() {
82 return <a key="i_get_overwritten">{this.props.children}</a>;
83 - }
83 + },
84 });
85
86 var instance =
@@ -113,7 +113,7 @@ describe('ReactIdentity', function() {
113 var map = {};
114 map[key] = s2;
115 return <div>{[s1, frag(map)]}</div>;
116 - }
116 + },
117
118 });
119
@@ -181,14 +181,14 @@ describe('ReactIdentity', function() {
181 {this.props.children[1]}
182 </div>
183 );
184 - }
184 + },
185 });
186
187 var TestContainer = React.createClass({
188
189 render: function() {
190 return <TestComponent>{instance0}{instance1}</TestComponent>;
191 - }
191 + },
192
193 });
194
@@ -213,7 +213,7 @@ describe('ReactIdentity', function() {
213 {this.props.children[1]}
214 </div>
215 );
216 - }
216 + },
217 });
218
219 var TestContainer = React.createClass({
@@ -224,7 +224,7 @@ describe('ReactIdentity', function() {
224 <TestComponent>{instance0}{instance1}</TestComponent>
225 </div>
226 );
227 - }
227 + },
228
229 });
230
@@ -239,7 +239,7 @@ describe('ReactIdentity', function() {
239 var TestComponent = React.createClass({
240 render: function() {
241 return <div>{this.props.children}<span /></div>;
242 - }
242 + },
243 });
244
245 var TestContainer = React.createClass({
@@ -251,7 +251,7 @@ describe('ReactIdentity', function() {
251 {'second'}
252 </TestComponent>
253 );
254 - }
254 + },
255
256 });
257
@@ -267,7 +267,7 @@ describe('ReactIdentity', function() {
267 var TestComponent = React.createClass({
268 render: function() {
269 return <div>{this.props.children}</div>;
270 - }
270 + },
271 });
272
273 var TestContainer = React.createClass({
@@ -287,7 +287,7 @@ describe('ReactIdentity', function() {
287 {this.state.swapped ? this.props.first : this.props.second}
288 </TestComponent>
289 );
290 - }
290 + },
291
292 });
293
src/renderers/shared/reconciler/__tests__/ReactInstanceHandles-test.js
+21 -21
@@ -30,7 +30,7 @@ var ChildComponent = React.createClass({
30 <div ref="DIV_2" />
31 </div>
32 );
33 - }
33 + },
34 });
35
36 var ParentComponent = React.createClass({
@@ -44,7 +44,7 @@ var ParentComponent = React.createClass({
44 <div ref="P_OneOff" />
45 </div>
46 );
47 - }
47 + },
48 });
49
50 function renderParentIntoDocument() {
@@ -59,7 +59,7 @@ describe('ReactInstanceHandles', function() {
59 aggregatedArgs.push({
60 id: id,
61 isUp: isUp,
62 - arg: arg
62 + arg: arg,
63 });
64 }
65
@@ -196,7 +196,7 @@ describe('ReactInstanceHandles', function() {
196 {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_1), isUp: true, arg: ARG},
197 {id: getNodeID(parent.refs.P_P1_C1.refs.DIV), isUp: true, arg: ARG},
198 {id: getNodeID(parent.refs.P_P1), isUp: true, arg: ARG},
199 - {id: getNodeID(parent.refs.P), isUp: true, arg: ARG}
199 + {id: getNodeID(parent.refs.P), isUp: true, arg: ARG},
200 ];
201 ReactInstanceHandles.traverseTwoPhase(targetID, argAggregator, ARG);
202 expect(aggregatedArgs).toEqual(expectedAggregation);
@@ -207,7 +207,7 @@ describe('ReactInstanceHandles', function() {
207 var targetID = getNodeID(parent.refs.P);
208 var expectedAggregation = [
209 {id: getNodeID(parent.refs.P), isUp: false, arg: ARG},
210 - {id: getNodeID(parent.refs.P), isUp: true, arg: ARG}
210 + {id: getNodeID(parent.refs.P), isUp: true, arg: ARG},
211 ];
212 ReactInstanceHandles.traverseTwoPhase(targetID, argAggregator, ARG);
213 expect(aggregatedArgs).toEqual(expectedAggregation);
@@ -242,7 +242,7 @@ describe('ReactInstanceHandles', function() {
242 var expectedAggregation = [
243 {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_1), isUp: true, arg: ARG},
244 // enter/leave shouldn't fire antyhing on the parent
245 - {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_2), isUp: false, arg: ARG2}
245 + {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_2), isUp: false, arg: ARG2},
246 ];
247 ReactInstanceHandles.traverseEnterLeave(
248 leaveID, enterID, argAggregator, ARG, ARG2
@@ -255,7 +255,7 @@ describe('ReactInstanceHandles', function() {
255 var leaveID = getNodeID(parent.refs.P_P1_C1.refs.DIV_1);
256 var enterID = getNodeID(parent.refs.P_P1_C1.refs.DIV);
257 var expectedAggregation = [
258 - {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_1), isUp: true, arg: ARG}
258 + {id: getNodeID(parent.refs.P_P1_C1.refs.DIV_1), isUp: true, arg: ARG},
259 ];
260 ReactInstanceHandles.traverseEnterLeave(
261 leaveID, enterID, argAggregator, ARG, ARG2
@@ -270,7 +270,7 @@ describe('ReactInstanceHandles', function() {
270 var expectedAggregation = [
271 {id: getNodeID(parent.refs.P), isUp: false, arg: ARG2},
272 {id: getNodeID(parent.refs.P_P1), isUp: false, arg: ARG2},
273 - {id: getNodeID(parent.refs.P_P1_C1.refs.DIV), isUp: false, arg: ARG2}
273 + {id: getNodeID(parent.refs.P_P1_C1.refs.DIV), isUp: false, arg: ARG2},
274 ];
275 ReactInstanceHandles.traverseEnterLeave(
276 leaveID, enterID, argAggregator, ARG, ARG2
@@ -283,7 +283,7 @@ describe('ReactInstanceHandles', function() {
283 var leaveID = ''; // From the window or outside of the React sandbox.
284 var enterID = getNodeID(parent.refs.P);
285 var expectedAggregation = [
286 - {id: getNodeID(parent.refs.P), isUp: false, arg: ARG2}
286 + {id: getNodeID(parent.refs.P), isUp: false, arg: ARG2},
287 ];
288 ReactInstanceHandles.traverseEnterLeave(
289 leaveID, enterID, argAggregator, ARG, ARG2
@@ -298,7 +298,7 @@ describe('ReactInstanceHandles', function() {
298 var expectedAggregation = [
299 {id: getNodeID(parent.refs.P_P1_C1.refs.DIV), isUp: true, arg: ARG},
300 {id: getNodeID(parent.refs.P_P1), isUp: true, arg: ARG},
301 - {id: getNodeID(parent.refs.P), isUp: true, arg: ARG}
301 + {id: getNodeID(parent.refs.P), isUp: true, arg: ARG},
302 ];
303 ReactInstanceHandles.traverseEnterLeave(
304 leaveID, enterID, argAggregator, ARG, ARG2
@@ -313,7 +313,7 @@ describe('ReactInstanceHandles', function() {
313 var expectedAggregation = [
314 {id: getNodeID(parent.refs.P_P1_C1.refs.DIV), isUp: true, arg: ARG},
315 {id: getNodeID(parent.refs.P_P1), isUp: true, arg: ARG},
316 - {id: getNodeID(parent.refs.P), isUp: true, arg: ARG}
316 + {id: getNodeID(parent.refs.P), isUp: true, arg: ARG},
317 ];
318 ReactInstanceHandles.traverseEnterLeave(
319 leaveID, enterID, argAggregator, ARG, ARG2
@@ -355,22 +355,22 @@ describe('ReactInstanceHandles', function() {
355 // Common ancestor from window to deep element is ''.
356 {one: null,
357 two: parent.refs.P_P1_C1.refs.DIV_1,
358 - com: null
358 + com: null,
359 },
360 // Same as previous - reversed direction.
361 {one: parent.refs.P_P1_C1.refs.DIV_1,
362 two: null,
363 - com: null
363 + com: null,
364 },
365 // Common ancestor from window to shallow id is ''.
366 {one: parent.refs.P,
367 two: null,
368 - com: null
368 + com: null,
369 },
370 // Common ancestor with self is self.
371 {one: parent.refs.P_P1_C1.refs.DIV_1,
372 two: parent.refs.P_P1_C1.refs.DIV_1,
373 - com: parent.refs.P_P1_C1.refs.DIV_1
373 + com: parent.refs.P_P1_C1.refs.DIV_1,
374 },
375 // Common ancestor with self is self - even if topmost DOM.
376 {one: parent.refs.P, two: parent.refs.P, com: parent.refs.P},
@@ -378,32 +378,32 @@ describe('ReactInstanceHandles', function() {
378 {
379 one: parent.refs.P_P1_C1.refs.DIV_1,
380 two: parent.refs.P_P1_C1.refs.DIV_2,
381 - com: parent.refs.P_P1_C1.refs.DIV
381 + com: parent.refs.P_P1_C1.refs.DIV,
382 },
383 // Common ancestor with parent is the parent.
384 {
385 one: parent.refs.P_P1_C1.refs.DIV_1,
386 two: parent.refs.P_P1_C1.refs.DIV,
387 - com: parent.refs.P_P1_C1.refs.DIV
387 + com: parent.refs.P_P1_C1.refs.DIV,
388 },
389 // Common ancestor with grandparent is the grandparent.
390 {
391 one: parent.refs.P_P1_C1.refs.DIV_1,
392 two: parent.refs.P_P1_C1,
393 - com: parent.refs.P_P1_C1
393 + com: parent.refs.P_P1_C1,
394 },
395 // Grantparent across subcomponent boundaries.
396 {
397 one: parent.refs.P_P1_C1.refs.DIV_1,
398 two: parent.refs.P_P1_C2.refs.DIV_1,
399 - com: parent.refs.P_P1
399 + com: parent.refs.P_P1,
400 },
401 // Something deep with something one-off.
402 {
403 one: parent.refs.P_P1_C1.refs.DIV_1,
404 two: parent.refs.P_OneOff,
405 - com: parent.refs.P
406 - }
405 + com: parent.refs.P,
406 + },
407 ];
408 var i;
409 for (i = 0; i < ancestors.length; i++) {
src/renderers/shared/reconciler/__tests__/ReactMockedComponent-test.js
+3 -3
@@ -43,7 +43,7 @@ describe('ReactMockedComponent', function() {
43
44 render: function() {
45 return <span />;
46 - }
46 + },
47
48 });
49
@@ -74,7 +74,7 @@ describe('ReactMockedComponent', function() {
74
75 render: function() {
76 return <AutoMockedComponent prop={this.state.foo} />;
77 - }
77 + },
78
79 });
80 var instance = ReactTestUtils.renderIntoDocument(<Wrapper />);
@@ -114,7 +114,7 @@ describe('ReactMockedComponent', function() {
114
115 render: function() {
116 return <MockedComponent prop={this.state.foo} />;
117 - }
117 + },
118
119 });
120 var instance = ReactTestUtils.renderIntoDocument(<Wrapper />);
src/renderers/shared/reconciler/__tests__/ReactMultiChild-test.js
+6 -6
@@ -35,7 +35,7 @@ describe('ReactMultiChild', function() {
35 componentWillUnmount: mockUnmount,
36 render: function() {
37 return <span />;
38 - }
38 + },
39 });
40
41 expect(mockMount.mock.calls.length).toBe(0);
@@ -66,7 +66,7 @@ describe('ReactMultiChild', function() {
66 componentWillUnmount: mockUnmount,
67 render: function() {
68 return <span />;
69 - }
69 + },
70 });
71
72 expect(mockMount.mock.calls.length).toBe(0);
@@ -94,13 +94,13 @@ describe('ReactMultiChild', function() {
94 componentWillUnmount: mockUnmount,
95 render: function() {
96 return <span />;
97 - }
97 + },
98 });
99
100 var WrapperComponent = React.createClass({
101 render: function() {
102 return this.props.children || <MockComponent />;
103 - }
103 + },
104 });
105
106 expect(mockMount.mock.calls.length).toBe(0);
@@ -131,7 +131,7 @@ describe('ReactMultiChild', function() {
131 componentWillUnmount: mockUnmount,
132 render: function() {
133 return <span />;
134 - }
134 + },
135 });
136
137 expect(mockMount.mock.calls.length).toBe(0);
@@ -165,7 +165,7 @@ describe('ReactMultiChild', function() {
165 Object.defineProperty(Element.prototype, 'innerHTML', {
166 set: setInnerHTML = jasmine.createSpy().andCallFake(
167 innerHTMLDescriptor.set
168 - )
168 + ),
169 });
170 });
171
src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js
+128 -128
@@ -68,7 +68,7 @@ var StatusDisplay = React.createClass({
68 {this.state.internalState}
69 </div>
70 );
71 - }
71 + },
72 });
73
74 /**
@@ -121,7 +121,7 @@ var FriendsStatusDisplay = React.createClass({
121 {children}
122 </div>
123 );
124 - }
124 + },
125 });
126
127
@@ -240,8 +240,8 @@ describe('ReactMultiChildReconcile', function() {
240 // Test basics.
241 var props = {
242 usernameToStatus: {
243 - jcw: 'jcwStatus'
244 - }
243 + jcw: 'jcwStatus',
244 + },
245 };
246
247 var parentInstance = ReactTestUtils.renderIntoDocument(
@@ -268,7 +268,7 @@ describe('ReactMultiChildReconcile', function() {
268 var usernameToStatus = {
269 jcw: 'jcwStatus',
270 awalke: 'awalkeStatus',
271 - bob: 'bobStatus'
271 + bob: 'bobStatus',
272 };
273
274 testPropsSequence([ {usernameToStatus: usernameToStatus} ]);
@@ -279,15 +279,15 @@ describe('ReactMultiChildReconcile', function() {
279 {
280 usernameToStatus: {
281 jcw: 'jcwStatus',
282 - jordanjcw: 'jordanjcwStatus'
283 - }
282 + jordanjcw: 'jordanjcwStatus',
283 + },
284 },
285 {
286 usernameToStatus: {
287 jcw: 'jcwstatus2',
288 - jordanjcw: 'jordanjcwstatus2'
289 - }
290 - }
288 + jordanjcw: 'jordanjcwstatus2',
289 + },
290 + },
291 ];
292 testPropsSequence(PROPS_SEQUENCE);
293 });
@@ -297,9 +297,9 @@ describe('ReactMultiChildReconcile', function() {
297 {usernameToStatus: {} },
298 {
299 usernameToStatus: {
300 - first: 'firstStatus'
301 - }
302 - }
300 + first: 'firstStatus',
301 + },
302 + },
303 ];
304 testPropsSequence(PROPS_SEQUENCE);
305 });
@@ -308,10 +308,10 @@ describe('ReactMultiChildReconcile', function() {
308 var PROPS_SEQUENCE = [
309 {
310 usernameToStatus: {
311 - first: 'firstStatus'
312 - }
311 + first: 'firstStatus',
312 + },
313 },
314 - {usernameToStatus: {} }
314 + {usernameToStatus: {} },
315 ];
316 testPropsSequence(PROPS_SEQUENCE);
317 });
@@ -320,10 +320,10 @@ describe('ReactMultiChildReconcile', function() {
320 testPropsSequence([
321 {
322 usernameToStatus: {
323 - first: 'firstStatus'
324 - }
323 + first: 'firstStatus',
324 + },
325 },
326 - {}
326 + {},
327 ]);
328 });
329
@@ -332,18 +332,18 @@ describe('ReactMultiChildReconcile', function() {
332 {},
333 {
334 usernameToStatus: {
335 - first: 'firstStatus'
336 - }
337 - }
335 + first: 'firstStatus',
336 + },
337 + },
338 ]);
339 });
340
341 it('should transition from zero children to null children', function() {
342 testPropsSequence([
343 {
344 - usernameToStatus: {}
344 + usernameToStatus: {},
345 },
346 - {}
346 + {},
347 ]);
348 });
349
@@ -351,8 +351,8 @@ describe('ReactMultiChildReconcile', function() {
351 testPropsSequence([
352 {},
353 {
354 - usernameToStatus: {}
355 - }
354 + usernameToStatus: {},
355 + },
356 ]);
357 });
358
@@ -367,15 +367,15 @@ describe('ReactMultiChildReconcile', function() {
367 {
368 usernameToStatus: {
369 jcw: 'jcwStatus',
370 - jordanjcw: 'jordanjcwStatus'
371 - }
370 + jordanjcw: 'jordanjcwStatus',
371 + },
372 },
373 {
374 usernameToStatus: {
375 jcw: null,
376 - jordanjcw: 'jordanjcwstatus2'
377 - }
378 - }
376 + jordanjcw: 'jordanjcwstatus2',
377 + },
378 + },
379 ];
380 testPropsSequence(PROPS_SEQUENCE);
381 });
@@ -385,15 +385,15 @@ describe('ReactMultiChildReconcile', function() {
385 {
386 usernameToStatus: {
387 jcw: 'jcwStatus',
388 - jordanjcw: 'jordanjcwStatus'
389 - }
388 + jordanjcw: 'jordanjcwStatus',
389 + },
390 },
391 {
392 usernameToStatus: {
393 jcw: 'jcwstatus2',
394 - jordanjcw: null
395 - }
396 - }
394 + jordanjcw: null,
395 + },
396 + },
397 ];
398 testPropsSequence(PROPS_SEQUENCE);
399 });
@@ -403,15 +403,15 @@ describe('ReactMultiChildReconcile', function() {
403 {
404 usernameToStatus: {
405 userOne: 'userOneStatus',
406 - userTwo: 'userTwoStatus'
407 - }
406 + userTwo: 'userTwoStatus',
407 + },
408 },
409 {
410 usernameToStatus: {
411 userTwo: 'userTwoStatus',
412 - userOne: 'userOneStatus'
413 - }
414 - }
412 + userOne: 'userOneStatus',
413 + },
414 + },
415 ];
416 testPropsSequence(PROPS_SEQUENCE);
417 });
@@ -422,16 +422,16 @@ describe('ReactMultiChildReconcile', function() {
422 usernameToStatus: {
423 userOne: 'userOneStatus',
424 userTwo: 'userTwoStatus',
425 - userThree: 'userThreeStatus'
426 - }
425 + userThree: 'userThreeStatus',
426 + },
427 },
428 {
429 usernameToStatus: {
430 userThree: 'userThreeStatus',
431 userTwo: 'userTwoStatus',
432 - userOne: 'userOneStatus'
433 - }
434 - }
432 + userOne: 'userOneStatus',
433 + },
434 + },
435 ];
436 testPropsSequence(PROPS_SEQUENCE);
437 });
@@ -443,41 +443,41 @@ describe('ReactMultiChildReconcile', function() {
443 userOne: 'userOneStatus',
444 userTwo: 'userTwoStatus',
445 userThree: 'userThreeStatus',
446 - userFour: 'userFourStatus'
447 - }
446 + userFour: 'userFourStatus',
447 + },
448 },
449 {
450 usernameToStatus: {
451 userTwo: 'userTwoStatus',
452 userThree: 'userThreeStatus',
453 userFour: 'userFourStatus',
454 - userOne: 'userOneStatus'
455 - }
454 + userOne: 'userOneStatus',
455 + },
456 },
457 {
458 usernameToStatus: {
459 userThree: 'userThreeStatus',
460 userFour: 'userFourStatus',
461 userOne: 'userOneStatus',
462 - userTwo: 'userTwoStatus'
463 - }
462 + userTwo: 'userTwoStatus',
463 + },
464 },
465 {
466 usernameToStatus: {
467 userFour: 'userFourStatus',
468 userOne: 'userOneStatus',
469 userTwo: 'userTwoStatus',
470 - userThree: 'userThreeStatus'
471 - }
470 + userThree: 'userThreeStatus',
471 + },
472 },
473 {
474 usernameToStatus: { // Full circle!
475 userOne: 'userOneStatus',
476 userTwo: 'userTwoStatus',
477 userThree: 'userThreeStatus',
478 - userFour: 'userFourStatus'
479 - }
480 - }
478 + userFour: 'userFourStatus',
479 + },
480 + },
481 ];
482 testPropsSequence(PROPS_SEQUENCE);
483 });
@@ -489,41 +489,41 @@ describe('ReactMultiChildReconcile', function() {
489 userOne: 'userOneStatus',
490 userTwo: 'userTwoStatus',
491 userThree: 'userThreeStatus',
492 - userFour: 'userFourStatus'
493 - }
492 + userFour: 'userFourStatus',
493 + },
494 },
495 {
496 usernameToStatus: {
497 userFour: 'userFourStatus',
498 userOne: 'userOneStatus',
499 userTwo: 'userTwoStatus',
500 - userThree: 'userThreeStatus'
501 - }
500 + userThree: 'userThreeStatus',
501 + },
502 },
503 {
504 usernameToStatus: {
505 userThree: 'userThreeStatus',
506 userFour: 'userFourStatus',
507 userOne: 'userOneStatus',
508 - userTwo: 'userTwoStatus'
509 - }
508 + userTwo: 'userTwoStatus',
509 + },
510 },
511 {
512 usernameToStatus: {
513 userTwo: 'userTwoStatus',
514 userThree: 'userThreeStatus',
515 userFour: 'userFourStatus',
516 - userOne: 'userOneStatus'
517 - }
516 + userOne: 'userOneStatus',
517 + },
518 },
519 {
520 usernameToStatus: { // Full circle!
521 userOne: 'userOneStatus',
522 userTwo: 'userTwoStatus',
523 userThree: 'userThreeStatus',
524 - userFour: 'userFourStatus'
525 - }
526 - }
524 + userFour: 'userFourStatus',
525 + },
526 + },
527 ];
528 testPropsSequence(PROPS_SEQUENCE);
529 });
@@ -535,16 +535,16 @@ describe('ReactMultiChildReconcile', function() {
535 {
536 usernameToStatus: {
537 jcw: 'jcwStatus',
538 - jordanjcw: 'jordanjcwStatus'
539 - }
538 + jordanjcw: 'jordanjcwStatus',
539 + },
540 },
541 {
542 usernameToStatus: {
543 jordanjcw: 'jordanjcwstatus2',
544 jcw: null,
545 - another: null
546 - }
547 - }
545 + another: null,
546 + },
547 + },
548 ];
549 testPropsSequence(PROPS_SEQUENCE);
550 });
@@ -556,16 +556,16 @@ describe('ReactMultiChildReconcile', function() {
556 jcw: 'jcwStatus',
557 jordanjcw: 'jordanjcwStatus',
558 john: 'johnStatus', // john will go away
559 - joe: 'joeStatus'
560 - }
559 + joe: 'joeStatus',
560 + },
561 },
562 {
563 usernameToStatus: {
564 jordanjcw: 'jordanjcwStatus',
565 joe: 'joeStatus',
566 - jcw: 'jcwStatus'
567 - }
568 - }
566 + jcw: 'jcwStatus',
567 + },
568 + },
569 ];
570 testPropsSequence(PROPS_SEQUENCE);
571 });
@@ -575,16 +575,16 @@ describe('ReactMultiChildReconcile', function() {
575 {
576 usernameToStatus: {
577 jcw: 'jcwStatus',
578 - jordanjcw: 'jordanjcwStatus'
579 - }
578 + jordanjcw: 'jordanjcwStatus',
579 + },
580 },
581 {
582 usernameToStatus: {
583 jcw: 'jcwStatus',
584 jordanjcw: 'jordanjcwStatus',
585 - jordanjcwnew: 'jordanjcwnewStatus'
586 - }
587 - }
585 + jordanjcwnew: 'jordanjcwnewStatus',
586 + },
587 + },
588 ];
589 testPropsSequence(PROPS_SEQUENCE);
590 });
@@ -594,17 +594,17 @@ describe('ReactMultiChildReconcile', function() {
594 {
595 usernameToStatus: {
596 jcw: 'jcwStatus',
597 - jordanjcw: 'jordanjcwStatus'
598 - }
597 + jordanjcw: 'jordanjcwStatus',
598 + },
599 },
600 {
601 usernameToStatus: {
602 jcw: 'jcwStatus',
603 jordanjcw: 'jordanjcwStatus',
604 jordanjcwnew: 'jordanjcwnewStatus',
605 - jordanjcwnew2: 'jordanjcwnewStatus2'
606 - }
607 - }
605 + jordanjcwnew2: 'jordanjcwnewStatus2',
606 + },
607 + },
608 ];
609 testPropsSequence(PROPS_SEQUENCE);
610 });
@@ -614,16 +614,16 @@ describe('ReactMultiChildReconcile', function() {
614 {
615 usernameToStatus: {
616 jcw: 'jcwStatus',
617 - jordanjcw: 'jordanjcwStatus'
618 - }
617 + jordanjcw: 'jordanjcwStatus',
618 + },
619 },
620 {
621 usernameToStatus: {
622 newUsername: 'newUsernameStatus',
623 jcw: 'jcwStatus',
624 - jordanjcw: 'jordanjcwStatus'
625 - }
626 - }
624 + jordanjcw: 'jordanjcwStatus',
625 + },
626 + },
627 ];
628 testPropsSequence(PROPS_SEQUENCE);
629 });
@@ -633,17 +633,17 @@ describe('ReactMultiChildReconcile', function() {
633 {
634 usernameToStatus: {
635 jcw: 'jcwStatus',
636 - jordanjcw: 'jordanjcwStatus'
637 - }
636 + jordanjcw: 'jordanjcwStatus',
637 + },
638 },
639 {
640 usernameToStatus: {
641 newNewUsername: 'newNewUsernameStatus',
642 newUsername: 'newUsernameStatus',
643 jcw: 'jcwStatus',
644 - jordanjcw: 'jordanjcwStatus'
645 - }
646 - }
644 + jordanjcw: 'jordanjcwStatus',
645 + },
646 + },
647 ];
648 testPropsSequence(PROPS_SEQUENCE);
649 });
@@ -653,16 +653,16 @@ describe('ReactMultiChildReconcile', function() {
653 {
654 usernameToStatus: {
655 jcw: 'jcwStatus',
656 - jordanjcw: 'jordanjcwStatus'
657 - }
656 + jordanjcw: 'jordanjcwStatus',
657 + },
658 },
659 {
660 usernameToStatus: {
661 emptyUsername: null,
662 jcw: 'jcwStatus',
663 - jordanjcw: 'jordanjcwStatus'
664 - }
665 - }
663 + jordanjcw: 'jordanjcwStatus',
664 + },
665 + },
666 ];
667 testPropsSequence(PROPS_SEQUENCE);
668 });
@@ -672,16 +672,16 @@ describe('ReactMultiChildReconcile', function() {
672 {
673 usernameToStatus: {
674 jcw: 'jcwStatus',
675 - jordanjcw: 'jordanjcwStatus'
676 - }
675 + jordanjcw: 'jordanjcwStatus',
676 + },
677 },
678 {
679 usernameToStatus: {
680 jcw: 'jcwStatus',
681 jordanjcw: 'jordanjcwStatus',
682 - emptyUsername: null
683 - }
684 - }
682 + emptyUsername: null,
683 + },
684 + },
685 ];
686 testPropsSequence(PROPS_SEQUENCE);
687 });
@@ -691,8 +691,8 @@ describe('ReactMultiChildReconcile', function() {
691 {
692 usernameToStatus: {
693 jcw: 'jcwStatus',
694 - jordanjcw: 'jordanjcwStatus'
695 - }
694 + jordanjcw: 'jordanjcwStatus',
695 + },
696 },
697 {
698 usernameToStatus: {
@@ -700,9 +700,9 @@ describe('ReactMultiChildReconcile', function() {
700 skipOverMe: null,
701 skipOverMeToo: null,
702 definitelySkipOverMe: null,
703 - jordanjcw: 'jordanjcwstatus2'
704 - }
705 - }
703 + jordanjcw: 'jordanjcwstatus2',
704 + },
705 + },
706 ];
707 testPropsSequence(PROPS_SEQUENCE);
708 });
@@ -712,16 +712,16 @@ describe('ReactMultiChildReconcile', function() {
712 {
713 usernameToStatus: {
714 jcw: 'jcwStatus',
715 - jordanjcw: 'jordanjcwStatus'
716 - }
715 + jordanjcw: 'jordanjcwStatus',
716 + },
717 },
718 {
719 usernameToStatus: {
720 jcw: 'jcwstatus2',
721 insertThis: 'insertThisStatus',
722 - jordanjcw: 'jordanjcwstatus2'
723 - }
724 - }
722 + jordanjcw: 'jordanjcwstatus2',
723 + },
724 + },
725 ];
726 testPropsSequence(PROPS_SEQUENCE);
727 });
@@ -731,8 +731,8 @@ describe('ReactMultiChildReconcile', function() {
731 {
732 usernameToStatus: {
733 jcw: 'jcwStatus',
734 - jordanjcw: 'jordanjcwStatus'
735 - }
734 + jordanjcw: 'jordanjcwStatus',
735 + },
736 },
737 {
738 usernameToStatus: {
@@ -740,9 +740,9 @@ describe('ReactMultiChildReconcile', function() {
740 insertThis: 'insertThisStatus',
741 insertThisToo: 'insertThisTooStatus',
742 definitelyInsertThisToo: 'definitelyInsertThisTooStatus',
743 - jordanjcw: 'jordanjcwstatus2'
744 - }
745 - }
743 + jordanjcw: 'jordanjcwstatus2',
744 + },
745 + },
746 ];
747 testPropsSequence(PROPS_SEQUENCE);
748 });
@@ -755,8 +755,8 @@ describe('ReactMultiChildReconcile', function() {
755 insertThis: null,
756 insertThisToo: null,
757 definitelyInsertThisToo: null,
758 - jordanjcw: 'jordanjcwStatus'
759 - }
758 + jordanjcw: 'jordanjcwStatus',
759 + },
760 },
761 {
762 usernameToStatus: {
@@ -764,9 +764,9 @@ describe('ReactMultiChildReconcile', function() {
764 insertThis: 'insertThisStatus',
765 insertThisToo: 'insertThisTooStatus',
766 definitelyInsertThisToo: 'definitelyInsertThisTooStatus',
767 - jordanjcw: 'jordanjcwstatus2'
768 - }
769 - }
767 + jordanjcw: 'jordanjcwstatus2',
768 + },
769 + },
770 ];
771 testPropsSequence(PROPS_SEQUENCE);
772 });
src/renderers/shared/reconciler/__tests__/ReactMultiChildText-test.js
+1 -1
@@ -201,7 +201,7 @@ describe('ReactMultiChildText', function() {
201 ['', <div>{'foo'}{<div />}{true}</div>, 1.2], ['', <div />, '1.2'],
202
203 [true, <div>{1.2}{''}{<div />}{'foo'}</div>, true, 1.2], [<div />, '1.2'],
204 - ['', 'foo', <div>{true}{<div />}{1.2}{''}</div>, 'foo'], ['', 'foo', <div />, 'foo']
204 + ['', 'foo', <div>{true}{<div />}{1.2}{''}</div>, 'foo'], ['', 'foo', <div />, 'foo'],
205 ]);
206 });
207
src/renderers/shared/reconciler/__tests__/ReactStateSetters-test.js
+4 -4
@@ -29,7 +29,7 @@ describe('ReactStateSetters', function() {
29
30 render: function() {
31 return <div />;
32 - }
32 + },
33 });
34
35 TestComponentWithMixin = React.createClass({
@@ -41,7 +41,7 @@ describe('ReactStateSetters', function() {
41
42 render: function() {
43 return <div />;
44 - }
44 + },
45 });
46 });
47
@@ -55,7 +55,7 @@ describe('ReactStateSetters', function() {
55 function(a, b, c) {
56 return {
57 foo: a + b + c,
58 - bar: a * b * c
58 + bar: a * b * c,
59 };
60 }
61 );
@@ -108,7 +108,7 @@ describe('ReactStateSetters', function() {
108 function(a, b, c) {
109 return {
110 foo: a + b + c,
111 - bar: a * b * c
111 + bar: a * b * c,
112 };
113 }
114 );
src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js
+38 -38
@@ -33,7 +33,7 @@ describe('ReactUpdates', function() {
33 },
34 render: function() {
35 return <div>{this.state.x}</div>;
36 - }
36 + },
37 });
38
39 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -61,7 +61,7 @@ describe('ReactUpdates', function() {
61 },
62 render: function() {
63 return <div>({this.state.x}, {this.state.y})</div>;
64 - }
64 + },
65 });
66
67 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -92,7 +92,7 @@ describe('ReactUpdates', function() {
92 },
93 render: function() {
94 return <div>({this.props.x}, {this.state.y})</div>;
95 - }
95 + },
96 });
97
98 var instance = ReactTestUtils.renderIntoDocument(<Component x={0} />);
@@ -123,7 +123,7 @@ describe('ReactUpdates', function() {
123 },
124 render: function() {
125 return <div><Child ref="child" x={this.state.x} /></div>;
126 - }
126 + },
127 });
128 var childUpdateCount = 0;
129 var Child = React.createClass({
@@ -135,7 +135,7 @@ describe('ReactUpdates', function() {
135 },
136 render: function() {
137 return <div>{this.props.x + this.state.y}</div>;
138 - }
138 + },
139 });
140
141 var instance = ReactTestUtils.renderIntoDocument(<Parent />);
@@ -169,7 +169,7 @@ describe('ReactUpdates', function() {
169 },
170 render: function() {
171 return <div><Child ref="child" x={this.state.x} /></div>;
172 - }
172 + },
173 });
174 var childUpdateCount = 0;
175 var Child = React.createClass({
@@ -181,7 +181,7 @@ describe('ReactUpdates', function() {
181 },
182 render: function() {
183 return <div>{this.props.x + this.state.y}</div>;
184 - }
184 + },
185 });
186
187 var instance = ReactTestUtils.renderIntoDocument(<Parent />);
@@ -217,7 +217,7 @@ describe('ReactUpdates', function() {
217 },
218 render: function() {
219 return <div>{this.state.x}</div>;
220 - }
220 + },
221 });
222
223 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -259,7 +259,7 @@ describe('ReactUpdates', function() {
259 },
260 render: function() {
261 return <div>{this.state.x}</div>;
262 - }
262 + },
263 });
264
265 var instance = ReactTestUtils.renderIntoDocument(<Component />);
@@ -296,14 +296,14 @@ describe('ReactUpdates', function() {
296 render: function() {
297 parentRenderCount++;
298 return <Child ref="child" />;
299 - }
299 + },
300 });
301
302 var Child = React.createClass({
303 render: function() {
304 childRenderCount++;
305 return <div />;
306 - }
306 + },
307 });
308
309 expect(parentRenderCount).toBe(0);
@@ -337,7 +337,7 @@ describe('ReactUpdates', function() {
337 var Top = React.createClass({
338 render: function() {
339 return <Middle><Bottom /></Middle>;
340 - }
340 + },
341 });
342
343 var Middle = React.createClass({
@@ -348,14 +348,14 @@ describe('ReactUpdates', function() {
348 render: function() {
349 numMiddleRenders++;
350 return <div>{this.props.children}</div>;
351 - }
351 + },
352 });
353
354 var Bottom = React.createClass({
355 render: function() {
356 numBottomRenders++;
357 return <span />;
358 - }
358 + },
359 });
360
361 ReactTestUtils.renderIntoDocument(<Top />);
@@ -373,7 +373,7 @@ describe('ReactUpdates', function() {
373 },
374 componentDidUpdate: function() {
375 didUpdates.push(this.constructor.displayName);
376 - }
376 + },
377 };
378
379 var Box = React.createClass({
@@ -381,7 +381,7 @@ describe('ReactUpdates', function() {
381
382 render: function() {
383 return <div ref="boxDiv">{this.props.children}</div>;
384 - }
384 + },
385 });
386
387 var Child = React.createClass({
@@ -389,7 +389,7 @@ describe('ReactUpdates', function() {
389
390 render: function() {
391 return <span ref="span">child</span>;
392 - }
392 + },
393 });
394
395 var Switcher = React.createClass({
@@ -407,13 +407,13 @@ describe('ReactUpdates', function() {
407 <div
408 ref="switcherDiv"
409 style={{
410 - display: this.state.tabKey === child.key ? '' : 'none'
410 + display: this.state.tabKey === child.key ? '' : 'none',
411 }}>
412 {child}
413 </div>
414 </Box>
415 );
416 - }
416 + },
417 });
418
419 var App = React.createClass({
@@ -425,7 +425,7 @@ describe('ReactUpdates', function() {
425 <Child key="hello" ref="child" />
426 </Switcher>
427 );
428 - }
428 + },
429 });
430
431 var root = <App />;
@@ -493,7 +493,7 @@ describe('ReactUpdates', function() {
493 var Component = React.createClass({
494 render: function() {
495 return <div>{this.props.text}</div>;
496 - }
496 + },
497 });
498
499 var containerA = document.createElement('div');
@@ -535,7 +535,7 @@ describe('ReactUpdates', function() {
535 },
536 render: function() {
537 return <div>A{this.state.x}</div>;
538 - }
538 + },
539 });
540
541 var B = React.createClass({
@@ -544,7 +544,7 @@ describe('ReactUpdates', function() {
544 },
545 render: function() {
546 return <div>B{this.state.x}</div>;
547 - }
547 + },
548 });
549
550 a = ReactTestUtils.renderIntoDocument(<A />);
@@ -575,7 +575,7 @@ describe('ReactUpdates', function() {
575 this.refs.inner.setState({x: x}, function() {
576 updates.push('Inner-callback-' + x);
577 });
578 - }
578 + },
579 });
580 var Inner = React.createClass({
581 getInitialState: function() {
@@ -587,7 +587,7 @@ describe('ReactUpdates', function() {
587 },
588 componentDidUpdate: function() {
589 updates.push('Inner-didUpdate-' + this.props.x + '-' + this.state.x);
590 - }
590 + },
591 });
592
593 var instance = ReactTestUtils.renderIntoDocument(<Outer />);
@@ -625,7 +625,7 @@ describe('ReactUpdates', function() {
625 'Inner-render-2-2',
626 'Inner-didUpdate-2-2',
627 'Inner-callback-2',
628 - 'Outer-callback-2'
628 + 'Outer-callback-2',
629 ]);
630 });
631
@@ -649,7 +649,7 @@ describe('ReactUpdates', function() {
649 React.findDOMNode(this)
650 );
651 }
652 - }
652 + },
653 });
654
655 ReactTestUtils.renderIntoDocument(<MockComponent depth={0} count={2} />);
@@ -686,7 +686,7 @@ describe('ReactUpdates', function() {
686 this.setState({s: 1});
687 this.setState({s: 0});
688 this.setState({s: 1});
689 - }
689 + },
690 });
691
692 var Y = React.createClass({
@@ -694,7 +694,7 @@ describe('ReactUpdates', function() {
694 return <div>
695 <Z />
696 </div>;
697 - }
697 + },
698 });
699
700 var Z = React.createClass({
@@ -703,7 +703,7 @@ describe('ReactUpdates', function() {
703 },
704 componentWillUpdate: function() {
705 x.go();
706 - }
706 + },
707 });
708
709 var x;
@@ -730,7 +730,7 @@ describe('ReactUpdates', function() {
730 },
731 render: function() {
732 return <div>A{this.state.x}</div>;
733 - }
733 + },
734 });
735
736 var B = React.createClass({
@@ -739,7 +739,7 @@ describe('ReactUpdates', function() {
739 },
740 render: function() {
741 return <div />;
742 - }
742 + },
743 });
744
745 ReactUpdates.batchedUpdates(function() {
@@ -771,7 +771,7 @@ describe('ReactUpdates', function() {
771 },
772 render: function() {
773 return <div>{this.state.x}</div>;
774 - }
774 + },
775 });
776
777 var container = document.createElement('div');
@@ -796,7 +796,7 @@ describe('ReactUpdates', function() {
796 expect(callbackCount).toBe(1);
797 }, component);
798 expect(callbackCount).toBe(0);
799 - }
799 + },
800 });
801
802 var component = ReactTestUtils.renderIntoDocument(<A />);
@@ -829,7 +829,7 @@ describe('ReactUpdates', function() {
829 });
830 }
831 log.push('didUpdate-' + this.state.updates);
832 - }
832 + },
833 });
834
835 var component = ReactTestUtils.renderIntoDocument(<A />);
@@ -848,7 +848,7 @@ describe('ReactUpdates', function() {
848 // asap-1.2.
849 'setState-cb',
850 'asap-2',
851 - 'asap-1.2'
851 + 'asap-1.2',
852 ]);
853 });
854
@@ -867,7 +867,7 @@ describe('ReactUpdates', function() {
867 render: function() {
868 renderCount++;
869 return <div />;
870 - }
870 + },
871 });
872
873 var A = React.createClass({
@@ -876,7 +876,7 @@ describe('ReactUpdates', function() {
876 },
877 render: function() {
878 return this.state.showB ? <B /> : <div />;
879 - }
879 + },
880 });
881
882 var component = ReactTestUtils.renderIntoDocument(<A />);
src/renderers/shared/reconciler/__tests__/refs-destruction-test.js
+1 -1
@@ -25,7 +25,7 @@ var TestComponent = React.createClass({
25 }
26 </div>
27 );
28 - }
28 + },
29 });
30
31 describe('refs-destruction', function() {
src/renderers/shared/reconciler/__tests__/refs-test.js
+5 -5
@@ -48,7 +48,7 @@ var ClickCounter = React.createClass({
48 {children}
49 </span>
50 );
51 - }
51 + },
52 });
53
54 /**
@@ -59,7 +59,7 @@ var ClickCounter = React.createClass({
59 var GeneralContainerComponent = React.createClass({
60 render: function() {
61 return <div>{this.props.children}</div>;
62 - }
62 + },
63 });
64
65 /**
@@ -81,7 +81,7 @@ var TestRefsComponent = React.createClass({
81 </GeneralContainerComponent>
82 </div>
83 );
84 - }
84 + },
85 });
86
87 /**
@@ -192,7 +192,7 @@ describe('ref swapping', function() {
192 />
193 </div>
194 );
195 - }
195 + },
196 });
197
198 it('Allow refs to hop around children correctly', function() {
@@ -234,7 +234,7 @@ describe('ref swapping', function() {
234 var Component = React.createClass({
235 render: function() {
236 return <div />;
237 - }
237 + },
238 });
239
240 var instance = ReactTestUtils.renderIntoDocument(<Component />);
src/renderers/shared/reconciler/instantiateReactComponent.js
+1 -1
@@ -26,7 +26,7 @@ assign(
26 ReactCompositeComponentWrapper.prototype,
27 ReactCompositeComponent.Mixin,
28 {
29 - _instantiateReactComponent: instantiateReactComponent
29 + _instantiateReactComponent: instantiateReactComponent,
30 }
31 );
32
src/shared/utils/CallbackQueue.js
+1 -1
@@ -87,7 +87,7 @@ assign(CallbackQueue.prototype, {
87 */
88 destructor: function() {
89 this.reset();
90 - }
90 + },
91
92 });
93
src/shared/utils/PooledClass.js
+1 -1
@@ -106,7 +106,7 @@ var PooledClass = {
106 oneArgumentPooler: oneArgumentPooler,
107 twoArgumentPooler: twoArgumentPooler,
108 threeArgumentPooler: threeArgumentPooler,
109 - fiveArgumentPooler: fiveArgumentPooler
109 + fiveArgumentPooler: fiveArgumentPooler,
110 };
111
112 module.exports = PooledClass;
src/shared/utils/Transaction.js
+2 -2
@@ -220,7 +220,7 @@ var Mixin = {
220 }
221 }
222 this.wrapperInitData.length = 0;
223 - }
223 + },
224 };
225
226 var Transaction = {
@@ -230,7 +230,7 @@ var Transaction = {
230 /**
231 * Token to look for to determine if an error occured.
232 */
233 - OBSERVED_ERROR: {}
233 + OBSERVED_ERROR: {},
234
235 };
236
src/shared/utils/__tests__/OrderedMap-test.js
+42 -40
@@ -19,7 +19,7 @@ var OrderedMap;
19 var hasEmptyStringKey = {
20 'thisKeyIsFine': {data: []},
21 '': {thisShouldCauseAFailure: []},
22 - 'thisKeyIsAlsoFine': {data: []}
22 + 'thisKeyIsAlsoFine': {data: []},
23 };
24
25 /**
@@ -28,7 +28,7 @@ var hasEmptyStringKey = {
28 var duplicate = function(itm, key, count) {
29 return {
30 uniqueID: itm.uniqueID,
31 - val: itm.val + key + count + this.justToTestScope
31 + val: itm.val + key + count + this.justToTestScope,
32 };
33 };
34
@@ -36,96 +36,96 @@ var duplicate = function(itm, key, count) {
36 // distinguish. Every key MUST be a string period!
37 var hasNullAndUndefStringKey = [
38 {uniqueID: 'undefined', val: 'thisIsUndefined'},
39 - {uniqueID: 'null', val: 'thisIsNull'}
39 + {uniqueID: 'null', val: 'thisIsNull'},
40 ];
41 var hasNullKey = [
42 {uniqueID: 'thisKeyIsFine', data: []},
43 {uniqueID: 'thisKeyIsAlsoFine', data: []},
44 - {uniqueID: null, data: []}
44 + {uniqueID: null, data: []},
45 ];
46
47 var hasObjectKey = [
48 {uniqueID: 'thisKeyIsFine', data: []},
49 {uniqueID: 'thisKeyIsAlsoFine', data: []},
50 - {uniqueID: {}, data: []}
50 + {uniqueID: {}, data: []},
51 ];
52
53 var hasArrayKey = [
54 {uniqueID: 'thisKeyIsFine', data: []},
55 {uniqueID: 'thisKeyIsAlsoFine', data: []},
56 - {uniqueID: [], data: []}
56 + {uniqueID: [], data: []},
57 ];
58
59 // This should be allowed
60 var hasNullStringKey = [
61 {uniqueID: 'thisKeyIsFine', data: []},
62 {uniqueID: 'thisKeyIsAlsoFine', data: []},
63 - {uniqueID: 'null', data: []}
63 + {uniqueID: 'null', data: []},
64 ];
65
66 var hasUndefinedKey = [
67 {uniqueID: 'thisKeyIsFine', data: []},
68 {uniqueID: 'thisKeyIsAlsoFine', data: []},
69 - {uniqueID: undefined, data: []}
69 + {uniqueID: undefined, data: []},
70 ];
71
72 var hasUndefinedStringKey = [
73 {uniqueID: 'thisKeyIsFine', data: []},
74 {uniqueID: 'thisKeyIsAlsoFine', data: []},
75 - {uniqueID: 'undefined', data: []}
75 + {uniqueID: 'undefined', data: []},
76 ];
77
78 var hasPositiveNumericKey = [
79 {uniqueID: 'notANumber', data: []},
80 {uniqueID: '5', data: []},
81 - {uniqueID: 'notAnotherNumber', data: []}
81 + {uniqueID: 'notAnotherNumber', data: []},
82 ];
83
84 var hasZeroStringKey = [
85 {uniqueID: 'greg', data: 'grego'},
86 {uniqueID: '0', data: '0o'},
87 - {uniqueID: 'tom', data: 'tomo'}
87 + {uniqueID: 'tom', data: 'tomo'},
88 ];
89
90 var hasZeroNumberKey = [
91 {uniqueID: 'greg', data: 'grego'},
92 {uniqueID: 0, data: '0o'},
93 - {uniqueID: 'tom', data: 'tomo'}
93 + {uniqueID: 'tom', data: 'tomo'},
94 ];
95
96 var hasAllNumericStringKeys = [
97 {uniqueID: '0', name: 'Gregory'},
98 {uniqueID: '2', name: 'James'},
99 - {uniqueID: '1', name: 'Tom'}
99 + {uniqueID: '1', name: 'Tom'},
100 ];
101
102 var hasAllNumericKeys = [
103 {uniqueID: 0, name: 'Gregory'},
104 {uniqueID: 2, name: 'James'},
105 - {uniqueID: 1, name: 'Tom'}
105 + {uniqueID: 1, name: 'Tom'},
106 ];
107
108 var hasAllValidKeys = [
109 {uniqueID: 'keyOne', value: 'valueOne'},
110 - {uniqueID: 'keyTwo', value: 'valueTwo'}
110 + {uniqueID: 'keyTwo', value: 'valueTwo'},
111 ];
112
113 var hasDuplicateKeys = [
114 {uniqueID: 'keyOne', value: 'valueOne'},
115 {uniqueID: 'keyTwo', value: 'valueTwo'},
116 - {uniqueID: 'keyOne', value: 'valueThree'}
116 + {uniqueID: 'keyOne', value: 'valueThree'},
117 ];
118
119 var idEntities = [
120 {uniqueID: 'greg', name: 'Gregory'},
121 {uniqueID: 'james', name: 'James'},
122 - {uniqueID: 'tom', name: 'Tom'}
122 + {uniqueID: 'tom', name: 'Tom'},
123 ];
124
125 var hasEmptyKey = [
126 {uniqueID: 'greg', name: 'Gregory'},
127 {uniqueID: '', name: 'James'},
128 - {uniqueID: 'tom', name: 'Tom'}
128 + {uniqueID: 'tom', name: 'Tom'},
129 ];
130
131 var extractUniqueID = function(entity) {
@@ -355,9 +355,11 @@ describe('OrderedMap', function() {
355 });
356
357 it('should throw when accessing key before/after of non-key', function() {
358 - var om = OrderedMap.fromArray([
359 - {uniqueID: 'first'},
360 - {uniqueID: 'two'}], extractUniqueID
358 + var om = OrderedMap.fromArray(
359 + [
360 + {uniqueID: 'first'},
361 + {uniqueID: 'two'},
362 + ], extractUniqueID
363 );
364 expect(function() {
365 om.keyBefore('dog');
@@ -379,7 +381,7 @@ describe('OrderedMap', function() {
381 {uniqueID: 'one', val: 'first'},
382 {uniqueID: 'two', val: 'second'},
383 {uniqueID: 'three', val: 'third'},
382 - {uniqueID: 'four', val: 'fourth'}
384 + {uniqueID: 'four', val: 'fourth'},
385 ], extractUniqueID);
386
387 expect(function() {
@@ -440,7 +442,7 @@ describe('OrderedMap', function() {
442 {uniqueID: 'one', val: 'first'},
443 {uniqueID: 'two', val: 'second'},
444 {uniqueID: 'three', val: 'third'},
443 - {uniqueID: 'four', val: 'fourth'}
445 + {uniqueID: 'four', val: 'fourth'},
446 ], extractUniqueID);
447 expect(om.keyBefore('one')).toBe(undefined); // first key
448 expect(om.keyBefore('two')).toBe('one');
@@ -472,7 +474,7 @@ describe('OrderedMap', function() {
474 it('should compute key indices correctly', function() {
475 var om = OrderedMap.fromArray([
476 {uniqueID: 'one', val: 'first'},
475 - {uniqueID: 'two', val: 'second'}
477 + {uniqueID: 'two', val: 'second'},
478 ], extractUniqueID);
479 expect(om.keyAtIndex(0)).toBe('one');
480 expect(om.keyAtIndex(1)).toBe('two');
@@ -520,10 +522,10 @@ describe('OrderedMap', function() {
522 it('should compute indices on mutually exclusive merge', function() {
523 var om = OrderedMap.fromArray([
524 {uniqueID: 'one', val: 'first'},
523 - {uniqueID: 'two', val: 'second'}
525 + {uniqueID: 'two', val: 'second'},
526 ], extractUniqueID);
527 var om2 = OrderedMap.fromArray([
526 - {uniqueID: 'three', val: 'third'}
528 + {uniqueID: 'three', val: 'third'},
529 ], extractUniqueID);
530 var res = om.merge(om2);
531
@@ -553,7 +555,7 @@ describe('OrderedMap', function() {
555 it('should compute indices on intersected merge', function() {
556 var oneTwo = OrderedMap.fromArray([
557 {uniqueID: 'one', val: 'first'},
556 - {uniqueID: 'two', val: 'secondOM1'}
558 + {uniqueID: 'two', val: 'secondOM1'},
559 ], extractUniqueID);
560
561 var testOneTwoMergedWithTwoThree = function(res) {
@@ -579,7 +581,7 @@ describe('OrderedMap', function() {
581 var result =
582 oneTwo.merge(OrderedMap.fromArray([
583 {uniqueID: 'two', val: 'secondOM2'},
582 - {uniqueID: 'three', val: 'third'}
584 + {uniqueID: 'three', val: 'third'},
585 ], extractUniqueID));
586 testOneTwoMergedWithTwoThree(result);
587
@@ -588,7 +590,7 @@ describe('OrderedMap', function() {
590 result = oneTwo.merge(
591 OrderedMap.fromArray([
592 {uniqueID: 'three', val: 'third'},
591 - {uniqueID: 'two', val:'secondOM2'}
593 + {uniqueID: 'two', val:'secondOM2'},
594 ], extractUniqueID)
595 );
596 testOneTwoMergedWithTwoThree(result);
@@ -615,7 +617,7 @@ describe('OrderedMap', function() {
617 };
618 result = OrderedMap.fromArray([
619 {uniqueID: 'two', val: 'secondOM2'},
618 - {uniqueID: 'three', val: 'third'}
620 + {uniqueID: 'three', val: 'third'},
621 ], extractUniqueID).merge(oneTwo);
622 testTwoThreeMergedWithOneTwo(result);
623
@@ -624,11 +626,11 @@ describe('OrderedMap', function() {
626 it('should merge mutually exclusive keys to the end.', function() {
627 var om = OrderedMap.fromArray([
628 {uniqueID: 'one', val: 'first'},
627 - {uniqueID: 'two', val: 'second'}
629 + {uniqueID: 'two', val: 'second'},
630 ], extractUniqueID);
631 var om2 = OrderedMap.fromArray([
632 {uniqueID: 'three', val: 'first'},
631 - {uniqueID: 'four', val: 'second'}
633 + {uniqueID: 'four', val: 'second'},
634 ], extractUniqueID);
635 var res = om.merge(om2);
636 expect(res.length).toBe(4);
@@ -639,7 +641,7 @@ describe('OrderedMap', function() {
641 var om = OrderedMap.fromArray([
642 {uniqueID: 'x', val: 'xx'},
643 {uniqueID: 'y', val: 'yy'},
642 - {uniqueID: 'z', val: 'zz'}
644 + {uniqueID: 'z', val: 'zz'},
645 ], extractUniqueID);
646 var scope = {justToTestScope: 'justTestingScope'};
647 var verifyResult = function(omResult) {
@@ -654,7 +656,7 @@ describe('OrderedMap', function() {
656 var resultOM = om.map(function(itm, key, count) {
657 return {
658 uniqueID: itm.uniqueID,
657 - val: itm.val + key + count + this.justToTestScope
659 + val: itm.val + key + count + this.justToTestScope,
660 };
661 }, scope);
662 verifyResult(resultOM);
@@ -663,7 +665,7 @@ describe('OrderedMap', function() {
665 om.forEach(function(itm, key, count) {
666 resArray.push({
667 uniqueID: itm.uniqueID,
666 - val: itm.val + key + count + this.justToTestScope
668 + val: itm.val + key + count + this.justToTestScope,
669 });
670 }, scope);
671 resultOM = OrderedMap.fromArray(resArray, extractUniqueID);
@@ -674,7 +676,7 @@ describe('OrderedMap', function() {
676 var om = OrderedMap.fromArray([
677 {uniqueID: 'x', val: 'xx'},
678 {uniqueID: 'y', val: 'yy'},
677 - {uniqueID: 'z', val: 'zz'}
679 + {uniqueID: 'z', val: 'zz'},
680 ], extractUniqueID);
681 var scope = {justToTestScope: 'justTestingScope'};
682
@@ -715,7 +717,7 @@ describe('OrderedMap', function() {
717 var om = OrderedMap.fromArray([
718 {uniqueID: 'x', val: 'xx'},
719 {uniqueID: 'y', val: 'yy'},
718 - {uniqueID: 'z', val: 'zz'}
720 + {uniqueID: 'z', val: 'zz'},
721 ], extractUniqueID);
722 var scope = {justToTestScope: 'justTestingScope'};
723
@@ -852,7 +854,7 @@ describe('OrderedMap', function() {
854 var om = OrderedMap.fromArray([
855 {uniqueID: 'x', val: 'xx'},
856 {uniqueID: 'y', val: 'yy'},
855 - {uniqueID: 'z', val: 'zz'}
857 + {uniqueID: 'z', val: 'zz'},
858 ], extractUniqueID);
859 var scope = {justToTestScope: 'justTestingScope'};
860 var verifyThreeItems = function(omResult) {
@@ -896,7 +898,7 @@ describe('OrderedMap', function() {
898 var pushToResArray = function(itm, key, count) {
899 resArray.push({
900 uniqueID: itm.uniqueID,
899 - val: itm.val + key + count + this.justToTestScope
901 + val: itm.val + key + count + this.justToTestScope,
902 });
903 };
904
@@ -933,7 +935,7 @@ describe('OrderedMap', function() {
935 var sourceArray = [
936 {uniqueID: 'x', val: 'xx'},
937 {uniqueID: 'y', val: 'yy'},
936 - {uniqueID: 'z', val: 'zz'}
938 + {uniqueID: 'z', val: 'zz'},
939 ];
940 var om = OrderedMap.fromArray(sourceArray, extractUniqueID);
941 expect(om.toArray()).toEqual(sourceArray);
src/shared/utils/__tests__/Transaction-test.js
+27 -25
@@ -53,7 +53,7 @@ describe('Transaction', function() {
53 initialize: throwInInit,
54 close: function(initResult) {
55 this.firstCloseParam = initResult;
56 - }
56 + },
57 },
58 {
59 initialize: function() {
@@ -61,14 +61,14 @@ describe('Transaction', function() {
61 },
62 close: function(initResult) {
63 this.secondCloseParam = initResult;
64 - }
64 + },
65 },
66 {
67 initialize: throwInInit,
68 close: function(initResult) {
69 this.lastCloseParam = initResult;
70 - }
71 - }
70 + },
71 + },
72 ];
73 };
74
@@ -106,7 +106,7 @@ describe('Transaction', function() {
106 },
107 close: function(initResult) {
108 this.firstCloseParam = initResult;
109 - }
109 + },
110 },
111 {
112 initialize: function() {
@@ -114,7 +114,7 @@ describe('Transaction', function() {
114 },
115 close: function(initResult) {
116 this.secondCloseParam = initResult;
117 - }
117 + },
118 },
119 {
120 initialize: function() {
@@ -122,8 +122,8 @@ describe('Transaction', function() {
122 },
123 close: function(initResult) {
124 this.lastCloseParam = initResult;
125 - }
126 - }
125 + },
126 + },
127 ];
128 };
129
@@ -168,7 +168,7 @@ describe('Transaction', function() {
168 },
169 close: function(initResult) {
170 this.firstCloseParam = initResult;
171 - }
171 + },
172 },
173 {
174 initialize: function() {
@@ -176,7 +176,7 @@ describe('Transaction', function() {
176 },
177 close: function(initResult) {
178 this.secondCloseParam = initResult;
179 - }
179 + },
180 },
181 {
182 initialize: function() {
@@ -184,7 +184,7 @@ describe('Transaction', function() {
184 },
185 close: function(initResult) {
186 this.lastCloseParam = initResult;
187 - }
187 + },
188 },
189 {
190 initialize: function() {
@@ -192,8 +192,8 @@ describe('Transaction', function() {
192 },
193 close: function(initResult) {
194 throw new Error('The transaction should throw a TypeError.');
195 - }
196 - }
195 + },
196 + },
197 ];
198 };
199
@@ -229,8 +229,8 @@ describe('Transaction', function() {
229 {
230 close: function(initResult) {
231 throw new Error(exceptionMsg);
232 - }
233 - }
232 + },
233 + },
234 ];
235 };
236
@@ -260,7 +260,7 @@ describe('Transaction', function() {
260 },
261 close: function(initResult) {
262 this.firstCloseParam = initResult;
263 - }
263 + },
264 },
265 {
266 initialize: function() {
@@ -271,8 +271,8 @@ describe('Transaction', function() {
271 this.nestedTransaction.perform(function() {
272 nestedPerformSideEffect = 'NESTED_SIDE_EFFECT';
273 });
274 - }
275 - }
274 + },
275 + },
276 ];
277 };
278
@@ -281,14 +281,16 @@ describe('Transaction', function() {
281 };
282 assign(NestedTransaction.prototype, Transaction.Mixin);
283 NestedTransaction.prototype.getTransactionWrappers = function() {
284 - return [{
285 - initialize: function() {
286 - this.hasInitializedNested = true;
284 + return [
285 + {
286 + initialize: function() {
287 + this.hasInitializedNested = true;
288 + },
289 + close: function() {
290 + this.hasClosedNested = true;
291 + },
292 },
288 - close: function() {
289 - this.hasClosedNested = true;
290 - }
291 - }];
293 + ];
294 };
295
296 var transaction = new TestTransaction();
src/shared/utils/__tests__/escapeTextContentForBrowser-test.js
+1 -1
@@ -24,7 +24,7 @@ describe('escapeTextContentForBrowser', function() {
24 var escaped = escapeTextContentForBrowser({
25 toString: function() {
26 return 'ponys';
27 - }
27 + },
28 });
29
30 expect(escaped).toBe('ponys');
src/shared/utils/__tests__/quoteAttributeValueForBrowser-test.js
+1 -1
@@ -24,7 +24,7 @@ describe('quoteAttributeValueForBrowser', function() {
24 var escaped = quoteAttributeValueForBrowser({
25 toString: function() {
26 return 'ponys';
27 - }
27 + },
28 });
29
30 expect(escaped).toBe('"ponys"');
src/shared/utils/__tests__/traverseAllChildren-test.js
+13 -11
@@ -205,11 +205,13 @@ describe('traverseAllChildren', function() {
205
206 var instance = (
207 <div>{
208 - [frag({
209 - firstHalfKey: [zero, one, two],
210 - secondHalfKey: [three, four],
211 - keyFive: five
212 - })]
208 + [
209 + frag({
210 + firstHalfKey: [zero, one, two],
211 + secondHalfKey: [three, four],
212 + keyFive: five,
213 + }),
214 + ]
215 }</div>
216 );
217
@@ -291,9 +293,9 @@ describe('traverseAllChildren', function() {
293 } else {
294 return {value: undefined, done: true};
295 }
294 - }
296 + },
297 };
296 - }
298 + },
299 };
300
301 var traverseContext = [];
@@ -339,9 +341,9 @@ describe('traverseAllChildren', function() {
341 } else {
342 return {value: undefined, done: true};
343 }
342 - }
344 + },
345 };
344 - }
346 + },
347 };
348
349 var traverseContext = [];
@@ -389,9 +391,9 @@ describe('traverseAllChildren', function() {
391 } else {
392 return {value: undefined, done: true};
393 }
392 - }
394 + },
395 };
394 - }
396 + },
397 };
398 threeDivEntryIterable.entries = threeDivEntryIterable['@@iterator'];
399
src/shared/utils/escapeTextContentForBrowser.js
+1 -1
@@ -16,7 +16,7 @@ var ESCAPE_LOOKUP = {
16 '>': '&gt;',
17 '<': '&lt;',
18 '"': '&quot;',
19 - '\'': '&#x27;'
19 + '\'': '&#x27;',
20 };
21
22 var ESCAPE_REGEX = /[&><"']/g;
src/shared/utils/isTextInputElement.js
+1 -1
@@ -29,7 +29,7 @@ var supportedInputTypes = {
29 'text': true,
30 'time': true,
31 'url': true,
32 - 'week': true
32 + 'week': true,
33 };
34
35 function isTextInputElement(elem) {
src/shared/utils/traverseAllChildren.js
+1 -1
@@ -30,7 +30,7 @@ var SUBSEPARATOR = ':';
30 var userProvidedKeyEscaperLookup = {
31 '=': '=0',
32 '.': '=1',
33 - ':': '=2'
33 + ':': '=2',
34 };
35
36 var userProvidedKeyEscapeRegex = /[=.:]/g;
test/lib/reportTestResults.browser.js
+1 -1
@@ -4,7 +4,7 @@ if (typeof console === 'undefined') {
4 console = {
5 log: function() {},
6 warn: function() {},
7 - error: function() {}
7 + error: function() {},
8 };
9 }
10
vendor/browser-transforms.js
+4 -4
@@ -234,7 +234,7 @@ function loadScripts(scripts) {
234
235 var options = {
236 sourceMapInline: true,
237 - sourceFilename: sourceFilename
237 + sourceFilename: sourceFilename,
238 };
239 if (/;harmony=true(;|$)/.test(script.type)) {
240 options.harmony = true;
@@ -254,7 +254,7 @@ function loadScripts(scripts) {
254 content: null,
255 loaded: false,
256 url: script.src,
257 - options: options
257 + options: options,
258 };
259
260 load(script.src, function(content) {
@@ -273,7 +273,7 @@ function loadScripts(scripts) {
273 content: script.innerHTML,
274 loaded: true,
275 url: null,
276 - options: options
276 + options: options,
277 };
278 }
279 });
@@ -325,5 +325,5 @@ if (typeof window !== 'undefined' && window !== null) {
325
326 module.exports = {
327 transform: transformReact,
328 - exec: exec
328 + exec: exec,
329 };
vendor/constants.js
+7 -7
@@ -32,7 +32,7 @@ module.exports = function(babel) {
32 if (this.isIdentifier({name: '__DEV__'})) {
33 return DEV_EXPRESSION;
34 }
35 - }
35 + },
36 },
37 CallExpression: {
38 exit: function(node, parent) {
@@ -69,7 +69,7 @@ module.exports = function(babel) {
69 node.callee,
70 [t.literal(false)].concat(node.arguments.slice(1))
71 )
72 - )
72 + ),
73 ]),
74 t.blockStatement([
75 t.expressionStatement(
@@ -77,9 +77,9 @@ module.exports = function(babel) {
77 node.callee,
78 [t.literal(false)]
79 )
80 - )
80 + ),
81 ])
82 - )
82 + ),
83 ])
84 );
85 } else if (this.get('callee').isIdentifier({name: 'warning'})) {
@@ -102,11 +102,11 @@ module.exports = function(babel) {
102 t.blockStatement([
103 t.expressionStatement(
104 node
105 - )
105 + ),
106 ])
107 );
108 }
109 - }
110 - }
109 + },
110 + },
111 });
112 };