diff --git a/.eslintrc b/.eslintrc
index 38a0fdb61ab52..db0ca486a5cd3 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -30,9 +30,7 @@ rules:
brace-style: 2
space-after-keywords: 2
strict: 2
- # We actually have a transform to support this and we fix this for bundled
- # releases but not for the npm package, so enforce it strictly
- comma-dangle: [2, never]
+ comma-dangle: [2, always-multiline]
# Make this a warning for now. We do this in a few places so we might need to
# disable
no-unused-expressions: 2
diff --git a/Gruntfile.js b/Gruntfile.js
index 14267aad1797f..11f21ee714e7b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -29,11 +29,11 @@ module.exports = function(grunt) {
'./*.gem',
'./docs/_site',
'./examples/shared/*.js',
- '.module-cache'
+ '.module-cache',
],
jshint: require('./grunt/config/jshint'),
/*eslint-disable camelcase */
- compare_size: require('./grunt/config/compare_size')
+ compare_size: require('./grunt/config/compare_size'),
/*eslint-enable camelcase */
});
@@ -91,44 +91,44 @@ module.exports = function(grunt) {
grunt.registerTask('build:basic', [
'jsx:normal',
'version-check',
- 'browserify:basic'
+ 'browserify:basic',
]);
grunt.registerTask('build:addons', [
'jsx:normal',
- 'browserify:addons'
+ 'browserify:addons',
]);
grunt.registerTask('build:transformer', [
'jsx:normal',
- 'browserify:transformer'
+ 'browserify:transformer',
]);
grunt.registerTask('build:min', [
'jsx:normal',
'version-check',
- 'browserify:min'
+ 'browserify:min',
]);
grunt.registerTask('build:addons-min', [
'jsx:normal',
- 'browserify:addonsMin'
+ 'browserify:addonsMin',
]);
grunt.registerTask('build:withCodeCoverageLogging', [
'jsx:normal',
'version-check',
- 'browserify:withCodeCoverageLogging'
+ 'browserify:withCodeCoverageLogging',
]);
grunt.registerTask('build:test', [
'delete-build-modules',
'jsx:test',
'version-check',
- 'populist:test'
+ 'populist:test',
]);
grunt.registerTask('build:npm-react', [
'version-check',
'jsx:normal',
- 'npm-react:release'
+ 'npm-react:release',
]);
grunt.registerTask('build:gem-react-source', [
'build',
- 'gem-react-source:release'
+ 'gem-react-source:release',
]);
grunt.registerTask('webdriver-phantomjs', webdriverPhantomJSTask);
@@ -138,7 +138,7 @@ module.exports = function(grunt) {
grunt.registerTask('test:webdriver:phantomjs', [
'connect',
'webdriver-phantomjs',
- 'webdriver-jasmine:local'
+ 'webdriver-jasmine:local',
]);
grunt.registerTask('test:full', [
@@ -152,7 +152,7 @@ module.exports = function(grunt) {
'sauce-tunnel',
'webdriver-jasmine:saucelabs_android',
'webdriver-jasmine:saucelabs_firefox',
- 'webdriver-jasmine:saucelabs_chrome'
+ 'webdriver-jasmine:saucelabs_chrome',
]);
grunt.registerTask('test:webdriver:saucelabs', [
@@ -161,7 +161,7 @@ module.exports = function(grunt) {
'connect',
'sauce-tunnel',
- 'webdriver-jasmine:saucelabs_' + (process.env.BROWSER_NAME || 'ie8')
+ 'webdriver-jasmine:saucelabs_' + (process.env.BROWSER_NAME || 'ie8'),
]);
grunt.registerTask('test:webdriver:saucelabs:modern', [
@@ -173,7 +173,7 @@ module.exports = function(grunt) {
'webdriver-jasmine:saucelabs_android',
'webdriver-jasmine:saucelabs_firefox',
'webdriver-jasmine:saucelabs_chrome',
- 'webdriver-jasmine:saucelabs_ie11'
+ 'webdriver-jasmine:saucelabs_ie11',
]);
grunt.registerTask('test:webdriver:saucelabs:ie', [
@@ -185,7 +185,7 @@ module.exports = function(grunt) {
'webdriver-jasmine:saucelabs_ie8',
'webdriver-jasmine:saucelabs_ie9',
'webdriver-jasmine:saucelabs_ie10',
- 'webdriver-jasmine:saucelabs_ie11'
+ 'webdriver-jasmine:saucelabs_ie11',
]);
grunt.registerTask('test:webdriver:saucelabs:ios', [
@@ -196,13 +196,13 @@ module.exports = function(grunt) {
'sauce-tunnel',
'webdriver-jasmine:saucelabs_ios6_1',
'webdriver-jasmine:saucelabs_ios5_1',
- 'webdriver-jasmine:saucelabs_ios4'
+ 'webdriver-jasmine:saucelabs_ios4',
]);
grunt.registerTask('test:coverage', [
'build:withCodeCoverageLogging',
'test:webdriver:phantomjs',
- 'coverage:parse'
+ 'coverage:parse',
]);
grunt.registerTask('fasttest', function() {
grunt.task.run('test');
@@ -231,7 +231,7 @@ module.exports = function(grunt) {
'npm-react:pack',
'npm-react-tools:release',
'npm-react-tools:pack',
- 'compare_size'
+ 'compare_size',
]);
// Automate the release!
@@ -251,7 +251,7 @@ module.exports = function(grunt) {
'release:starter',
'compress',
'release:docs',
- 'release:msg'
+ 'release:msg',
]);
// The default task - build - to keep setup easy.
diff --git a/grunt/config/browserify.js b/grunt/config/browserify.js
index d3e729494a7c6..ad54483a3f38c 100644
--- a/grunt/config/browserify.js
+++ b/grunt/config/browserify.js
@@ -51,19 +51,19 @@ function simpleBannerify(src) {
// Our basic config which we'll add to to make our other builds
var basic = {
entries: [
- './build/modules/React.js'
+ './build/modules/React.js',
],
outfile: './build/react.js',
debug: false,
standalone: 'React',
transforms: [envify({NODE_ENV: 'development'})],
plugins: [collapser],
- after: [derequire, simpleBannerify]
+ after: [derequire, simpleBannerify],
};
var min = {
entries: [
- './build/modules/React.js'
+ './build/modules/React.js',
],
outfile: './build/react.min.js',
debug: false,
@@ -73,12 +73,12 @@ var min = {
// No need to derequire because the minifier will mangle
// the "require" calls.
- after: [/*derequire,*/ minify, bannerify]
+ after: [/*derequire,*/ minify, bannerify],
};
var transformer = {
entries:[
- './vendor/browser-transforms.js'
+ './vendor/browser-transforms.js',
],
outfile: './build/JSXTransformer.js',
debug: false,
@@ -89,12 +89,12 @@ var transformer = {
// collapser passes a number; this would throw.
// plugins: [collapser],
- after: [derequire, simpleBannerify]
+ after: [derequire, simpleBannerify],
};
var addons = {
entries: [
- './build/modules/ReactWithAddons.js'
+ './build/modules/ReactWithAddons.js',
],
outfile: './build/react-with-addons.js',
debug: false,
@@ -102,12 +102,12 @@ var addons = {
packageName: 'React (with addons)',
transforms: [envify({NODE_ENV: 'development'})],
plugins: [collapser],
- after: [derequire, simpleBannerify]
+ after: [derequire, simpleBannerify],
};
var addonsMin = {
entries: [
- './build/modules/ReactWithAddons.js'
+ './build/modules/ReactWithAddons.js',
],
outfile: './build/react-with-addons.min.js',
debug: false,
@@ -118,21 +118,21 @@ var addonsMin = {
// No need to derequire because the minifier will mangle
// the "require" calls.
- after: [/*derequire,*/ minify, bannerify]
+ after: [/*derequire,*/ minify, bannerify],
};
var withCodeCoverageLogging = {
entries: [
- './build/modules/React.js'
+ './build/modules/React.js',
],
outfile: './build/react.js',
debug: true,
standalone: 'React',
transforms: [
envify({NODE_ENV: 'development'}),
- require('coverify')
+ require('coverify'),
],
- plugins: [collapser]
+ plugins: [collapser],
};
module.exports = {
@@ -141,5 +141,5 @@ module.exports = {
transformer: transformer,
addons: addons,
addonsMin: addonsMin,
- withCodeCoverageLogging: withCodeCoverageLogging
+ withCodeCoverageLogging: withCodeCoverageLogging,
};
diff --git a/grunt/config/compare_size.js b/grunt/config/compare_size.js
index e9df497d5220a..35c58ed4e0c63 100644
--- a/grunt/config/compare_size.js
+++ b/grunt/config/compare_size.js
@@ -4,14 +4,14 @@ var gzip = require('gzip-js');
module.exports = {
files: [
- 'build/*.js'
+ 'build/*.js',
],
options: {
compress: {
gz: function(contents) {
return gzip.zip(contents, {}).length;
- }
+ },
},
- cache: '.grunt/sizecache.json'
- }
+ cache: '.grunt/sizecache.json',
+ },
};
diff --git a/grunt/config/compress.js b/grunt/config/compress.js
index 52ebd53f86472..f2254437760b4 100644
--- a/grunt/config/compress.js
+++ b/grunt/config/compress.js
@@ -7,10 +7,10 @@ var version = grunt.config.data.pkg.version;
module.exports = {
starter: {
options: {
- archive: './build/react-' + version + '.zip'
+ archive: './build/react-' + version + '.zip',
},
files: [
- {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'}
- ]
- }
+ {cwd: './build/starter', src: ['**'], dest: 'react-' + version + '/'},
+ ],
+ },
};
diff --git a/grunt/config/jshint.js b/grunt/config/jshint.js
index 4277a594186ae..264670d4f4a7b 100644
--- a/grunt/config/jshint.js
+++ b/grunt/config/jshint.js
@@ -3,7 +3,7 @@
module.exports = {
src: {
options: {
- jshintrc: './src/.jshintrc'
+ jshintrc: './src/.jshintrc',
},
files: {
// We don't care about src/vendor (we shouldn't be touching this), and
@@ -12,16 +12,16 @@ module.exports = {
'./src/**/*.js',
'!./src/vendor/**',
'!./src/**/__tests__/**',
- '!./src/test/**'
- ]
- }
+ '!./src/test/**',
+ ],
+ },
},
project: {
options: {
- jshintrc: './.jshintrc'
+ jshintrc: './.jshintrc',
},
files: {
- src: ['./Gruntfile.js', './grunt/**/*.js', './bin/*.js', './vendor/*.js']
- }
- }
+ src: ['./Gruntfile.js', './grunt/**/*.js', './bin/*.js', './vendor/*.js'],
+ },
+ },
};
diff --git a/grunt/config/jsx.js b/grunt/config/jsx.js
index 520a9418917ef..9b91f75339c37 100644
--- a/grunt/config/jsx.js
+++ b/grunt/config/jsx.js
@@ -5,37 +5,37 @@ var grunt = require('grunt');
var rootIDs = [
'React',
- 'ReactWithAddons'
+ 'ReactWithAddons',
];
var normal = {
rootIDs: rootIDs,
getConfig: function() {
return {
- commonerConfig: grunt.config.data.pkg.commonerConfig
+ commonerConfig: grunt.config.data.pkg.commonerConfig,
};
},
sourceDir: 'src',
- outputDir: 'build/modules'
+ outputDir: 'build/modules',
};
var test = {
rootIDs: rootIDs.concat([
'test/all.js',
- '**/__tests__/*.js'
+ '**/__tests__/*.js',
]),
getConfig: function() {
return assign({}, normal.getConfig(), {
- mocking: true
+ mocking: true,
});
},
sourceDir: 'src',
- outputDir: 'build/modules'
+ outputDir: 'build/modules',
};
module.exports = {
normal: normal,
- test: test
+ test: test,
};
diff --git a/grunt/config/populist.js b/grunt/config/populist.js
index d2f19e7d47130..daa63377fe76e 100644
--- a/grunt/config/populist.js
+++ b/grunt/config/populist.js
@@ -7,7 +7,7 @@ module.exports = function(grunt) {
// (build/jasmine/jasmine.js) as global.jasmine, and to require the
// 'all' module (build/jasmine/all.js) but not expose it globally.
args: ['jasmine:jasmine', 'all:'],
- outfile: './build/jasmine.js'
+ outfile: './build/jasmine.js',
};
var filterExpr = grunt.option('filter');
@@ -22,11 +22,11 @@ module.exports = function(grunt) {
rootDirectory: 'build/modules',
args: ['test/all:harness'],
requires: [filterExpr],
- outfile: './build/react-test.js'
+ outfile: './build/react-test.js',
};
return {
jasmine: jasmine,
- test: test
+ test: test,
};
};
diff --git a/grunt/config/server.js b/grunt/config/server.js
index 8fa66599e39c6..b5c86e5908baa 100644
--- a/grunt/config/server.js
+++ b/grunt/config/server.js
@@ -103,10 +103,10 @@ module.exports = function(grunt) {
connect.logger({format:'[:user-agent][:timestamp] :method :url', stream:grunt.verbose}),
connect.static(options.base),
- connect.directory(options.base)
+ connect.directory(options.base),
];
- }
- }
- }
+ },
+ },
+ },
};
};
diff --git a/grunt/config/webdriver-all.js b/grunt/config/webdriver-all.js
index 31434c1490950..37017978c82ac 100644
--- a/grunt/config/webdriver-all.js
+++ b/grunt/config/webdriver-all.js
@@ -23,13 +23,13 @@ module.exports = function(props) {
exports.local = {
webdriver: {
- remote: {protocol: 'http:', hostname: '127.0.0.1', port: 9515, path: '/'}
+ remote: {protocol: 'http:', hostname: '127.0.0.1', port: 9515, path: '/'},
},
url: props.url,
onStart: props.onStart,
onComplete: props.onComplete,
onError: props.onError,
- isDoneTimeout: props.isDoneTimeout
+ isDoneTimeout: props.isDoneTimeout,
};
if (grunt.option('debug')) {
@@ -45,13 +45,13 @@ module.exports = function(props) {
protocol: 'http:',
hostname: 'ondemand.saucelabs.com',
port: '80',
- path: '/wd/hub'
- }
+ path: '/wd/hub',
+ },
},
desiredCapabilities: {
'build': process.env.TRAVIS_BUILD_NUMBER || 'dev' + Date.now(),
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER || 'my awesome tunnel',
- 'browserName': 'chrome'
+ 'browserName': 'chrome',
},
url: exports.local.url,
onStart: function(browser) {
@@ -62,7 +62,7 @@ module.exports = function(props) {
},
onComplete: exports.local.onComplete,
onError: exports.local.onError,
- isDoneTimeout: exports.local.isDoneTimeout
+ isDoneTimeout: exports.local.isDoneTimeout,
};
/*eslint-disable camelcase*/
@@ -107,7 +107,7 @@ module.exports = function(props) {
onComplete: exports.saucelabs.onComplete,
onError: exports.saucelabs.onError,
isDoneTimeout: exports.saucelabs.isDoneTimeout,
- desiredCapabilities: desiredCapabilities
+ desiredCapabilities: desiredCapabilities,
};
}
diff --git a/grunt/config/webdriver-jasmine.js b/grunt/config/webdriver-jasmine.js
index b81c50dcb3bc4..ce5955002e144 100644
--- a/grunt/config/webdriver-jasmine.js
+++ b/grunt/config/webdriver-jasmine.js
@@ -11,5 +11,5 @@ module.exports = require('./webdriver-all')({
},
onError: function(error) {
grunt.fatal(error);
- }
+ },
});
diff --git a/grunt/tasks/browserify.js b/grunt/tasks/browserify.js
index 060fe8f2437db..8102791d7d057 100644
--- a/grunt/tasks/browserify.js
+++ b/grunt/tasks/browserify.js
@@ -23,7 +23,7 @@ module.exports = function() {
var options = {
entries: entries,
debug: config.debug, // sourcemaps
- standalone: config.standalone // global
+ standalone: config.standalone, // global
};
var bundle = browserify(options);
diff --git a/grunt/tasks/eslint.js b/grunt/tasks/eslint.js
index 861962a90116c..c11487ec41f3f 100644
--- a/grunt/tasks/eslint.js
+++ b/grunt/tasks/eslint.js
@@ -7,7 +7,7 @@ module.exports = function() {
grunt.util.spawn({
cmd: 'node_modules/.bin/eslint',
args: ['.'],
- opts: {stdio: 'inherit'} // allows colors to passthrough
+ opts: {stdio: 'inherit'}, // allows colors to passthrough
}, function(err, result, code) {
if (err) {
grunt.log.error('Lint failed');
diff --git a/grunt/tasks/gem-react-source.js b/grunt/tasks/gem-react-source.js
index 2c6e40d4e14f3..7d9ae86207ebf 100644
--- a/grunt/tasks/gem-react-source.js
+++ b/grunt/tasks/gem-react-source.js
@@ -8,7 +8,7 @@ var dest = 'build/gem-react-source/';
var build = dest + 'build/';
var buildFiles = [
'react.js', 'react.min.js', 'JSXTransformer.js',
- 'react-with-addons.js', 'react-with-addons.min.js'
+ 'react-with-addons.js', 'react-with-addons.min.js',
];
function buildRelease() {
@@ -43,8 +43,8 @@ function packRelease() {
cmd: 'gem',
args: ['build', 'react-source.gemspec'],
opts: {
- cwd: dest
- }
+ cwd: dest,
+ },
};
grunt.util.spawn(spawnCmd, function(err, result) {
if (err) {
@@ -61,5 +61,5 @@ function packRelease() {
module.exports = {
buildRelease: buildRelease,
- packRelease: packRelease
+ packRelease: packRelease,
};
diff --git a/grunt/tasks/jsx.js b/grunt/tasks/jsx.js
index 045081409c4f6..3132114db3ec1 100644
--- a/grunt/tasks/jsx.js
+++ b/grunt/tasks/jsx.js
@@ -15,12 +15,12 @@ module.exports = function() {
'--follow-requires',
'--use-provides-module',
config.sourceDir,
- config.outputDir
+ config.outputDir,
];
var rootIDs = expand({
nonull: true, // Keep IDs that don't expand to anything.
- cwd: 'src'
+ cwd: 'src',
}, config.rootIDs).map(function(id) {
return id.replace(/\.js$/i, '');
});
@@ -30,7 +30,7 @@ module.exports = function() {
var child = spawn({
cmd: 'node',
- args: [path.join('bin', 'jsx-internal')].concat(args)
+ args: [path.join('bin', 'jsx-internal')].concat(args),
}, function(error, result, code) {
if (error) {
grunt.log.error(error);
diff --git a/grunt/tasks/npm-react-tools.js b/grunt/tasks/npm-react-tools.js
index 8b4e73d163d64..e68ecf8cfe246 100644
--- a/grunt/tasks/npm-react-tools.js
+++ b/grunt/tasks/npm-react-tools.js
@@ -45,8 +45,8 @@ function packRelease() {
cmd: 'npm',
args: ['pack', 'npm-react-tools'],
opts: {
- cwd: 'build/'
- }
+ cwd: 'build/',
+ },
};
grunt.util.spawn(spawnCmd, function() {
var buildSrc = 'build/react-tools-' + grunt.config.data.pkg.version + '.tgz';
@@ -57,5 +57,5 @@ function packRelease() {
module.exports = {
buildRelease: buildRelease,
- packRelease: packRelease
+ packRelease: packRelease,
};
diff --git a/grunt/tasks/npm-react.js b/grunt/tasks/npm-react.js
index 2743f0c041d48..f40c93b6fa6ef 100644
--- a/grunt/tasks/npm-react.js
+++ b/grunt/tasks/npm-react.js
@@ -10,7 +10,7 @@ var lib = dest + 'lib/';
var dist = dest + 'dist/';
var distFiles = [
'react.js', 'react.min.js', 'JSXTransformer.js',
- 'react-with-addons.js', 'react-with-addons.min.js'
+ 'react-with-addons.js', 'react-with-addons.min.js',
];
function buildRelease() {
@@ -56,8 +56,8 @@ function packRelease() {
cmd: 'npm',
args: ['pack', 'npm-react'],
opts: {
- cwd: 'build/'
- }
+ cwd: 'build/',
+ },
};
grunt.util.spawn(spawnCmd, function() {
var buildSrc = 'build/react-' + grunt.config.data.pkg.version + '.tgz';
@@ -68,5 +68,5 @@ function packRelease() {
module.exports = {
buildRelease: buildRelease,
- packRelease: packRelease
+ packRelease: packRelease,
};
diff --git a/grunt/tasks/npm.js b/grunt/tasks/npm.js
index af7b4070fda0d..a2a676206dc4d 100644
--- a/grunt/tasks/npm.js
+++ b/grunt/tasks/npm.js
@@ -26,7 +26,7 @@ module.exports = function() {
spawn({
cmd: cmd,
args: args,
- opts: opts
+ opts: opts,
}, function(error, result, code) {
if (error) {
grunt.log.error(error);
@@ -58,7 +58,7 @@ module.exports = function() {
run('npm', [
'install',
'--production',
- tgz
+ tgz,
], {cwd: dir}, function() {
var nodePath = path.join(dir, 'node_modules');
var pkgDir = path.join(nodePath, pkg.name);
@@ -66,7 +66,7 @@ module.exports = function() {
// Make sure that bin/jsx is runnable by echoing main.js.
run('bin/jsx', ['main.js'], {
- cwd: pkgDir
+ cwd: pkgDir,
}, function(result) {
assert.ok(result.stdout.indexOf('transform') >= 0, result.stdout);
@@ -81,9 +81,9 @@ module.exports = function() {
'require(\'react-tools\').transform(' +
JSON.stringify(
'/** @jsx React.DOM */
oyez
;'
- ) + ')'
+ ) + ')',
], {
- env: {NODE_PATH: nodePath}
+ env: {NODE_PATH: nodePath},
}, function(result, code) {
assert.ok(result.stdout.indexOf(
'React.DOM.div(null, \'oyez\');'
diff --git a/grunt/tasks/populist.js b/grunt/tasks/populist.js
index 96c872b0494e9..af80b6cd6bd3b 100644
--- a/grunt/tasks/populist.js
+++ b/grunt/tasks/populist.js
@@ -22,7 +22,7 @@ module.exports = function() {
var requires = config.requires || [];
grunt.file.expand({
nonull: true, // Keep IDs that don't expand to anything.
- cwd: config.rootDirectory
+ cwd: config.rootDirectory,
}, requires).forEach(function(name) {
name = name.replace(/\.js$/i, '');
args.push(name);
@@ -31,7 +31,7 @@ module.exports = function() {
require('populist').buildP({
rootDirectory: config.rootDirectory,
- args: args
+ args: args,
}).then(function(output) {
grunt.file.write(config.outfile, 'process = {env: {}};' + output);
theFilesToTestScript.end();
diff --git a/grunt/tasks/release.js b/grunt/tasks/release.js
index 97619cfc95f07..be22f90c1d651 100644
--- a/grunt/tasks/release.js
+++ b/grunt/tasks/release.js
@@ -6,7 +6,7 @@ var BOWER_PATH = '../react-bower/';
var BOWER_GLOB = [BOWER_PATH + '*.{js}'];
var BOWER_FILES = [
'react.js', 'react.min.js', 'JSXTransformer.js',
- 'react-with-addons.js', 'react-with-addons.min.js'
+ 'react-with-addons.js', 'react-with-addons.min.js',
];
var GH_PAGES_PATH = '../react-gh-pages/';
var GH_PAGES_GLOB = [GH_PAGES_PATH + '*'];
@@ -34,22 +34,22 @@ function _gitCommitAndTag(cwd, commitMsg, tag, cb) {
var gitAddAll = {
cmd: 'git',
args: ['add', '*'],
- opts: opts
+ opts: opts,
};
var gitAddDel = {
cmd: 'git',
args: ['add', '-u'],
- opts: opts
+ opts: opts,
};
var gitCommit = {
cmd: 'git',
args: ['commit', '-m', commitMsg],
- opts: opts
+ opts: opts,
};
var gitTag = {
cmd: 'git',
args: ['tag', tag],
- opts: opts
+ opts: opts,
};
grunt.util.spawn(gitAddAll, function() {
grunt.util.spawn(gitAddDel, function() {
@@ -116,7 +116,7 @@ function docs() {
var rakeOpts = {
cmd: 'rake',
args: ['release'],
- opts: {cwd: 'docs'}
+ opts: {cwd: 'docs'},
};
grunt.util.spawn(rakeOpts, function() {
// Commit the repo. We don't really care about tagging this.
@@ -133,7 +133,7 @@ function msg() {
'* push changes to git repositories',
'* publish npm module (`npm publish .`)',
'* publish gem (`gem push react-source-' + VERSION + '.gem`)',
- '* announce it on FB/Twitter/mailing list'
+ '* announce it on FB/Twitter/mailing list',
].forEach(function(ln) {
grunt.log.writeln(ln);
});
@@ -170,5 +170,5 @@ module.exports = {
bower: bower,
docs: docs,
msg: msg,
- starter: starter
+ starter: starter,
};
diff --git a/jest/preprocessor.js b/jest/preprocessor.js
index 484cd5c86ad13..f4b087ef6435f 100644
--- a/jest/preprocessor.js
+++ b/jest/preprocessor.js
@@ -7,7 +7,7 @@ var tsPreprocessor = require('./ts-preprocessor');
var defaultLibraries = [
require.resolve('./jest.d.ts'),
- require.resolve('../src/isomorphic/modern/class/React.d.ts')
+ require.resolve('../src/isomorphic/modern/class/React.d.ts'),
];
var ts = tsPreprocessor(defaultLibraries);
@@ -24,9 +24,9 @@ module.exports = {
return babel.transform(src, {
blacklist: ['spec.functionName', 'validation.react'],
filename: path,
- retainLines: true
+ retainLines: true,
}).code;
}
return src;
- }
+ },
};
diff --git a/jest/ts-preprocessor.js b/jest/ts-preprocessor.js
index 3dd84c31b733f..cef61922d8159 100644
--- a/jest/ts-preprocessor.js
+++ b/jest/ts-preprocessor.js
@@ -39,7 +39,7 @@ function compile(defaultLib, content, contentFilename) {
},
getNewLine: function() {
return '\n';
- }
+ },
};
var program = ts.createProgram([contentFilename], tsOptions, compilerHost);
var errors = program.getDiagnostics();
@@ -68,6 +68,6 @@ module.exports = function(defaultLibs) {
);
return {
- compile: compile.bind(null, defaultLibSourceFile)
+ compile: compile.bind(null, defaultLibSourceFile),
};
};
diff --git a/main.js b/main.js
index cd0c4270f74d0..0dc6d5e688265 100644
--- a/main.js
+++ b/main.js
@@ -24,7 +24,7 @@ function transformWithDetails(code, opts) {
sourceFilename: opts.sourceFilename,
es6module: opts.es6module,
nonStrictEs6module: opts.nonStrictEs6module,
- target: opts.target
+ target: opts.target,
};
return jstransform.transform(code, options);
@@ -34,5 +34,5 @@ module.exports = {
transform: function(input, options) {
return transformWithDetails(input, options).code;
},
- transformWithDetails: transformWithDetails
+ transformWithDetails: transformWithDetails,
};
diff --git a/npm-jsx_orphaned_brackets_transformer/run.js b/npm-jsx_orphaned_brackets_transformer/run.js
index 7cf3c9aba9292..7ce8a4a94bbf9 100644
--- a/npm-jsx_orphaned_brackets_transformer/run.js
+++ b/npm-jsx_orphaned_brackets_transformer/run.js
@@ -24,7 +24,7 @@ _visitFbt.test = function(node, path, state) {
var VISITORS_LIST = [
_visitFbt,
- visitReactTag
+ visitReactTag,
];
function _transformSource(source) {
@@ -36,7 +36,7 @@ function transformDir(dirPath, exclude) {
rootFolder: dirPath,
filterFunction: function(path, stat) {
return /\.jsx?$/.test(path) && (!exclude || !exclude.test(path));
- }
+ },
});
var numTransforms = 0;
diff --git a/npm-react-codemod/transforms/class.js b/npm-react-codemod/transforms/class.js
index 1a0d291c4c9f8..6b44fa062c83b 100644
--- a/npm-react-codemod/transforms/class.js
+++ b/npm-react-codemod/transforms/class.js
@@ -8,8 +8,6 @@
*
*/
-/*eslint-disable comma-dangle*/
-
'use strict';
function updateReactCreateClassToES6(file, api, options) {
@@ -256,12 +254,14 @@ function updateReactCreateClassToES6(file, api, options) {
const createSuperCall = shouldAddSuperCall =>
!shouldAddSuperCall ?
[] :
- [j.expressionStatement(
- j.callExpression(
- j.identifier('super'),
- [j.identifier('props'), j.identifier('context')]
- )
- )];
+ [
+ j.expressionStatement(
+ j.callExpression(
+ j.identifier('super'),
+ [j.identifier('props'), j.identifier('context')]
+ )
+ ),
+ ];
const updatePropsAccess = getInitialState =>
getInitialState ?
@@ -323,20 +323,22 @@ function updateReactCreateClassToES6(file, api, options) {
}
const hasPropsAccess = updatePropsAccess(getInitialState);
- return [createMethodDefinition({
- key: j.identifier('constructor'),
- value: j.functionExpression(
- null,
- createConstructorArgs(shouldAddSuperClass, hasPropsAccess),
- j.blockStatement(
- [].concat(
- createSuperCall(shouldAddSuperClass),
- autobindFunctions.map(createBindAssignment),
- inlineGetInitialState(getInitialState)
+ return [
+ createMethodDefinition({
+ key: j.identifier('constructor'),
+ value: j.functionExpression(
+ null,
+ createConstructorArgs(shouldAddSuperClass, hasPropsAccess),
+ j.blockStatement(
+ [].concat(
+ createSuperCall(shouldAddSuperClass),
+ autobindFunctions.map(createBindAssignment),
+ inlineGetInitialState(getInitialState)
+ )
)
- )
- ),
- })];
+ ),
+ }),
+ ];
};
const createES6Class = (
diff --git a/npm-react-codemod/transforms/findDOMNode.js b/npm-react-codemod/transforms/findDOMNode.js
index c59334fba0d51..b230845d6836a 100644
--- a/npm-react-codemod/transforms/findDOMNode.js
+++ b/npm-react-codemod/transforms/findDOMNode.js
@@ -8,8 +8,6 @@
*
*/
-/*eslint-disable comma-dangle*/
-
'use strict';
function getDOMNodeToFindDOMNode(file, api, options) {
diff --git a/npm-react-codemod/transforms/pure-render-mixin.js b/npm-react-codemod/transforms/pure-render-mixin.js
index fc30ad4ebd32c..eee03670339aa 100644
--- a/npm-react-codemod/transforms/pure-render-mixin.js
+++ b/npm-react-codemod/transforms/pure-render-mixin.js
@@ -8,8 +8,6 @@
*
*/
-/*eslint-disable comma-dangle*/
-
'use strict';
function removePureRenderMixin(file, api, options) {
@@ -47,10 +45,10 @@ function removePureRenderMixin(file, api, options) {
[
j.thisExpression(),
j.identifier(NEXT_PROPS),
- j.identifier(NEXT_STATE)
+ j.identifier(NEXT_STATE),
]
)
- )
+ ),
])
);
diff --git a/npm-react-codemod/transforms/utils/ReactUtils.js b/npm-react-codemod/transforms/utils/ReactUtils.js
index 64dbedc06acda..b18dccc0ee0e2 100644
--- a/npm-react-codemod/transforms/utils/ReactUtils.js
+++ b/npm-react-codemod/transforms/utils/ReactUtils.js
@@ -8,8 +8,6 @@
*
*/
-/*eslint-disable comma-dangle*/
-
'use strict';
module.exports = function(j) {
diff --git a/src/addons/ReactComponentWithPureRenderMixin.js b/src/addons/ReactComponentWithPureRenderMixin.js
index 05265e17c160a..432b3d306565d 100644
--- a/src/addons/ReactComponentWithPureRenderMixin.js
+++ b/src/addons/ReactComponentWithPureRenderMixin.js
@@ -40,7 +40,7 @@ var shallowCompare = require('shallowCompare');
var ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
- }
+ },
};
module.exports = ReactComponentWithPureRenderMixin;
diff --git a/src/addons/ReactFragment.js b/src/addons/ReactFragment.js
index 40e3dc1789e72..ffdb4e17c6a21 100644
--- a/src/addons/ReactFragment.js
+++ b/src/addons/ReactFragment.js
@@ -77,7 +77,7 @@ if (__DEV__) {
);
this[didWarnKey] = true;
this[fragmentKey][key] = value;
- }
+ },
});
};
@@ -121,12 +121,12 @@ var ReactFragment = {
var proxy = {};
Object.defineProperty(proxy, fragmentKey, {
enumerable: false,
- value: object
+ value: object,
});
Object.defineProperty(proxy, didWarnKey, {
writable: true,
enumerable: false,
- value: false
+ value: false,
});
for (var key in object) {
proxyPropertyAccessWithWarning(proxy, key);
@@ -180,7 +180,7 @@ var ReactFragment = {
}
}
return fragment;
- }
+ },
};
module.exports = ReactFragment;
diff --git a/src/addons/ReactWithAddons.js b/src/addons/ReactWithAddons.js
index bcf5f06ceaab2..04f327a14bd56 100644
--- a/src/addons/ReactWithAddons.js
+++ b/src/addons/ReactWithAddons.js
@@ -43,7 +43,7 @@ React.addons = {
createFragment: ReactFragment.create,
renderSubtreeIntoContainer: renderSubtreeIntoContainer,
shallowCompare: shallowCompare,
- update: update
+ update: update,
};
if (__DEV__) {
diff --git a/src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js b/src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
index 4efd273970918..867fec089c23d 100644
--- a/src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
+++ b/src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
@@ -30,7 +30,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
constructor(props, context) {
super(props, context);
this.state = {
- color: 'green'
+ color: 'green',
};
}
@@ -50,27 +50,27 @@ describe('ReactComponentWithPureRenderMixin', function() {
getInitialState: function() {
return {
cut: false,
- slices: 1
+ slices: 1,
};
},
cut: function() {
this.setState({
cut: true,
- slices: 10
+ slices: 10,
});
},
eatSlice: function() {
this.setState({
- slices: this.state.slices - 1
+ slices: this.state.slices - 1,
});
},
render: function() {
renderCalls++;
return ;
- }
+ },
});
var instance = ReactTestUtils.renderIntoDocument();
@@ -101,7 +101,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
function getInitialState() {
return {
foo: [1, 2, 3],
- bar: {a: 4, b: 5, c: 6}
+ bar: {a: 4, b: 5, c: 6},
};
}
@@ -118,7 +118,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
render: function() {
renderCalls++;
return ;
- }
+ },
});
var instance = ReactTestUtils.renderIntoDocument();
@@ -127,7 +127,7 @@ describe('ReactComponentWithPureRenderMixin', function() {
// Do not re-render if state is equal
var settings = {
foo: initialSettings.foo,
- bar: initialSettings.bar
+ bar: initialSettings.bar,
};
instance.setState(settings);
expect(renderCalls).toBe(1);
diff --git a/src/addons/__tests__/ReactFragment-test.js b/src/addons/__tests__/ReactFragment-test.js
index 14e8557e33263..bb7cb7cc359f6 100644
--- a/src/addons/__tests__/ReactFragment-test.js
+++ b/src/addons/__tests__/ReactFragment-test.js
@@ -25,7 +25,7 @@ describe('ReactFragment', function() {
spyOn(console, 'error');
var children = {
x: ,
- y:
+ y: ,
};
void {children}
;
expect(console.error.calls.length).toBe(1);
@@ -35,7 +35,7 @@ describe('ReactFragment', function() {
// Only warn once for the same set of children
var sameChildren = {
x: ,
- y:
+ y: ,
};
void {sameChildren}
;
expect(console.error.calls.length).toBe(1);
@@ -46,7 +46,7 @@ describe('ReactFragment', function() {
var children = {
x: ,
y: ,
- z:
+ z: ,
};
var element = {[children]}
;
expect(console.error.calls.length).toBe(0);
@@ -62,7 +62,7 @@ describe('ReactFragment', function() {
spyOn(console, 'error');
var children = {
x: ,
- y:
+ y: ,
};
var frag = ReactFragment.create(children);
void frag.x;
diff --git a/src/addons/__tests__/renderSubtreeIntoContainer.js b/src/addons/__tests__/renderSubtreeIntoContainer.js
index ba50112f1c7c3..c66d170152658 100644
--- a/src/addons/__tests__/renderSubtreeIntoContainer.js
+++ b/src/addons/__tests__/renderSubtreeIntoContainer.js
@@ -23,22 +23,22 @@ describe('renderSubtreeIntoContainer', function() {
var Component = React.createClass({
contextTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
render: function() {
return {this.context.foo}
;
- }
+ },
});
var Parent = React.createClass({
childContextTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
getChildContext: function() {
return {
- foo: 'bar'
+ foo: 'bar',
};
},
@@ -50,7 +50,7 @@ describe('renderSubtreeIntoContainer', function() {
expect(function() {
renderSubtreeIntoContainer(this, , portal);
}.bind(this)).not.toThrow();
- }
+ },
});
ReactTestUtils.renderIntoDocument();
@@ -62,22 +62,22 @@ describe('renderSubtreeIntoContainer', function() {
var Component = React.createClass({
contextTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
render: function() {
return {this.context.foo}
;
- }
+ },
});
var Parent = React.createClass({
childContextTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
getChildContext: function() {
return {
- foo: 'bar'
+ foo: 'bar',
};
},
@@ -90,7 +90,7 @@ describe('renderSubtreeIntoContainer', function() {
renderSubtreeIntoContainer(, , portal);
}).toThrow('Invariant Violation: parentComponent' +
'must be a valid React Component');
- }
+ },
});
});
});
diff --git a/src/addons/__tests__/update-test.js b/src/addons/__tests__/update-test.js
index e6c78094eb9e1..b27196aa65046 100644
--- a/src/addons/__tests__/update-test.js
+++ b/src/addons/__tests__/update-test.js
@@ -82,7 +82,7 @@ describe('update', function() {
it('should support deep updates', function() {
expect(update({a: 'b', c: {d: 'e'}}, {c: {d: {$set: 'f'}}})).toEqual({
a: 'b',
- c: {d: 'f'}
+ c: {d: 'f'},
});
});
@@ -96,7 +96,7 @@ describe('update', function() {
it('should perform safe hasOwnProperty check', function() {
expect(update({}, {'hasOwnProperty': {$set: 'a'}})).toEqual({
- 'hasOwnProperty': 'a'
+ 'hasOwnProperty': 'a',
});
});
});
diff --git a/src/addons/link/LinkedStateMixin.js b/src/addons/link/LinkedStateMixin.js
index e2d7e4d87de36..91ea2cbafcb17 100644
--- a/src/addons/link/LinkedStateMixin.js
+++ b/src/addons/link/LinkedStateMixin.js
@@ -33,7 +33,7 @@ var LinkedStateMixin = {
this.state[key],
ReactStateSetters.createStateKeySetter(this, key)
);
- }
+ },
};
module.exports = LinkedStateMixin;
diff --git a/src/addons/link/ReactLink.js b/src/addons/link/ReactLink.js
index e0cafa053f7d7..3ff06a2b9372a 100644
--- a/src/addons/link/ReactLink.js
+++ b/src/addons/link/ReactLink.js
@@ -59,13 +59,13 @@ function createLinkTypeChecker(linkType) {
value: typeof linkType === 'undefined' ?
React.PropTypes.any.isRequired :
linkType.isRequired,
- requestChange: React.PropTypes.func.isRequired
+ requestChange: React.PropTypes.func.isRequired,
};
return React.PropTypes.shape(shapes);
}
ReactLink.PropTypes = {
- link: createLinkTypeChecker
+ link: createLinkTypeChecker,
};
module.exports = ReactLink;
diff --git a/src/addons/link/__tests__/LinkedStateMixin-test.js b/src/addons/link/__tests__/LinkedStateMixin-test.js
index 8e0ffc1d24eef..99a956a14197d 100644
--- a/src/addons/link/__tests__/LinkedStateMixin-test.js
+++ b/src/addons/link/__tests__/LinkedStateMixin-test.js
@@ -34,7 +34,7 @@ describe('LinkedStateMixin', function() {
render: function() {
return value is {this.state.value};
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
var link = component.linkState('value');
diff --git a/src/addons/link/__tests__/ReactLinkPropTypes-test.js b/src/addons/link/__tests__/ReactLinkPropTypes-test.js
index 8e4e177be8473..dfd7cc523e02b 100644
--- a/src/addons/link/__tests__/ReactLinkPropTypes-test.js
+++ b/src/addons/link/__tests__/ReactLinkPropTypes-test.js
@@ -74,7 +74,7 @@ describe('ReactLink', function() {
);
typeCheckPass(
LinkPropTypes.link(),
- {value: {}, requestChange: emptyFunction
+ {value: {}, requestChange: emptyFunction,
});
});
diff --git a/src/addons/transitions/ReactCSSTransitionGroup.js b/src/addons/transitions/ReactCSSTransitionGroup.js
index 069935843365e..06b578124217c 100644
--- a/src/addons/transitions/ReactCSSTransitionGroup.js
+++ b/src/addons/transitions/ReactCSSTransitionGroup.js
@@ -30,14 +30,14 @@ var ReactCSSTransitionGroup = React.createClass({
transitionName: React.PropTypes.string.isRequired,
transitionAppear: React.PropTypes.bool,
transitionEnter: React.PropTypes.bool,
- transitionLeave: React.PropTypes.bool
+ transitionLeave: React.PropTypes.bool,
},
getDefaultProps: function() {
return {
transitionAppear: false,
transitionEnter: true,
- transitionLeave: true
+ transitionLeave: true,
};
},
@@ -50,7 +50,7 @@ var ReactCSSTransitionGroup = React.createClass({
name: this.props.transitionName,
appear: this.props.transitionAppear,
enter: this.props.transitionEnter,
- leave: this.props.transitionLeave
+ leave: this.props.transitionLeave,
},
child
);
@@ -62,7 +62,7 @@ var ReactCSSTransitionGroup = React.createClass({
assign({}, this.props, {childFactory: this._wrapChild})
)
);
- }
+ },
});
module.exports = ReactCSSTransitionGroup;
diff --git a/src/addons/transitions/ReactCSSTransitionGroupChild.js b/src/addons/transitions/ReactCSSTransitionGroupChild.js
index 179a00029d45c..519e07ad055fc 100644
--- a/src/addons/transitions/ReactCSSTransitionGroupChild.js
+++ b/src/addons/transitions/ReactCSSTransitionGroupChild.js
@@ -138,7 +138,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
render: function() {
return onlyChild(this.props.children);
- }
+ },
});
module.exports = ReactCSSTransitionGroupChild;
diff --git a/src/addons/transitions/ReactTransitionChildMapping.js b/src/addons/transitions/ReactTransitionChildMapping.js
index 1daa1e1666123..7bea6b55a2f51 100644
--- a/src/addons/transitions/ReactTransitionChildMapping.js
+++ b/src/addons/transitions/ReactTransitionChildMapping.js
@@ -97,7 +97,7 @@ var ReactTransitionChildMapping = {
}
return childMapping;
- }
+ },
};
module.exports = ReactTransitionChildMapping;
diff --git a/src/addons/transitions/ReactTransitionEvents.js b/src/addons/transitions/ReactTransitionEvents.js
index 05ee1a508ead1..89d54c17caff6 100644
--- a/src/addons/transitions/ReactTransitionEvents.js
+++ b/src/addons/transitions/ReactTransitionEvents.js
@@ -24,7 +24,7 @@ var EVENT_NAME_MAP = {
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'mozTransitionEnd',
'OTransition': 'oTransitionEnd',
- 'msTransition': 'MSTransitionEnd'
+ 'msTransition': 'MSTransitionEnd',
},
animationend: {
@@ -32,8 +32,8 @@ var EVENT_NAME_MAP = {
'WebkitAnimation': 'webkitAnimationEnd',
'MozAnimation': 'mozAnimationEnd',
'OAnimation': 'oAnimationEnd',
- 'msAnimation': 'MSAnimationEnd'
- }
+ 'msAnimation': 'MSAnimationEnd',
+ },
};
var endEvents = [];
@@ -103,7 +103,7 @@ var ReactTransitionEvents = {
endEvents.forEach(function(endEvent) {
removeEventListener(node, endEvent, eventListener);
});
- }
+ },
};
module.exports = ReactTransitionEvents;
diff --git a/src/addons/transitions/ReactTransitionGroup.js b/src/addons/transitions/ReactTransitionGroup.js
index 48a78157154c4..d3316619f6a12 100644
--- a/src/addons/transitions/ReactTransitionGroup.js
+++ b/src/addons/transitions/ReactTransitionGroup.js
@@ -23,19 +23,19 @@ var ReactTransitionGroup = React.createClass({
propTypes: {
component: React.PropTypes.any,
- childFactory: React.PropTypes.func
+ childFactory: React.PropTypes.func,
},
getDefaultProps: function() {
return {
component: 'span',
- childFactory: emptyFunction.thatReturnsArgument
+ childFactory: emptyFunction.thatReturnsArgument,
};
},
getInitialState: function() {
return {
- children: ReactTransitionChildMapping.getChildMapping(this.props.children)
+ children: ReactTransitionChildMapping.getChildMapping(this.props.children),
};
},
@@ -64,7 +64,7 @@ var ReactTransitionGroup = React.createClass({
children: ReactTransitionChildMapping.mergeChildMappings(
prevChildMapping,
nextChildMapping
- )
+ ),
});
var key;
@@ -224,7 +224,7 @@ var ReactTransitionGroup = React.createClass({
this.props,
childrenToRender
);
- }
+ },
});
module.exports = ReactTransitionGroup;
diff --git a/src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js b/src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
index 01178a62ab527..ed3eee445d7f6 100644
--- a/src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
+++ b/src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
@@ -30,24 +30,24 @@ describe('ReactTransitionChildMapping', function() {
ReactTransitionChildMapping.getChildMapping(component.props.children)
).toEqual({
'.$one': one,
- '.$two': two
+ '.$two': two,
});
});
it('should support mergeChildMappings for adding keys', function() {
var prev = {
one: true,
- two: true
+ two: true,
};
var next = {
one: true,
two: true,
- three: true
+ three: true,
};
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
one: true,
two: true,
- three: true
+ three: true,
});
});
@@ -55,16 +55,16 @@ describe('ReactTransitionChildMapping', function() {
var prev = {
one: true,
two: true,
- three: true
+ three: true,
};
var next = {
one: true,
- two: true
+ two: true,
};
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
one: true,
two: true,
- three: true
+ three: true,
});
});
@@ -72,18 +72,18 @@ describe('ReactTransitionChildMapping', function() {
var prev = {
one: true,
two: true,
- three: true
+ three: true,
};
var next = {
one: true,
two: true,
- four: true
+ four: true,
};
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
one: true,
two: true,
three: true,
- four: true
+ four: true,
});
});
@@ -92,46 +92,46 @@ describe('ReactTransitionChildMapping', function() {
one: true,
two: true,
four: true,
- five: true
+ five: true,
};
var next = {
one: true,
two: true,
three: true,
- five: true
+ five: true,
};
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
one: true,
two: true,
three: true,
four: true,
- five: true
+ five: true,
});
});
it('should support mergeChildMappings with undefined input', function() {
var prev = {
one: true,
- two: true
+ two: true,
};
var next = undefined;
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
one: true,
- two: true
+ two: true,
});
prev = undefined;
next = {
three: true,
- four: true
+ four: true,
};
expect(ReactTransitionChildMapping.mergeChildMappings(prev, next)).toEqual({
three: true,
- four: true
+ four: true,
});
});
});
diff --git a/src/addons/transitions/__tests__/ReactTransitionGroup-test.js b/src/addons/transitions/__tests__/ReactTransitionGroup-test.js
index 27daf3836af3a..ed5cadbb52a1f 100644
--- a/src/addons/transitions/__tests__/ReactTransitionGroup-test.js
+++ b/src/addons/transitions/__tests__/ReactTransitionGroup-test.js
@@ -60,7 +60,7 @@ describe('ReactTransitionGroup', function() {
},
render: function() {
return ;
- }
+ },
});
var Component = React.createClass({
@@ -73,7 +73,7 @@ describe('ReactTransitionGroup', function() {
children.push();
}
return {children};
- }
+ },
});
var instance = React.render(, container);
@@ -117,7 +117,7 @@ describe('ReactTransitionGroup', function() {
},
render: function() {
return ;
- }
+ },
});
var Component = React.createClass({
@@ -130,7 +130,7 @@ describe('ReactTransitionGroup', function() {
children.push();
}
return {children};
- }
+ },
});
var instance = React.render(, container);
@@ -146,7 +146,7 @@ describe('ReactTransitionGroup', function() {
willEnterCb();
expect(log).toEqual([
'didMount', 'didMount', 'willEnter',
- 'didEnter', 'willLeave', 'didLeave', 'willUnmount'
+ 'didEnter', 'willLeave', 'didLeave', 'willUnmount',
]);
});
@@ -177,7 +177,7 @@ describe('ReactTransitionGroup', function() {
},
render: function() {
return ;
- }
+ },
});
var Component = React.createClass({
@@ -190,7 +190,7 @@ describe('ReactTransitionGroup', function() {
children.push();
}
return {children};
- }
+ },
});
var instance = React.render(, container);
@@ -204,7 +204,7 @@ describe('ReactTransitionGroup', function() {
}
willEnterCb();
expect(log).toEqual([
- 'didMount', 'didMount', 'willEnter', 'didEnter'
+ 'didMount', 'didMount', 'willEnter', 'didEnter',
]);
});
@@ -234,7 +234,7 @@ describe('ReactTransitionGroup', function() {
},
render: function() {
return ;
- }
+ },
});
var Component = React.createClass({
@@ -247,7 +247,7 @@ describe('ReactTransitionGroup', function() {
children.push();
}
return {children};
- }
+ },
});
var instance = React.render(, container);
@@ -257,14 +257,14 @@ describe('ReactTransitionGroup', function() {
instance.setState({count: 3});
expect(log).toEqual([
'didMount1', 'didMount2', 'willEnter1', 'didEnter1',
- 'willEnter2', 'didEnter2'
+ 'willEnter2', 'didEnter2',
]);
log = [];
instance.setState({count: 0});
expect(log).toEqual([
'willLeave0', 'didLeave0', 'willLeave1', 'didLeave1',
- 'willLeave2', 'didLeave2', 'willUnmount0', 'willUnmount1', 'willUnmount2'
+ 'willLeave2', 'didLeave2', 'willUnmount0', 'willUnmount1', 'willUnmount2',
]);
});
});
diff --git a/src/addons/update.js b/src/addons/update.js
index d249f8196d290..6d596917c82f9 100644
--- a/src/addons/update.js
+++ b/src/addons/update.js
@@ -41,7 +41,7 @@ var ALL_COMMANDS_LIST = [
COMMAND_SPLICE,
COMMAND_SET,
COMMAND_MERGE,
- COMMAND_APPLY
+ COMMAND_APPLY,
];
var ALL_COMMANDS_SET = {};
diff --git a/src/isomorphic/ReactIsomorphic.js b/src/isomorphic/ReactIsomorphic.js
index dbbeedf07f2b2..0cea655a7a63f 100644
--- a/src/isomorphic/ReactIsomorphic.js
+++ b/src/isomorphic/ReactIsomorphic.js
@@ -40,7 +40,7 @@ var React = {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
- only: onlyChild
+ only: onlyChild,
},
Component: ReactComponent,
@@ -64,7 +64,7 @@ var React = {
DOM: ReactDOM,
// Hook for JSX spread, don't use this for anything else.
- __spread: assign
+ __spread: assign,
};
module.exports = React;
diff --git a/src/isomorphic/children/ReactChildren.js b/src/isomorphic/children/ReactChildren.js
index 2a6c43193e562..e0a66d977eeba 100644
--- a/src/isomorphic/children/ReactChildren.js
+++ b/src/isomorphic/children/ReactChildren.js
@@ -144,7 +144,7 @@ function countChildren(children, context) {
var ReactChildren = {
forEach: forEachChildren,
map: mapChildren,
- count: countChildren
+ count: countChildren,
};
module.exports = ReactChildren;
diff --git a/src/isomorphic/children/__tests__/ReactChildren-test.js b/src/isomorphic/children/__tests__/ReactChildren-test.js
index 111d04d710c9e..072a2ef85f0a3 100644
--- a/src/isomorphic/children/__tests__/ReactChildren-test.js
+++ b/src/isomorphic/children/__tests__/ReactChildren-test.js
@@ -171,7 +171,7 @@ describe('ReactChildren', function() {
keyOfNthChild(mappedChildren, 1),
keyOfNthChild(mappedChildren, 2),
keyOfNthChild(mappedChildren, 3),
- keyOfNthChild(mappedChildren, 4)
+ keyOfNthChild(mappedChildren, 4),
]).toEqual(
['.$keyZero', '.1', '.$keyTwo', '.3', '.$keyFour']
);
@@ -223,11 +223,13 @@ describe('ReactChildren', function() {
var instance = (
{
- [ReactFragment.create({
- firstHalfKey: [zero, one, two],
- secondHalfKey: [three, four],
- keyFive: five
- })]
+ [
+ ReactFragment.create({
+ firstHalfKey: [zero, one, two],
+ secondHalfKey: [three, four],
+ keyFive: five,
+ }),
+ ]
}
);
@@ -250,14 +252,14 @@ describe('ReactChildren', function() {
keyOfNthChild(mappedChildren, 2),
keyOfNthChild(mappedChildren, 3),
keyOfNthChild(mappedChildren, 4),
- keyOfNthChild(mappedChildren, 5)
+ keyOfNthChild(mappedChildren, 5),
]).toEqual([
'.0:$firstHalfKey:0:$keyZero',
'.0:$firstHalfKey:0:1',
'.0:$firstHalfKey:0:$keyTwo',
'.0:$secondHalfKey:0:0',
'.0:$secondHalfKey:0:$keyFour',
- '.0:$keyFive:$keyFiveInner'
+ '.0:$keyFive:$keyFiveInner',
]);
expect(callback).toHaveBeenCalledWith(zero, 0);
@@ -307,7 +309,7 @@ describe('ReactChildren', function() {
var expectedRemappedForcedKeys = [
'.$=1$keyZero:$giraffe',
- '.$=1$keyOne:0'
+ '.$=1$keyOne:0',
];
var remappedChildrenForcedKeys =
ReactChildren.map(mappedChildrenForcedKeys, mapFn);
@@ -408,11 +410,13 @@ describe('ReactChildren', function() {
var instance = (
{
- [ReactFragment.create({
- firstHalfKey: [zero, one, two],
- secondHalfKey: [three, four],
- keyFive: five
- })]
+ [
+ ReactFragment.create({
+ firstHalfKey: [zero, one, two],
+ secondHalfKey: [three, four],
+ keyFive: five,
+ }),
+ ]
}
);
var numberOfChildren = ReactChildren.count(instance.props.children);
diff --git a/src/isomorphic/children/__tests__/onlyChild-test.js b/src/isomorphic/children/__tests__/onlyChild-test.js
index 29a7c772260a7..6677ab0d07e82 100644
--- a/src/isomorphic/children/__tests__/onlyChild-test.js
+++ b/src/isomorphic/children/__tests__/onlyChild-test.js
@@ -29,7 +29,7 @@ describe('onlyChild', function() {
{onlyChild(this.props.children, this.props.mapFn, this)}
);
- }
+ },
});
});
diff --git a/src/isomorphic/children/__tests__/sliceChildren-test.js b/src/isomorphic/children/__tests__/sliceChildren-test.js
index 065da44697418..265f5b0f78b87 100644
--- a/src/isomorphic/children/__tests__/sliceChildren-test.js
+++ b/src/isomorphic/children/__tests__/sliceChildren-test.js
@@ -41,7 +41,7 @@ describe('sliceChildren', function() {
)}
);
- }
+ },
});
});
@@ -63,13 +63,13 @@ describe('sliceChildren', function() {
var fullSet = [
,
,
-
+ ,
];
var children = renderAndSlice(fullSet, 0);
testKeyValuePairs(children, {
'.$A': fullSet[0],
'.$B': fullSet[1],
- '.$C': fullSet[2]
+ '.$C': fullSet[2],
});
});
@@ -77,12 +77,12 @@ describe('sliceChildren', function() {
var fullSet = [
,
,
-
+ ,
];
var children = renderAndSlice(fullSet, 1);
testKeyValuePairs(children, {
'.$B': fullSet[1],
- '.$C': fullSet[2]
+ '.$C': fullSet[2],
});
});
@@ -91,11 +91,11 @@ describe('sliceChildren', function() {
,
,
,
-
+ ,
];
var children = renderAndSlice(fullSet, 1, 2);
testKeyValuePairs(children, {
- '.$B': fullSet[1]
+ '.$B': fullSet[1],
});
});
@@ -111,7 +111,7 @@ describe('sliceChildren', function() {
.instance();
testKeyValuePairs(rendered.props.children, {
- '.1': b
+ '.1': b,
});
});
diff --git a/src/isomorphic/classic/__tests__/ReactContextValidator-test.js b/src/isomorphic/classic/__tests__/ReactContextValidator-test.js
index b6799bbda282a..e2e5aee48b4f3 100644
--- a/src/isomorphic/classic/__tests__/ReactContextValidator-test.js
+++ b/src/isomorphic/classic/__tests__/ReactContextValidator-test.js
@@ -39,30 +39,30 @@ describe('ReactContextValidator', function() {
it('should filter out context not in contextTypes', function() {
var Component = React.createClass({
contextTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
render: function() {
return ;
- }
+ },
});
var ComponentInFooBarContext = React.createClass({
childContextTypes: {
foo: React.PropTypes.string,
- bar: React.PropTypes.number
+ bar: React.PropTypes.number,
},
getChildContext: function() {
return {
foo: 'abc',
- bar: 123
+ bar: 123,
};
},
render: function() {
return ;
- }
+ },
});
var instance = ReactTestUtils.renderIntoDocument();
@@ -78,24 +78,24 @@ describe('ReactContextValidator', function() {
var Parent = React.createClass({
childContextTypes: {
foo: React.PropTypes.string.isRequired,
- bar: React.PropTypes.string.isRequired
+ bar: React.PropTypes.string.isRequired,
},
getChildContext: function() {
return {
foo: this.props.foo,
- bar: 'bar'
+ bar: 'bar',
};
},
render: function() {
return ;
- }
+ },
});
var Component = React.createClass({
contextTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
componentWillReceiveProps: function(nextProps, nextContext) {
@@ -118,7 +118,7 @@ describe('ReactContextValidator', function() {
render: function() {
return ;
- }
+ },
});
var instance = ;
@@ -133,12 +133,12 @@ describe('ReactContextValidator', function() {
it('should check context types', function() {
var Component = React.createClass({
contextTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
@@ -151,18 +151,18 @@ describe('ReactContextValidator', function() {
var ComponentInFooStringContext = React.createClass({
childContextTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
getChildContext: function() {
return {
- foo: this.props.fooValue
+ foo: this.props.fooValue,
};
},
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -174,18 +174,18 @@ describe('ReactContextValidator', function() {
var ComponentInFooNumberContext = React.createClass({
childContextTypes: {
- foo: React.PropTypes.number
+ foo: React.PropTypes.number,
},
getChildContext: function() {
return {
- foo: this.props.fooValue
+ foo: this.props.fooValue,
};
},
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
@@ -203,7 +203,7 @@ describe('ReactContextValidator', function() {
var Component = React.createClass({
childContextTypes: {
foo: React.PropTypes.string.isRequired,
- bar: React.PropTypes.number
+ bar: React.PropTypes.number,
},
getChildContext: function() {
@@ -212,7 +212,7 @@ describe('ReactContextValidator', function() {
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
diff --git a/src/isomorphic/classic/class/ReactClass.js b/src/isomorphic/classic/class/ReactClass.js
index f582bc3880c4a..cdd2eb0056e1e 100644
--- a/src/isomorphic/classic/class/ReactClass.js
+++ b/src/isomorphic/classic/class/ReactClass.js
@@ -51,7 +51,7 @@ var SpecPolicy = keyMirror({
* objects. We try to merge the keys of the return values of all the mixed in
* functions. If there is a key conflict we throw.
*/
- DEFINE_MANY_MERGED: null
+ DEFINE_MANY_MERGED: null,
});
@@ -302,7 +302,7 @@ var ReactClassInterface = {
* @internal
* @overridable
*/
- updateComponent: SpecPolicy.OVERRIDE_BASE
+ updateComponent: SpecPolicy.OVERRIDE_BASE,
};
@@ -384,7 +384,7 @@ var RESERVED_SPEC_KEYS = {
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
- }
+ },
};
function validateTypeDef(Constructor, typeDef, location) {
@@ -781,7 +781,7 @@ var ReactClassMixin = {
if (callback) {
ReactUpdateQueue.enqueueCallback(this, callback);
}
- }
+ },
};
var ReactClassComponent = function() {};
@@ -904,8 +904,8 @@ var ReactClass = {
injection: {
injectMixin: function(mixin) {
injectedMixins.push(mixin);
- }
- }
+ },
+ },
};
diff --git a/src/isomorphic/classic/class/__tests__/ReactBind-test.js b/src/isomorphic/classic/class/__tests__/ReactBind-test.js
index 1bbdd33c72dff..4f50f0d6fb9b8 100644
--- a/src/isomorphic/classic/class/__tests__/ReactBind-test.js
+++ b/src/isomorphic/classic/class/__tests__/ReactBind-test.js
@@ -37,7 +37,7 @@ describe('autobinding', function() {
badIdeas: {
badBind: function() {
void this.state.something;
- }
+ },
},
render: function() {
@@ -48,7 +48,7 @@ describe('autobinding', function() {
onClick={this.onClick}
/>
);
- }
+ },
});
var instance1 = ;
@@ -99,7 +99,7 @@ describe('autobinding', function() {
var mouseDidClick = mocks.getMockFunction();
var TestMixin = {
- onClick: mouseDidClick
+ onClick: mouseDidClick,
};
var TestBindComponent = React.createClass({
@@ -107,7 +107,7 @@ describe('autobinding', function() {
render: function() {
return ;
- }
+ },
});
var instance1 = ;
@@ -128,7 +128,7 @@ describe('autobinding', function() {
handleClick: function() { },
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
@@ -156,7 +156,7 @@ describe('autobinding', function() {
},
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
diff --git a/src/isomorphic/classic/class/__tests__/ReactClass-test.js b/src/isomorphic/classic/class/__tests__/ReactClass-test.js
index ded48694b7a79..4bce65dc23d0a 100644
--- a/src/isomorphic/classic/class/__tests__/ReactClass-test.js
+++ b/src/isomorphic/classic/class/__tests__/ReactClass-test.js
@@ -37,7 +37,7 @@ describe('ReactClass-spec', function() {
var TestComponent = React.createClass({
render: function() {
return ;
- }
+ },
});
expect(TestComponent.displayName)
@@ -48,11 +48,11 @@ describe('ReactClass-spec', function() {
var propValidator = mocks.getMockFunction();
var TestComponent = React.createClass({
propTypes: {
- value: propValidator
+ value: propValidator,
},
render: function() {
return ;
- }
+ },
});
expect(TestComponent.propTypes).toBeDefined();
@@ -68,11 +68,11 @@ describe('ReactClass-spec', function() {
React.createClass({
displayName: 'Component',
propTypes: {
- prop: null
+ prop: null,
},
render: function() {
return {this.props.prop};
- }
+ },
});
expect(console.error.mock.calls.length).toBe(1);
expect(console.error.mock.calls[0][0]).toBe(
@@ -91,11 +91,11 @@ describe('ReactClass-spec', function() {
React.createClass({
displayName: 'Component',
contextTypes: {
- prop: null
+ prop: null,
},
render: function() {
return {this.props.prop};
- }
+ },
});
expect(console.error.mock.calls.length).toBe(1);
expect(console.error.mock.calls[0][0]).toBe(
@@ -114,11 +114,11 @@ describe('ReactClass-spec', function() {
React.createClass({
displayName: 'Component',
childContextTypes: {
- prop: null
+ prop: null,
},
render: function() {
return {this.props.prop};
- }
+ },
});
expect(console.error.mock.calls.length).toBe(1);
expect(console.error.mock.calls[0][0]).toBe(
@@ -137,7 +137,7 @@ describe('ReactClass-spec', function() {
},
render: function() {
return ;
- }
+ },
});
expect(console.error.argsForCall.length).toBe(1);
expect(console.error.argsForCall[0][0]).toBe(
@@ -153,7 +153,7 @@ describe('ReactClass-spec', function() {
},
render: function() {
return ;
- }
+ },
});
expect(console.error.argsForCall.length).toBe(2);
expect(console.error.argsForCall[1][0]).toBe(
@@ -169,14 +169,14 @@ describe('ReactClass-spec', function() {
statics: {
getDefaultProps: function() {
return {
- foo: 0
+ foo: 0,
};
- }
+ },
},
render: function() {
return ;
- }
+ },
});
}).toThrow(
'Invariant Violation: ReactClass: You are attempting to ' +
@@ -192,17 +192,17 @@ describe('ReactClass-spec', function() {
React.createClass({
mixins: [{}],
propTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
contextTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
childContextTypes: {
- foo: React.PropTypes.string
+ foo: React.PropTypes.string,
},
render: function() {
return ;
- }
+ },
});
expect(console.error.argsForCall.length).toBe(4);
expect(console.error.argsForCall[0][0]).toBe(
@@ -232,12 +232,12 @@ describe('ReactClass-spec', function() {
jkl: 'mno',
pqr: function() {
return this;
- }
+ },
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -257,12 +257,12 @@ describe('ReactClass-spec', function() {
var Component = React.createClass({
getInitialState: function() {
return {
- occupation: 'clown'
+ occupation: 'clown',
};
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -272,26 +272,26 @@ describe('ReactClass-spec', function() {
it('renders based on context getInitialState', function() {
var Foo = React.createClass({
contextTypes: {
- className: React.PropTypes.string
+ className: React.PropTypes.string,
},
getInitialState() {
return {className: this.context.className};
},
render() {
return ;
- }
+ },
});
var Outer = React.createClass({
childContextTypes: {
- className: React.PropTypes.string
+ className: React.PropTypes.string,
},
getChildContext() {
return {className: 'foo'};
},
render() {
return ;
- }
+ },
});
var container = document.createElement('div');
@@ -307,7 +307,7 @@ describe('ReactClass-spec', function() {
},
render: function() {
return ;
- }
+ },
});
var instance = ;
expect(function() {
@@ -326,7 +326,7 @@ describe('ReactClass-spec', function() {
},
render: function() {
return ;
- }
+ },
});
expect(
() => ReactTestUtils.renderIntoDocument()
@@ -337,7 +337,7 @@ describe('ReactClass-spec', function() {
var Component = React.createClass({
render() {
return ;
- }
+ },
});
expect(() => Component()).toThrow();
@@ -352,7 +352,7 @@ describe('ReactClass-spec', function() {
var MyComponent = React.createClass({
render: function() {
return ;
- }
+ },
});
var container = document.createElement('div');
diff --git a/src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js b/src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js
index 53f01e47267bb..ab25597083cfc 100644
--- a/src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js
+++ b/src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js
@@ -32,59 +32,59 @@ describe('ReactClass-mixin', function() {
var MixinA = {
propTypes: {
- propA: function() {}
+ propA: function() {},
},
componentDidMount: function() {
this.props.listener('MixinA didMount');
- }
+ },
};
var MixinB = {
mixins: [MixinA],
propTypes: {
- propB: function() {}
+ propB: function() {},
},
componentDidMount: function() {
this.props.listener('MixinB didMount');
- }
+ },
};
var MixinBWithReverseSpec = {
componentDidMount: function() {
this.props.listener('MixinBWithReverseSpec didMount');
},
- mixins: [MixinA]
+ mixins: [MixinA],
};
var MixinC = {
statics: {
- staticC: function() {}
+ staticC: function() {},
},
componentDidMount: function() {
this.props.listener('MixinC didMount');
- }
+ },
};
var MixinD = {
propTypes: {
- value: mixinPropValidator
- }
+ value: mixinPropValidator,
+ },
};
TestComponent = React.createClass({
mixins: [MixinB, MixinC, MixinD],
statics: {
- staticComponent: function() {}
+ staticComponent: function() {},
},
propTypes: {
- propComponent: function() {}
+ propComponent: function() {},
},
componentDidMount: function() {
this.props.listener('Component didMount');
},
render: function() {
return ;
- }
+ },
});
TestComponentWithReverseSpec = React.createClass({
@@ -94,17 +94,17 @@ describe('ReactClass-mixin', function() {
componentDidMount: function() {
this.props.listener('Component didMount');
},
- mixins: [MixinBWithReverseSpec, MixinC, MixinD]
+ mixins: [MixinBWithReverseSpec, MixinC, MixinD],
});
TestComponentWithPropTypes = React.createClass({
mixins: [MixinD],
propTypes: {
- value: componentPropValidator
+ value: componentPropValidator,
},
render: function() {
return ;
- }
+ },
});
});
@@ -132,7 +132,7 @@ describe('ReactClass-mixin', function() {
['MixinA didMount'],
['MixinB didMount'],
['MixinC didMount'],
- ['Component didMount']
+ ['Component didMount'],
]);
});
@@ -145,7 +145,7 @@ describe('ReactClass-mixin', function() {
['MixinA didMount'],
['MixinBWithReverseSpec didMount'],
['MixinC didMount'],
- ['Component didMount']
+ ['Component didMount'],
]);
});
@@ -172,7 +172,7 @@ describe('ReactClass-mixin', function() {
var Mixin = {
getInitialState: function() {
return {mixin: true};
- }
+ },
};
var Component = React.createClass({
mixins: [Mixin],
@@ -181,7 +181,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -193,7 +193,7 @@ describe('ReactClass-mixin', function() {
var Mixin = {
getInitialState: function() {
return {x: true};
- }
+ },
};
var Component = React.createClass({
mixins: [Mixin],
@@ -202,7 +202,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
var instance = ;
expect(function() {
@@ -220,7 +220,7 @@ describe('ReactClass-mixin', function() {
var Mixin = {
getInitialState: function() {
return Object.freeze({mixin: true});
- }
+ },
};
var Component = React.createClass({
mixins: [Mixin],
@@ -229,7 +229,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
expect(() => {
ReactTestUtils.renderIntoDocument();
@@ -239,19 +239,19 @@ describe('ReactClass-mixin', function() {
it('should support statics in mixins', function() {
var Mixin = {
statics: {
- foo: 'bar'
- }
+ foo: 'bar',
+ },
};
var Component = React.createClass({
mixins: [Mixin],
statics: {
- abc: 'def'
+ abc: 'def',
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -265,19 +265,19 @@ describe('ReactClass-mixin', function() {
expect(function() {
var Mixin = {
statics: {
- abc: 'foo'
- }
+ abc: 'foo',
+ },
};
React.createClass({
mixins: [Mixin],
statics: {
- abc: 'bar'
+ abc: 'bar',
},
render: function() {
return ;
- }
+ },
});
}).toThrow(
'Invariant Violation: ReactClass: You are attempting to ' +
@@ -292,8 +292,8 @@ describe('ReactClass-mixin', function() {
statics: {
abc: function() {
console.log('foo');
- }
- }
+ },
+ },
};
React.createClass({
mixins: [Mixin],
@@ -301,12 +301,12 @@ describe('ReactClass-mixin', function() {
statics: {
abc: function() {
console.log('bar');
- }
+ },
},
render: function() {
return ;
- }
+ },
});
}).toThrow(
'Invariant Violation: ReactClass: You are attempting to ' +
@@ -322,7 +322,7 @@ describe('ReactClass-mixin', function() {
render: function() {
return ;
- }
+ },
});
}).toThrow(
'Invariant Violation: ReactClass: You\'re attempting to ' +
@@ -335,7 +335,7 @@ describe('ReactClass-mixin', function() {
var Component = React.createClass({
render: function() {
return ;
- }
+ },
});
React.createClass({
@@ -343,7 +343,7 @@ describe('ReactClass-mixin', function() {
render: function() {
return ;
- }
+ },
});
}).toThrow(
'Invariant Violation: ReactClass: You\'re attempting to ' +
@@ -355,7 +355,7 @@ describe('ReactClass-mixin', function() {
var mixin = {
mixinFunc: function() {
return this;
- }
+ },
};
var Component = React.createClass({
@@ -365,7 +365,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -375,7 +375,7 @@ describe('ReactClass-mixin', function() {
function() {
var mixin = {
keyWithNullValue: null,
- randomCounter: 0
+ randomCounter: 0,
};
var Component = React.createClass({
@@ -386,7 +386,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
var instance = ;
instance = ReactTestUtils.renderIntoDocument(instance);
@@ -399,7 +399,7 @@ describe('ReactClass-mixin', function() {
var Mixin = {
getInitialState: function() {
return {foo: 'bar'};
- }
+ },
};
Component = React.createClass({
mixins: [Mixin],
@@ -408,7 +408,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
expect(
() => ReactTestUtils.renderIntoDocument()
@@ -422,7 +422,7 @@ describe('ReactClass-mixin', function() {
var Mixin2 = {
getInitialState: function() {
return null;
- }
+ },
};
Component = React.createClass({
mixins: [Mixin2],
@@ -431,7 +431,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
expect(
() => ReactTestUtils.renderIntoDocument()
@@ -449,7 +449,7 @@ describe('ReactClass-mixin', function() {
},
render: function() {
return ;
- }
+ },
});
expect(
() => ReactTestUtils.renderIntoDocument()
diff --git a/src/isomorphic/classic/element/ReactDOM.js b/src/isomorphic/classic/element/ReactDOM.js
index 78ecc53fbfb47..9648c5dcd2068 100644
--- a/src/isomorphic/classic/element/ReactDOM.js
+++ b/src/isomorphic/classic/element/ReactDOM.js
@@ -169,7 +169,7 @@ var ReactDOM = mapObject({
stop: 'stop',
svg: 'svg',
text: 'text',
- tspan: 'tspan'
+ tspan: 'tspan',
}, createDOMFactory);
diff --git a/src/isomorphic/classic/element/ReactElement.js b/src/isomorphic/classic/element/ReactElement.js
index de15253343337..5882ea9acb02b 100644
--- a/src/isomorphic/classic/element/ReactElement.js
+++ b/src/isomorphic/classic/element/ReactElement.js
@@ -18,7 +18,7 @@ var warning = require('warning');
var RESERVED_PROPS = {
key: true,
- ref: true
+ ref: true,
};
/**
@@ -49,7 +49,7 @@ function defineWarningProperty(object, key) {
key
);
this._store[key] = value;
- }
+ },
});
}
@@ -68,7 +68,7 @@ var useMutationMembrane = false;
function defineMutationMembrane(prototype) {
try {
var pseudoFrozenProperties = {
- props: true
+ props: true,
};
for (var key in pseudoFrozenProperties) {
defineWarningProperty(prototype, key);
@@ -114,7 +114,7 @@ var ReactElement = function(type, key, ref, owner, props) {
Object.defineProperty(this._store, 'validated', {
configurable: false,
enumerable: false,
- writable: true
+ writable: true,
});
} catch (x) {
}
@@ -135,7 +135,7 @@ var ReactElement = function(type, key, ref, owner, props) {
// We intentionally don't expose the function on the constructor property.
// ReactElement should be indistinguishable from a plain object.
ReactElement.prototype = {
- _isReactElement: true
+ _isReactElement: true,
};
if (__DEV__) {
diff --git a/src/isomorphic/classic/element/ReactElementValidator.js b/src/isomorphic/classic/element/ReactElementValidator.js
index 48b0f44d6db89..2cf740d228c72 100644
--- a/src/isomorphic/classic/element/ReactElementValidator.js
+++ b/src/isomorphic/classic/element/ReactElementValidator.js
@@ -445,10 +445,10 @@ var ReactElementValidator = {
'before passing it to createFactory.'
);
Object.defineProperty(this, 'type', {
- value: type
+ value: type,
});
return type;
- }
+ },
}
);
} catch (x) {
@@ -467,7 +467,7 @@ var ReactElementValidator = {
}
validatePropTypes(newElement);
return newElement;
- }
+ },
};
diff --git a/src/isomorphic/classic/element/__tests__/ReactElement-test.js b/src/isomorphic/classic/element/__tests__/ReactElement-test.js
index 539f149bfc633..0cb9f82a84d78 100644
--- a/src/isomorphic/classic/element/__tests__/ReactElement-test.js
+++ b/src/isomorphic/classic/element/__tests__/ReactElement-test.js
@@ -28,7 +28,7 @@ describe('ReactElement', function() {
ComponentClass = React.createClass({
render: function() {
return React.createElement('div');
- }
+ },
});
});
@@ -65,7 +65,7 @@ describe('ReactElement', function() {
var element = React.createFactory(ComponentClass)({
key: '12',
ref: '34',
- foo: '56'
+ foo: '56',
});
expect(element.type).toBe(ComponentClass);
expect(element.key).toBe('12');
@@ -76,7 +76,7 @@ describe('ReactElement', function() {
it('coerces the key to a string', function() {
var element = React.createFactory(ComponentClass)({
key: 12,
- foo: '56'
+ foo: '56',
});
expect(element.type).toBe(ComponentClass);
expect(element.key).toBe('12');
@@ -92,7 +92,7 @@ describe('ReactElement', function() {
render: function() {
element = Component();
return element;
- }
+ },
});
var instance = ReactTestUtils.renderIntoDocument(
@@ -106,7 +106,7 @@ describe('ReactElement', function() {
spyOn(console, 'error');
var a = 1;
var element = React.createFactory(ComponentClass)({
- children: 'text'
+ children: 'text',
}, a);
expect(element.props.children).toBe(a);
expect(console.error.argsForCall.length).toBe(0);
@@ -115,7 +115,7 @@ describe('ReactElement', function() {
it('does not override children if no rest args are provided', function() {
spyOn(console, 'error');
var element = React.createFactory(ComponentClass)({
- children: 'text'
+ children: 'text',
});
expect(element.props.children).toBe('text');
expect(console.error.argsForCall.length).toBe(0);
@@ -124,7 +124,7 @@ describe('ReactElement', function() {
it('overrides children if null is provided as an argument', function() {
spyOn(console, 'error');
var element = React.createFactory(ComponentClass)({
- children: 'text'
+ children: 'text',
}, null);
expect(element.props.children).toBe(null);
expect(console.error.argsForCall.length).toBe(0);
@@ -145,14 +145,14 @@ describe('ReactElement', function() {
statics: {
someStaticMethod: function() {
return 'someReturnValue';
- }
+ },
},
getInitialState: function() {
return {valueToReturn: 'hi'};
},
render: function() {
return React.createElement('div');
- }
+ },
});
var element = React.createElement(StaticMethodComponentClass);
@@ -164,7 +164,7 @@ describe('ReactElement', function() {
var Component = React.createClass({
render: function() {
return React.createElement('div');
- }
+ },
});
expect(React.isValidElement(React.createElement('div')))
@@ -187,8 +187,8 @@ describe('ReactElement', function() {
var Component = React.createClass({
render: () => null,
statics: {
- specialType: React.PropTypes.shape({monkey: React.PropTypes.any})
- }
+ specialType: React.PropTypes.shape({monkey: React.PropTypes.any}),
+ },
});
expect(typeof Component.specialType).toBe('function');
@@ -208,7 +208,7 @@ describe('ReactElement', function() {
},
render: function() {
return React.createElement('span');
- }
+ },
});
var container = document.createElement('div');
@@ -229,7 +229,7 @@ describe('ReactElement', function() {
},
render: function() {
return React.createElement('span', null, this.props.prop);
- }
+ },
});
var instance = ReactTestUtils.renderIntoDocument(
@@ -254,7 +254,7 @@ describe('ReactElement', function() {
expect(el.props.className).toBe('quack');
return el;
- }
+ },
});
var outer = ReactTestUtils.renderIntoDocument();
expect(React.findDOMNode(outer).className).toBe('quack');
@@ -295,7 +295,7 @@ describe('ReactElement', function() {
expect(el.props.className).toBe('quack');
return el;
- }
+ },
});
var outer = React.render(, container);
expect(React.findDOMNode(outer).textContent).toBe('meow');
@@ -328,7 +328,7 @@ describe('ReactElement', function() {
var Test = React.createClass({
render: function() {
return ;
- }
+ },
});
var test = ReactTestUtils.renderIntoDocument();
expect(test.props.value).toBeNaN();
diff --git a/src/isomorphic/classic/element/__tests__/ReactElementClone-test.js b/src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
index 769e5ca9ba9e0..ffe68c81c612b 100644
--- a/src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
+++ b/src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
@@ -27,7 +27,7 @@ describe('ReactElementClone', function() {
var Grandparent = React.createClass({
render: function() {
return } />;
- }
+ },
});
var Parent = React.createClass({
render: function() {
@@ -36,7 +36,7 @@ describe('ReactElementClone', function() {
{React.cloneElement(this.props.child, { className: 'xyz' })}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
expect(React.findDOMNode(component).childNodes[0].className).toBe('xyz');
@@ -46,12 +46,12 @@ describe('ReactElementClone', function() {
var Child = React.createClass({
render: function() {
return ;
- }
+ },
});
var Grandparent = React.createClass({
render: function() {
return } />;
- }
+ },
});
var Parent = React.createClass({
render: function() {
@@ -60,7 +60,7 @@ describe('ReactElementClone', function() {
{React.cloneElement(this.props.child, { className: 'xyz' })}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
expect(React.findDOMNode(component).childNodes[0].className).toBe('xyz');
@@ -70,7 +70,7 @@ describe('ReactElementClone', function() {
var Grandparent = React.createClass({
render: function() {
return } />;
- }
+ },
});
var Parent = React.createClass({
@@ -80,7 +80,7 @@ describe('ReactElementClone', function() {
{React.cloneElement(this.props.child, { className: 'xyz' })}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
@@ -91,7 +91,7 @@ describe('ReactElementClone', function() {
var Component = React.createClass({
render: function() {
return null;
- }
+ },
});
var clone = React.cloneElement(, {key: 'xyz'});
expect(clone.key).toBe('xyz');
@@ -102,7 +102,7 @@ describe('ReactElementClone', function() {
render: function() {
expect(this.props.children).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -115,7 +115,7 @@ describe('ReactElementClone', function() {
render: function() {
expect(this.props.children).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -127,7 +127,7 @@ describe('ReactElementClone', function() {
var Component = React.createClass({
render: function() {
return null;
- }
+ },
});
var clone = React.cloneElement(
@@ -139,7 +139,7 @@ describe('ReactElementClone', function() {
expect(clone.props.children).toEqual([
,
-
+ ,
]);
});
@@ -151,13 +151,13 @@ describe('ReactElementClone', function() {
expect(clone.key).toBe('xyz');
expect(clone.ref).toBe('xyz');
return {clone}
;
- }
+ },
});
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
@@ -169,13 +169,13 @@ describe('ReactElementClone', function() {
render: function() {
var clone = React.cloneElement(this.props.children, {ref: 'xyz'});
return {clone}
;
- }
+ },
});
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
@@ -188,7 +188,7 @@ describe('ReactElementClone', function() {
render: function() {
expect(this.props.myprop).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -235,16 +235,16 @@ describe('ReactElementClone', function() {
spyOn(console, 'error');
var Component = React.createClass({
propTypes: {
- color: React.PropTypes.string.isRequired
+ color: React.PropTypes.string.isRequired,
},
render: function() {
return React.createElement('div', null, 'My color is ' + this.color);
- }
+ },
});
var Parent = React.createClass({
render: function() {
return React.cloneElement(this.props.child, {color: 123});
- }
+ },
});
var GrandParent = React.createClass({
render: function() {
@@ -252,7 +252,7 @@ describe('ReactElementClone', function() {
Parent,
{ child: React.createElement(Component, {color: 'red'}) }
);
- }
+ },
});
ReactTestUtils.renderIntoDocument(React.createElement(GrandParent));
expect(console.error.argsForCall.length).toBe(1);
diff --git a/src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js b/src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
index 6237fe075fbd6..8b9d5822efccd 100644
--- a/src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
+++ b/src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
@@ -30,7 +30,7 @@ describe('ReactElementValidator', function() {
ComponentClass = React.createClass({
render: function() {
return React.createElement('div');
- }
+ },
});
});
@@ -58,7 +58,7 @@ describe('ReactElementValidator', function() {
displayName: 'InnerClass',
render: function() {
return Component(null, this.props.childSet);
- }
+ },
});
var InnerComponent = React.createFactory(InnerClass);
@@ -67,7 +67,7 @@ describe('ReactElementValidator', function() {
displayName: 'ComponentWrapper',
render: function() {
return InnerComponent({childSet: [Component(), Component()] });
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -89,12 +89,12 @@ describe('ReactElementValidator', function() {
displayName: undefined,
render: function() {
return ;
- }
+ },
});
var divs = [
,
-
+ ,
];
ReactTestUtils.renderIntoDocument({divs});
@@ -110,7 +110,7 @@ describe('ReactElementValidator', function() {
var divs = [
,
-
+ ,
];
ReactTestUtils.renderIntoDocument({divs}
);
@@ -133,7 +133,7 @@ describe('ReactElementValidator', function() {
);
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -157,9 +157,9 @@ describe('ReactElementValidator', function() {
next: function() {
var done = ++i > 2;
return {value: done ? undefined : Component(), done: done};
- }
+ },
};
- }
+ },
};
Component(null, iterable);
@@ -191,11 +191,11 @@ describe('ReactElementValidator', function() {
var done = ++i > 2;
return {
value: done ? undefined : Component({key: '#' + i}),
- done: done
+ done: done,
};
- }
+ },
};
- }
+ },
};
Component(null, iterable);
@@ -227,9 +227,9 @@ describe('ReactElementValidator', function() {
next: function() {
var done = ++i > 2;
return {value: done ? undefined : [i, Component()], done: done};
- }
+ },
};
- }
+ },
};
iterable.entries = iterable['@@iterator'];
@@ -266,16 +266,16 @@ describe('ReactElementValidator', function() {
spyOn(console, 'error');
var MyComp = React.createClass({
propTypes: {
- color: React.PropTypes.string
+ color: React.PropTypes.string,
},
render: function() {
return React.createElement('div', null, 'My color is ' + this.color);
- }
+ },
});
var ParentComp = React.createClass({
render: function() {
return React.createElement(MyComp, {color: 123});
- }
+ },
});
ReactTestUtils.renderIntoDocument(React.createElement(ParentComp));
expect(console.error.calls[0].args[0]).toBe(
@@ -323,7 +323,7 @@ describe('ReactElementValidator', function() {
var ParentComp = React.createClass({
render: function() {
return React.createElement(null);
- }
+ },
});
expect(function() {
ReactTestUtils.renderIntoDocument(React.createElement(ParentComp));
@@ -350,7 +350,7 @@ describe('ReactElementValidator', function() {
},
render: function() {
return React.createElement('span', null, this.props.prop);
- }
+ },
});
ReactTestUtils.renderIntoDocument(React.createElement(Component));
@@ -372,7 +372,7 @@ describe('ReactElementValidator', function() {
},
render: function() {
return React.createElement('span', null, this.props.prop);
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -391,11 +391,11 @@ describe('ReactElementValidator', function() {
var Component = React.createClass({
propTypes: {
- prop: React.PropTypes.string.isRequired
+ prop: React.PropTypes.string.isRequired,
},
render: function() {
return React.createElement('span', null, this.props.prop);
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -430,11 +430,11 @@ describe('ReactElementValidator', function() {
var Component = React.createClass({
propTypes: {
- myProp: React.PropTypes.shape
+ myProp: React.PropTypes.shape,
},
render: function() {
return React.createElement('span', null, this.props.myProp.value);
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -464,7 +464,7 @@ describe('ReactElementValidator', function() {
var TestComponent = React.createClass({
render: function() {
return ;
- }
+ },
});
var TestFactory = React.createFactory(TestComponent);
expect(TestFactory.type).toBe(TestComponent);
@@ -486,7 +486,7 @@ describe('ReactElementValidator', function() {
},
componentDidMount: function() {
React.findDOMNode(this).appendChild(this.props.children);
- }
+ },
});
var node = document.createElement('div');
diff --git a/src/isomorphic/classic/types/ReactPropTypeLocationNames.js b/src/isomorphic/classic/types/ReactPropTypeLocationNames.js
index d71ab213fc531..0cc3d8fe04711 100644
--- a/src/isomorphic/classic/types/ReactPropTypeLocationNames.js
+++ b/src/isomorphic/classic/types/ReactPropTypeLocationNames.js
@@ -17,7 +17,7 @@ if (__DEV__) {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
- childContext: 'child context'
+ childContext: 'child context',
};
}
diff --git a/src/isomorphic/classic/types/ReactPropTypeLocations.js b/src/isomorphic/classic/types/ReactPropTypeLocations.js
index c55026dcfa8ee..22d8bb07497f9 100644
--- a/src/isomorphic/classic/types/ReactPropTypeLocations.js
+++ b/src/isomorphic/classic/types/ReactPropTypeLocations.js
@@ -16,7 +16,7 @@ var keyMirror = require('keyMirror');
var ReactPropTypeLocations = keyMirror({
prop: null,
context: null,
- childContext: null
+ childContext: null,
});
module.exports = ReactPropTypeLocations;
diff --git a/src/isomorphic/classic/types/ReactPropTypes.js b/src/isomorphic/classic/types/ReactPropTypes.js
index c8425f666ab66..5382931bb47b0 100644
--- a/src/isomorphic/classic/types/ReactPropTypes.js
+++ b/src/isomorphic/classic/types/ReactPropTypes.js
@@ -82,7 +82,7 @@ var ReactPropTypes = {
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker
+ shape: createShapeTypeChecker,
};
function createChainableTypeChecker(validate) {
diff --git a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
index 1bf284aa876c8..7c37fa59607f4 100644
--- a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
+++ b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
@@ -226,12 +226,12 @@ describe('ReactPropTypes', function() {
beforeEach(function() {
Component = React.createClass({
propTypes: {
- label: PropTypes.element.isRequired
+ label: PropTypes.element.isRequired,
},
render: function() {
return {this.props.label}
;
- }
+ },
});
spyOn(console, 'error');
});
@@ -345,7 +345,7 @@ describe('ReactPropTypes', function() {
MyComponent = React.createClass({
render: function() {
return ;
- }
+ },
});
});
@@ -371,7 +371,7 @@ describe('ReactPropTypes', function() {
'Some string',
,
['Another string', [456], , ],
-
+ ,
]);
// Object of renderable things
@@ -383,10 +383,10 @@ describe('ReactPropTypes', function() {
k3: frag({
k30: ,
k31: frag({k310: }),
- k32: 'Another string'
+ k32: 'Another string',
}),
k4: null,
- k5: undefined
+ k5: undefined,
}));
expect(console.error.calls).toEqual([]);
@@ -398,10 +398,10 @@ describe('ReactPropTypes', function() {
k3: {
k30: ,
k31: {k310: },
- k32: 'Another string'
+ k32: 'Another string',
},
k4: null,
- k5: undefined
+ k5: undefined,
});
});
@@ -597,7 +597,7 @@ describe('ReactPropTypes', function() {
var checker = PropTypes.oneOfType([
PropTypes.shape({a: PropTypes.number.isRequired}),
- PropTypes.shape({b: PropTypes.number.isRequired})
+ PropTypes.shape({b: PropTypes.number.isRequired}),
]);
typeCheckFail(
checker,
@@ -609,7 +609,7 @@ describe('ReactPropTypes', function() {
it('should not warn if one of the types are valid', function() {
var checker = PropTypes.oneOfType([
PropTypes.string,
- PropTypes.number
+ PropTypes.number,
]);
typeCheckPass(checker, null);
typeCheckPass(checker, 'foo');
@@ -617,7 +617,7 @@ describe('ReactPropTypes', function() {
checker = PropTypes.oneOfType([
PropTypes.shape({a: PropTypes.number.isRequired}),
- PropTypes.shape({b: PropTypes.number.isRequired})
+ PropTypes.shape({b: PropTypes.number.isRequired}),
]);
typeCheckPass(checker, {a: 1});
typeCheckPass(checker, {b: 1});
@@ -692,7 +692,7 @@ describe('ReactPropTypes', function() {
typeCheckFail(
PropTypes.shape({
key: PropTypes.number.isRequired,
- secondKey: PropTypes.number.isRequired
+ secondKey: PropTypes.number.isRequired,
}),
{},
'Required prop `testProp.key` was not specified in `testComponent`.'
@@ -743,7 +743,7 @@ describe('ReactPropTypes', function() {
render: function() {
return ;
- }
+ },
});
var instance = ;
@@ -761,7 +761,7 @@ describe('ReactPropTypes', function() {
render: function() {
return ;
- }
+ },
});
var instance = ;
@@ -783,7 +783,7 @@ describe('ReactPropTypes', function() {
render: function() {
return ;
- }
+ },
});
var instance = ;
@@ -806,7 +806,7 @@ describe('ReactPropTypes', function() {
render: function() {
return ;
- }
+ },
});
var instance = ;
diff --git a/src/isomorphic/deprecated/OrderedMap.js b/src/isomorphic/deprecated/OrderedMap.js
index 31eb5d8b2b91d..3c23b671e73f4 100644
--- a/src/isomorphic/deprecated/OrderedMap.js
+++ b/src/isomorphic/deprecated/OrderedMap.js
@@ -460,7 +460,7 @@ var OrderedMapMethods = {
_computePositions: function() {
this._computedPositions = {
keyByIndex: {},
- indexByKey: {}
+ indexByKey: {},
};
var keyByIndex = this._computedPositions.keyByIndex;
var indexByKey = this._computedPositions.indexByKey;
@@ -473,7 +473,7 @@ var OrderedMapMethods = {
index++;
}
}
- }
+ },
};
assign(OrderedMapImpl.prototype, OrderedMapMethods);
@@ -501,7 +501,7 @@ var OrderedMap = {
extractObjectFromArray(arr, keyExtractor),
arr.length
);
- }
+ },
};
module.exports = OrderedMap;
diff --git a/src/isomorphic/deprecated/ReactPropTransferer.js b/src/isomorphic/deprecated/ReactPropTransferer.js
index b4f79eca0a395..3bbd29e01026b 100644
--- a/src/isomorphic/deprecated/ReactPropTransferer.js
+++ b/src/isomorphic/deprecated/ReactPropTransferer.js
@@ -56,7 +56,7 @@ var TransferStrategies = {
/**
* Transfer the `style` prop (which is an object) by merging them.
*/
- style: transferStrategyMerge
+ style: transferStrategyMerge,
};
/**
@@ -101,7 +101,7 @@ var ReactPropTransferer = {
*/
mergeProps: function(oldProps, newProps) {
return transferInto(assign({}, oldProps), newProps);
- }
+ },
};
diff --git a/src/isomorphic/deprecated/__tests__/cloneWithProps-test.js b/src/isomorphic/deprecated/__tests__/cloneWithProps-test.js
index 6869fbcaaa9cd..d12783bfea229 100644
--- a/src/isomorphic/deprecated/__tests__/cloneWithProps-test.js
+++ b/src/isomorphic/deprecated/__tests__/cloneWithProps-test.js
@@ -36,7 +36,7 @@ describe('cloneWithProps', function() {
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
var Parent = React.createClass({
render: function() {
@@ -45,7 +45,7 @@ describe('cloneWithProps', function() {
{cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
expect(React.findDOMNode(component).childNodes[0].className)
@@ -57,13 +57,13 @@ describe('cloneWithProps', function() {
var Child = React.createClass({
render: function() {
return ;
- }
+ },
});
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
var Parent = React.createClass({
render: function() {
@@ -72,7 +72,7 @@ describe('cloneWithProps', function() {
{cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
expect(React.findDOMNode(component).childNodes[0].className)
@@ -85,7 +85,7 @@ describe('cloneWithProps', function() {
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
var Parent = React.createClass({
render: function() {
@@ -94,7 +94,7 @@ describe('cloneWithProps', function() {
{cloneWithProps(onlyChild(this.props.children), {className: 'xyz'})}
);
- }
+ },
});
var component = ReactTestUtils.renderIntoDocument();
@@ -106,7 +106,7 @@ describe('cloneWithProps', function() {
var Component = React.createClass({
render: function() {
return null;
- }
+ },
});
var clone = cloneWithProps(, {key: 'xyz'});
expect(clone.key).toBe('xyz');
@@ -117,7 +117,7 @@ describe('cloneWithProps', function() {
render: function() {
expect(this.props.children).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -130,7 +130,7 @@ describe('cloneWithProps', function() {
render: function() {
expect(this.props.children).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
@@ -142,7 +142,7 @@ describe('cloneWithProps', function() {
var Component = React.createClass({
render: function() {
return ;
- }
+ },
});
var Parent = React.createClass({
@@ -152,13 +152,13 @@ describe('cloneWithProps', function() {
expect(clone.key).toBe('xyz');
expect(clone.ref).toBe('xyz');
return {clone}
;
- }
+ },
});
var Grandparent = React.createClass({
render: function() {
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument();
@@ -169,7 +169,7 @@ describe('cloneWithProps', function() {
render: function() {
expect(this.props.myprop).toBe('xyz');
return ;
- }
+ },
});
ReactTestUtils.renderIntoDocument(
diff --git a/src/isomorphic/modern/class/ReactComponent.js b/src/isomorphic/modern/class/ReactComponent.js
index 3dd3b85f372c8..cb099b89611d7 100644
--- a/src/isomorphic/modern/class/ReactComponent.js
+++ b/src/isomorphic/modern/class/ReactComponent.js
@@ -100,26 +100,26 @@ if (__DEV__) {
var deprecatedAPIs = {
getDOMNode: [
'getDOMNode',
- 'Use React.findDOMNode(component) instead.'
+ 'Use React.findDOMNode(component) instead.',
],
isMounted: [
'isMounted',
'Instead, make sure to clean up subscriptions and pending requests in ' +
- 'componentWillUnmount to prevent memory leaks.'
+ 'componentWillUnmount to prevent memory leaks.',
],
replaceProps: [
'replaceProps',
- 'Instead, call React.render again at the top level.'
+ 'Instead, call React.render again at the top level.',
],
replaceState: [
'replaceState',
'Refactor your code to use setState instead (see ' +
- 'https://github.com/facebook/react/issues/3236).'
+ 'https://github.com/facebook/react/issues/3236).',
],
setProps: [
'setProps',
- 'Instead, call React.render again at the top level.'
- ]
+ 'Instead, call React.render again at the top level.',
+ ],
};
var defineDeprecationWarning = function(methodName, info) {
try {
@@ -132,7 +132,7 @@ if (__DEV__) {
info[1]
);
return undefined;
- }
+ },
});
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
diff --git a/src/isomorphic/modern/class/__tests__/ReactES6Class-test.js b/src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
index 17b682063f2e0..1b7fa97ceafa2 100644
--- a/src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
+++ b/src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
@@ -112,7 +112,7 @@ describe('ReactES6Class', function() {
}
Foo.contextTypes = {
tag: React.PropTypes.string,
- className: React.PropTypes.string
+ className: React.PropTypes.string,
};
class Outer extends React.Component {
@@ -125,7 +125,7 @@ describe('ReactES6Class', function() {
}
Outer.childContextTypes = {
tag: React.PropTypes.string,
- className: React.PropTypes.string
+ className: React.PropTypes.string,
};
test(, 'SPAN', 'foo');
});
@@ -283,7 +283,7 @@ describe('ReactES6Class', function() {
test(, 'SPAN', 'foo');
expect(lifeCycles).toEqual([
'will-mount',
- 'did-mount'
+ 'did-mount',
]);
lifeCycles = []; // reset
test(, 'SPAN', 'bar');
@@ -291,12 +291,12 @@ describe('ReactES6Class', function() {
'receive-props', {value: 'bar'},
'should-update', {value: 'bar'}, {},
'will-update', {value: 'bar'}, {},
- 'did-update', {value: 'foo'}, {}
+ 'did-update', {value: 'foo'}, {},
]);
lifeCycles = []; // reset
React.unmountComponentAtNode(container);
expect(lifeCycles).toEqual([
- 'will-unmount'
+ 'will-unmount',
]);
});
diff --git a/src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js b/src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
index 47dde237640d1..73a35f7e4156f 100644
--- a/src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
+++ b/src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
@@ -89,9 +89,9 @@ describe('ReactJSXElementValidator', function() {
next: function() {
var done = ++i > 2;
return {value: done ? undefined : , done: done};
- }
+ },
};
- }
+ },
};
void {iterable};
@@ -121,11 +121,11 @@ describe('ReactJSXElementValidator', function() {
var done = ++i > 2;
return {
value: done ? undefined : ,
- done: done
+ done: done,
};
- }
+ },
};
- }
+ },
};
void {iterable};
@@ -154,9 +154,9 @@ describe('ReactJSXElementValidator', function() {
next: function() {
var done = ++i > 2;
return {value: done ? undefined : [i, ], done: done};
- }
+ },
};
- }
+ },
};
iterable.entries = iterable['@@iterator'];
@@ -195,7 +195,7 @@ describe('ReactJSXElementValidator', function() {
}
}
MyComp.propTypes = {
- color: React.PropTypes.string
+ color: React.PropTypes.string,
};
class ParentComp {
render() {
@@ -291,7 +291,7 @@ describe('ReactJSXElementValidator', function() {
}
}
Component.propTypes = {
- prop: React.PropTypes.string.isRequired
+ prop: React.PropTypes.string.isRequired,
};
ReactTestUtils.renderIntoDocument();
@@ -327,7 +327,7 @@ describe('ReactJSXElementValidator', function() {
}
}
Component.propTypes = {
- prop: null
+ prop: null,
};
ReactTestUtils.renderIntoDocument();
expect(console.error.calls.length).toBe(1);
@@ -345,7 +345,7 @@ describe('ReactJSXElementValidator', function() {
}
}
Component.contextTypes = {
- prop: null
+ prop: null,
};
ReactTestUtils.renderIntoDocument();
expect(console.error.calls.length).toBe(1);
@@ -363,7 +363,7 @@ describe('ReactJSXElementValidator', function() {
}
}
Component.getDefaultProps = () => ({
- prop: 'foo'
+ prop: 'foo',
});
ReactTestUtils.renderIntoDocument();
expect(console.error.calls.length).toBe(1);
diff --git a/src/renderers/dom/ReactDOMClient.js b/src/renderers/dom/ReactDOMClient.js
index 76cc83f450245..03609f1e5e69a 100644
--- a/src/renderers/dom/ReactDOMClient.js
+++ b/src/renderers/dom/ReactDOMClient.js
@@ -33,7 +33,7 @@ var React = {
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
findDOMNode: findDOMNode,
render: render,
- unmountComponentAtNode: ReactMount.unmountComponentAtNode
+ unmountComponentAtNode: ReactMount.unmountComponentAtNode,
};
// Inject the runtime into a devtools global hook regardless of browser.
@@ -46,7 +46,7 @@ if (
InstanceHandles: ReactInstanceHandles,
Mount: ReactMount,
Reconciler: ReactReconciler,
- TextComponent: ReactDOMTextComponent
+ TextComponent: ReactDOMTextComponent,
});
}
@@ -92,7 +92,7 @@ if (__DEV__) {
// shams
Object.create,
- Object.freeze
+ Object.freeze,
];
for (var i = 0; i < expectedFeatures.length; i++) {
diff --git a/src/renderers/dom/ReactDOMServer.js b/src/renderers/dom/ReactDOMServer.js
index 738d7532d7648..19734cfea4c7c 100644
--- a/src/renderers/dom/ReactDOMServer.js
+++ b/src/renderers/dom/ReactDOMServer.js
@@ -18,7 +18,7 @@ ReactDefaultInjection.inject();
var ReactDOMServer = {
renderToString: ReactServerRendering.renderToString,
- renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup
+ renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
};
module.exports = ReactDOMServer;
diff --git a/src/renderers/dom/client/ClientReactRootIndex.js b/src/renderers/dom/client/ClientReactRootIndex.js
index 4ddaefa44f0b7..7720ba7b7be09 100644
--- a/src/renderers/dom/client/ClientReactRootIndex.js
+++ b/src/renderers/dom/client/ClientReactRootIndex.js
@@ -17,7 +17,7 @@ var nextReactRootIndex = 0;
var ClientReactRootIndex = {
createReactRootIndex: function() {
return nextReactRootIndex++;
- }
+ },
};
module.exports = ClientReactRootIndex;
diff --git a/src/renderers/dom/client/ReactBrowserEventEmitter.js b/src/renderers/dom/client/ReactBrowserEventEmitter.js
index 6f7951116e11a..151435d4fd130 100644
--- a/src/renderers/dom/client/ReactBrowserEventEmitter.js
+++ b/src/renderers/dom/client/ReactBrowserEventEmitter.js
@@ -120,7 +120,7 @@ var topEventMapping = {
topTouchEnd: 'touchend',
topTouchMove: 'touchmove',
topTouchStart: 'touchstart',
- topWheel: 'wheel'
+ topWheel: 'wheel',
};
/**
@@ -164,7 +164,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
ReactBrowserEventEmitter.handleTopLevel
);
ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
- }
+ },
},
/**
@@ -346,7 +346,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
deleteListener: EventPluginHub.deleteListener,
- deleteAllListeners: EventPluginHub.deleteAllListeners
+ deleteAllListeners: EventPluginHub.deleteAllListeners,
});
diff --git a/src/renderers/dom/client/ReactDOMIDOperations.js b/src/renderers/dom/client/ReactDOMIDOperations.js
index cd29a50742d88..bd94205424e23 100644
--- a/src/renderers/dom/client/ReactDOMIDOperations.js
+++ b/src/renderers/dom/client/ReactDOMIDOperations.js
@@ -30,7 +30,7 @@ var setInnerHTML = require('setInnerHTML');
var INVALID_PROPERTY_ERRORS = {
dangerouslySetInnerHTML:
'`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',
- style: '`style` must be set using `updateStylesByID()`.'
+ style: '`style` must be set using `updateStylesByID()`.',
};
/**
@@ -146,7 +146,7 @@ var ReactDOMIDOperations = {
updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
}
DOMChildrenOperations.processUpdates(updates, markup);
- }
+ },
};
ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
@@ -156,7 +156,7 @@ ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
updateInnerHTMLByID: 'updateInnerHTMLByID',
updateTextContentByID: 'updateTextContentByID',
dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
- dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
+ dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates',
});
module.exports = ReactDOMIDOperations;
diff --git a/src/renderers/dom/client/ReactDOMSelection.js b/src/renderers/dom/client/ReactDOMSelection.js
index 88a87e2a43a57..31912ae2ff4d1 100644
--- a/src/renderers/dom/client/ReactDOMSelection.js
+++ b/src/renderers/dom/client/ReactDOMSelection.js
@@ -54,7 +54,7 @@ function getIEOffsets(node) {
return {
start: startOffset,
- end: endOffset
+ end: endOffset,
};
}
@@ -110,7 +110,7 @@ function getModernOffsets(node) {
return {
start: isBackward ? end : start,
- end: isBackward ? start : end
+ end: isBackward ? start : end,
};
}
@@ -205,7 +205,7 @@ var ReactDOMSelection = {
* @param {DOMElement|DOMTextNode} node
* @param {object} offsets
*/
- setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
+ setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets,
};
module.exports = ReactDOMSelection;
diff --git a/src/renderers/dom/client/ReactEventListener.js b/src/renderers/dom/client/ReactEventListener.js
index 61ca290eb1ca6..fccd64fa235e9 100644
--- a/src/renderers/dom/client/ReactEventListener.js
+++ b/src/renderers/dom/client/ReactEventListener.js
@@ -52,7 +52,7 @@ assign(TopLevelCallbackBookKeeping.prototype, {
this.topLevelType = null;
this.nativeEvent = null;
this.ancestors.length = 0;
- }
+ },
});
PooledClass.addPoolingTo(
TopLevelCallbackBookKeeping,
@@ -175,7 +175,7 @@ var ReactEventListener = {
} finally {
TopLevelCallbackBookKeeping.release(bookKeeping);
}
- }
+ },
};
module.exports = ReactEventListener;
diff --git a/src/renderers/dom/client/ReactInputSelection.js b/src/renderers/dom/client/ReactInputSelection.js
index dcf8425197464..5b6b6153f2148 100644
--- a/src/renderers/dom/client/ReactInputSelection.js
+++ b/src/renderers/dom/client/ReactInputSelection.js
@@ -44,7 +44,7 @@ var ReactInputSelection = {
selectionRange:
ReactInputSelection.hasSelectionCapabilities(focusedElem) ?
ReactInputSelection.getSelection(focusedElem) :
- null
+ null,
};
},
@@ -82,7 +82,7 @@ var ReactInputSelection = {
// Modern browser with input or textarea.
selection = {
start: input.selectionStart,
- end: input.selectionEnd
+ end: input.selectionEnd,
};
} else if (document.selection && input.nodeName === 'INPUT') {
// IE8 input.
@@ -92,7 +92,7 @@ var ReactInputSelection = {
if (range.parentElement() === input) {
selection = {
start: -range.moveStart('character', -input.value.length),
- end: -range.moveEnd('character', -input.value.length)
+ end: -range.moveEnd('character', -input.value.length),
};
}
} else {
@@ -128,7 +128,7 @@ var ReactInputSelection = {
} else {
ReactDOMSelection.setOffsets(input, offsets);
}
- }
+ },
};
module.exports = ReactInputSelection;
diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js
index 090ae1624ca44..3da9e39ed71fa 100644
--- a/src/renderers/dom/client/ReactMount.js
+++ b/src/renderers/dom/client/ReactMount.js
@@ -956,12 +956,12 @@ var ReactMount = {
getNodeFromInstance: getNodeFromInstance,
- purgeID: purgeID
+ purgeID: purgeID,
};
ReactPerf.measureMethods(ReactMount, 'ReactMount', {
_renderNewRootComponent: '_renderNewRootComponent',
- _mountImageIntoNode: '_mountImageIntoNode'
+ _mountImageIntoNode: '_mountImageIntoNode',
});
module.exports = ReactMount;
diff --git a/src/renderers/dom/client/ReactReconcileTransaction.js b/src/renderers/dom/client/ReactReconcileTransaction.js
index 295dd9478a5d2..35ccd80eb743c 100644
--- a/src/renderers/dom/client/ReactReconcileTransaction.js
+++ b/src/renderers/dom/client/ReactReconcileTransaction.js
@@ -32,7 +32,7 @@ var SELECTION_RESTORATION = {
/**
* @param {Selection} sel Selection information returned from `initialize`.
*/
- close: ReactInputSelection.restoreSelection
+ close: ReactInputSelection.restoreSelection,
};
/**
@@ -58,7 +58,7 @@ var EVENT_SUPPRESSION = {
*/
close: function(previouslyEnabled) {
ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
- }
+ },
};
/**
@@ -78,7 +78,7 @@ var ON_DOM_READY_QUEUEING = {
*/
close: function() {
this.reactMountReady.notifyAll();
- }
+ },
};
/**
@@ -89,7 +89,7 @@ var ON_DOM_READY_QUEUEING = {
var TRANSACTION_WRAPPERS = [
SELECTION_RESTORATION,
EVENT_SUPPRESSION,
- ON_DOM_READY_QUEUEING
+ ON_DOM_READY_QUEUEING,
];
/**
@@ -143,7 +143,7 @@ var Mixin = {
destructor: function() {
CallbackQueue.release(this.reactMountReady);
this.reactMountReady = null;
- }
+ },
};
diff --git a/src/renderers/dom/client/__tests__/ReactBrowserEventEmitter-test.js b/src/renderers/dom/client/__tests__/ReactBrowserEventEmitter-test.js
index 0be3e3f9e44ec..453e7b2e90c2f 100644
--- a/src/renderers/dom/client/__tests__/ReactBrowserEventEmitter-test.js
+++ b/src/renderers/dom/client/__tests__/ReactBrowserEventEmitter-test.js
@@ -100,7 +100,7 @@ describe('ReactBrowserEventEmitter', function() {
idCallOrder = [];
tapMoveThreshold = TapEventPlugin.tapMoveThreshold;
EventPluginHub.injection.injectEventPluginsByName({
- TapEventPlugin: TapEventPlugin
+ TapEventPlugin: TapEventPlugin,
});
});
diff --git a/src/renderers/dom/client/__tests__/ReactDOM-test.js b/src/renderers/dom/client/__tests__/ReactDOM-test.js
index 71760b32032db..1ba170e01fa78 100644
--- a/src/renderers/dom/client/__tests__/ReactDOM-test.js
+++ b/src/renderers/dom/client/__tests__/ReactDOM-test.js
@@ -82,28 +82,28 @@ describe('ReactDOM', function() {
myDiv.setProps({
children: [
,
-
- ]
+ ,
+ ],
});
// Remove theDog - this should purge the cache
myDiv.setProps({
children: [
-
- ]
+ ,
+ ],
});
// Now, put theDog back. It's now a different DOM node.
myDiv.setProps({
children: [
,
-
- ]
+ ,
+ ],
});
// Change the className of theDog. It will use the same element
myDiv.setProps({
children: [
,
-
- ]
+ ,
+ ],
});
var root = React.findDOMNode(myDiv);
var dog = root.childNodes[0];
diff --git a/src/renderers/dom/client/__tests__/ReactEventListener-test.js b/src/renderers/dom/client/__tests__/ReactEventListener-test.js
index b35a219e4f0fc..6aba363c6bf8e 100644
--- a/src/renderers/dom/client/__tests__/ReactEventListener-test.js
+++ b/src/renderers/dom/client/__tests__/ReactEventListener-test.js
@@ -49,7 +49,7 @@ describe('ReactEventListener', function() {
var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
callback({
- target: React.findDOMNode(childControl)
+ target: React.findDOMNode(childControl),
});
var calls = handleTopLevel.mock.calls;
@@ -77,7 +77,7 @@ describe('ReactEventListener', function() {
var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
callback({
- target: React.findDOMNode(childControl)
+ target: React.findDOMNode(childControl),
});
var calls = handleTopLevel.mock.calls;
@@ -115,7 +115,7 @@ describe('ReactEventListener', function() {
var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
callback({
- target: childNode
+ target: childNode,
});
var calls = handleTopLevel.mock.calls;
@@ -155,7 +155,7 @@ describe('ReactEventListener', function() {
var callback =
ReactEventListener.dispatchEvent.bind(ReactEventListener, 'test');
callback({
- target: childNode
+ target: childNode,
});
var calls = handleTopLevel.mock.calls;
@@ -174,7 +174,7 @@ describe('ReactEventListener', function() {
render: function() {
var inner = Inner
;
return ;
- }
+ },
});
@@ -182,7 +182,7 @@ describe('ReactEventListener', function() {
var callback = ReactEventListener.dispatchEvent.bind(null, 'test');
callback({
- target: React.findDOMNode(instance.getInner())
+ target: React.findDOMNode(instance.getInner()),
});
var calls = handleTopLevel.mock.calls;
diff --git a/src/renderers/dom/client/__tests__/ReactMount-test.js b/src/renderers/dom/client/__tests__/ReactMount-test.js
index e8c4e25d2885b..bc7df11b775ce 100644
--- a/src/renderers/dom/client/__tests__/ReactMount-test.js
+++ b/src/renderers/dom/client/__tests__/ReactMount-test.js
@@ -67,7 +67,7 @@ describe('ReactMount', function() {
var Component = React.createClass({
render: function() {
return ;
- }
+ },
});
expect(function() {
ReactTestUtils.renderIntoDocument(Component);
@@ -100,7 +100,7 @@ describe('ReactMount', function() {
componentWillUnmount: mockUnmount,
render: function() {
return {this.props.text};
- }
+ },
});
expect(mockMount.mock.calls.length).toBe(0);
@@ -181,8 +181,8 @@ describe('ReactMount', function() {
expect(shadowRoot.firstChild.tagName).toBe('DIV');
React.render(Hi, from within a WC!, shadowRoot);
expect(shadowRoot.firstChild.tagName).toBe('SPAN');
- }
- }
+ },
+ },
});
proto.unmount = function() {
React.unmountComponentAtNode(shadowRoot);
diff --git a/src/renderers/dom/client/__tests__/ReactRenderDocument-test.js b/src/renderers/dom/client/__tests__/ReactRenderDocument-test.js
index 2a83f57956a5e..0212ecad8afdf 100644
--- a/src/renderers/dom/client/__tests__/ReactRenderDocument-test.js
+++ b/src/renderers/dom/client/__tests__/ReactRenderDocument-test.js
@@ -53,7 +53,7 @@ describe('rendering React components at document', function() {