Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Jun 12, 2019
1 parent 234cab0 commit c315cc9
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 187 deletions.
8 changes: 4 additions & 4 deletions lib/ReactFragment.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
var preact = require('preact-compat');

exports.create = function(obj) {
exports.create = function (obj) {
var children = [];
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
var child = [].concat(obj[key]);
for (var i=0; i<child.length; i++) {
for (var i = 0; i < child.length; i++) {
var c = child[i];
// if unkeyed, clone attrs and inject key
if (preact.isValidElement(c) && !(c.attributes && c.attributes.key)) {
var a = {};
if (c.attributes) for (var j in c.attributes) a[j] = c.attributes[j];
a.key = key+'.'+i;
a.key = key + '.' + i;
c = preact.createElement(c.nodeName, a, c.children);
}
if (c!=null) children.push(c);
if (c != null) children.push(c);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/ReactPerf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function noop(){}
function noop() { }

'getLastMeasurements getExclusive getInclusive getWasted getOperations printExclusive printInclusive printWasted printOperations start stop isRunning'
.split(' ').forEach(function(key) {
module.exports[key]=noop;
.split(' ').forEach(function (key) {
module.exports[key] = noop;
});
6 changes: 3 additions & 3 deletions lib/ReactTransitionEvents.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var supported, prefix;

if (typeof document!=='undefined' && document.createElement) {
if (typeof document !== 'undefined' && document.createElement) {
var d = document.createElement('div');
for (var i in d.style) {
var m = i.match(/^(moz|webkit|ms|)(transition|animation)$/i);
Expand All @@ -10,8 +10,8 @@ if (typeof document!=='undefined' && document.createElement) {
}

function each(node, fn, listener, prefix) {
node[fn]((prefix || '')+'TransitionEnd', listener);
node[fn]((prefix || '')+'AnimationEnd', listener);
node[fn]((prefix || '') + 'TransitionEnd', listener);
node[fn]((prefix || '') + 'AnimationEnd', listener);
if (prefix) each(node, fn, listener);
}

Expand Down
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ let pkg = JSON.parse(fs.readFileSync('./package.json'));

let external = Object.keys(pkg.peerDependencies || {}).concat(Object.keys(pkg.dependencies || {}));

let format = process.env.FORMAT==='es' ? 'es' : 'umd';
let format = process.env.FORMAT === 'es' ? 'es' : 'umd';

export default {
input: 'src/index.js',
output: {
name: pkg.amdName,
exports: format==='es' ? null : 'default',
file: format==='es' ? pkg.module : pkg.main,
exports: format === 'es' ? null : 'default',
file: format === 'es' ? pkg.module : pkg.main,
format,
globals: {
'preact': 'preact',
Expand All @@ -26,7 +26,7 @@ export default {
external,
strict: false,
plugins: [
format==='umd' && memory({
format === 'umd' && memory({
path: 'src/index.js',
contents: "export { default } from './index';"
}),
Expand Down
Loading

0 comments on commit c315cc9

Please sign in to comment.