Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"rxjs",
"rxjs/add/*"
]
}]
}],
"react/require-default-props": 0,
"react/no-unused-prop-types": 0
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.1",
"eslint": "^4.1.0",
"eslint-config-travix": "^3.0.1",
"eslint-config-travix": "^4.0.0",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-promise": "^3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/frint-cli/bin/frint.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function run() {
)),
tap(names => console.log(names)),
tap(() => console.log('\n')),
tap(() => console.log('Type `frint help <commandName>` to learn more.'))
tap(() => console.log('Type `frint help <commandName>` to learn more.')),
)
.subscribe();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frint-cli/commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ module.exports = createApp({
'params',
'rootApp',
],
}
},
],
});
4 changes: 2 additions & 2 deletions packages/frint-cli/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = createApp({
.pipe(tar.x({
filter: path => path.indexOf(`frint-master/examples/${example}/`) === 0,
strip: 3,
C: dir
C: dir,
}))
.on('error', deps.console.error)
.on('finish', () => deps.console.log('Done!'));
Expand All @@ -67,6 +67,6 @@ module.exports = createApp({
'params',
'pwd',
],
}
},
],
});
4 changes: 2 additions & 2 deletions packages/frint-cli/commands/new.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-use-before-define */

/* global Promise */
const mkdirp = require('mkdirp');
const request = require('request');
const tar = require('tar');
Expand Down Expand Up @@ -70,7 +70,7 @@ module.exports = createApp({
'params',
'pwd',
],
}
},
],
});

Expand Down
6 changes: 3 additions & 3 deletions packages/frint-cli/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = createApp({
return function execute() {
const pkg = JSON.parse(
deps.fs.readFileSync(
path.resolve(`${__dirname}/../package.json`)
)
path.resolve(`${__dirname}/../package.json`),
),
);

deps.console.log(`v${pkg.version}`);
Expand All @@ -27,6 +27,6 @@ module.exports = createApp({
'console',
'fs',
],
}
},
],
});
4 changes: 2 additions & 2 deletions packages/frint-cli/commands/version.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ describe('frint-cli › commands › version', function () {
const fakeConsole = rootApp.get('console');

rootApp.get('fs').mkdirpSync(
path.resolve(`${__dirname}/../`)
path.resolve(`${__dirname}/../`),
);
rootApp.get('fs').writeFileSync(
path.resolve(`${__dirname}/../package.json`),
'{"version": "1.2.3"}'
'{"version": "1.2.3"}',
);

commandApp.get('execute')();
Expand Down
2 changes: 1 addition & 1 deletion packages/frint-cli/root/index.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = function createMockedRootApp() {
}

return acc;
}, providers)
}, providers),
});
};
2 changes: 1 addition & 1 deletion packages/frint-component-handlers/src/ObserveHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default {
if (this._subscription) {
this._subscription.unsubscribe();
}
}
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('frint-component-handlers › ObserveHandler', function () {
ObserveHandler,
{
app: {},
}
},
);

handler._data = handler.getInitialData();
Expand Down
14 changes: 7 additions & 7 deletions packages/frint-component-handlers/src/RegionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
getInitialData() {
return {
list: [], // array of apps ==> { name, instance }
listForRendering: [] // array of {name, Component} objects
listForRendering: [], // array of {name, Component} objects
};
},
sendProps(appInstance, props) {
Expand All @@ -31,7 +31,7 @@ export default {
this.rootApp = rootApp;
const apps$ = rootApp.getApps$(
this.getProp('name'),
this.getProp('uniqueKey')
this.getProp('uniqueKey'),
);

this._subscription = apps$.subscribe({
Expand All @@ -41,7 +41,7 @@ export default {
const {
name: appName,
weight: appWeight,
multi
multi,
} = item;
const isPresent = this.getData('listForRendering').some((w) => {
return w.name === appName;
Expand Down Expand Up @@ -85,14 +85,14 @@ export default {
})
.sort((a, b) => {
return a.weight - b.weight;
})
}),
);
});
});
},
error: (err) => {
console.warn(`Subscription error for <Region name="${this.name}" />:`, err);
}
},
});
},
shouldUpdate(nextProps, nextData) {
Expand Down Expand Up @@ -135,9 +135,9 @@ export default {
this.rootApp.destroyApp(
item.name,
this.getProp('name'),
this.getProp('uniqueKey')
this.getProp('uniqueKey'),
);
});
}
}
},
};
2 changes: 1 addition & 1 deletion packages/frint-component-utils/src/DefaultHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ export default {
// other
getMountableComponent(app) {
return app.get('component');
}
},
};
8 changes: 4 additions & 4 deletions packages/frint-component-utils/src/composeHandlers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('frint-component-utils › composeHandlers', function () {
},
getCounter() {
return this.counter;
}
},
});

expect(handler.beforeMount()).to.equal('beforeMount');
Expand All @@ -58,18 +58,18 @@ describe('frint-component-utils › composeHandlers', function () {
},
getCounter() {
return this.counter;
}
},
};

const secondHandler = {
increment() {
this.counter = this.counter + 2;
}
},
};

const handlerInstance = composeHandlers(
firstHandler,
secondHandler
secondHandler,
);

expect(handlerInstance.beforeMount()).to.equal('beforeMount');
Expand Down
2 changes: 1 addition & 1 deletion packages/frint-component-utils/src/streamProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Streamer {

setKey(key, value) {
this._push(of$({
[key]: value
[key]: value,
}));

return this;
Expand Down
14 changes: 7 additions & 7 deletions packages/frint-component-utils/src/streamProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('frint-react › streamProps', function () {

streamer.set({
key2: 'value2 overridden',
key3: 'value3'
key3: 'value3',
});

streamer.get$()
Expand Down Expand Up @@ -85,24 +85,24 @@ describe('frint-react › streamProps', function () {
'Ricardo',
'Mark',
'Jean',
'Alex' // last one wins
'Alex', // last one wins
);
const numbers$ = of$(
1,
2,
3 // last one wins
3, // last one wins
);

streamer.set(
names$,
name => ({ name }) // final plain object
name => ({ name }), // final plain object
);

streamer.set(
numbers$,
number => number * 2, // direct mapped values
number => of$(number), // even mapped observables
number => ({ number }) // final plain object
number => ({ number }), // final plain object
);

streamer.get$()
Expand All @@ -125,7 +125,7 @@ describe('frint-react › streamProps', function () {
const fakeStore = {
dispatch(payload) {
dispatchedPayload = payload;
}
},
};

function myActionCreator(value) {
Expand All @@ -137,7 +137,7 @@ describe('frint-react › streamProps', function () {

streamer.setDispatch(
{ myAction: myActionCreator },
fakeStore
fakeStore,
);

streamer.get$()
Expand Down
24 changes: 12 additions & 12 deletions packages/frint-config/src/externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const lodash = [
}

return callback();
}
},
];

// full imports
Expand Down Expand Up @@ -51,66 +51,66 @@ export const thirdParties = [{
root: 'ReactDOM',
commonjs: 'react-dom',
commonjs2: 'react-dom',
amd: 'react-dom'
}
amd: 'react-dom',
},
}, {
'prop-types': {
root: 'PropTypes',
commonjs: 'prop-types',
commonjs2: 'prop-types',
amd: 'prop-types',
}
},
}];

export const frint = [{
'frint': {
root: 'Frint',
commonjs: 'frint',
commonjs2: 'frint',
amd: 'frint'
amd: 'frint',
},
}, {
'frint-store': {
root: 'FrintStore',
commonjs: 'frint-store',
commonjs2: 'frint-store',
amd: 'frint-store'
amd: 'frint-store',
},
}, {
'frint-model': {
root: 'FrintModel',
commonjs: 'frint-model',
commonjs2: 'frint-model',
amd: 'frint-model'
amd: 'frint-model',
},
}, {
'frint-data': {
root: 'FrintData',
commonjs: 'frint-data',
commonjs2: 'frint-data',
amd: 'frint-data'
amd: 'frint-data',
},
}, {
'frint-react': {
root: 'FrintReact',
commonjs: 'frint-react',
commonjs2: 'frint-react',
amd: 'frint-react'
amd: 'frint-react',
},
}, {
'frint-router': {
root: 'FrintRouter',
commonjs: 'frint-router',
commonjs2: 'frint-router',
amd: 'frint-router'
amd: 'frint-router',
},
}, {
'frint-router-react': {
root: 'FrintRouterReact',
commonjs: 'frint-router-react',
commonjs2: 'frint-router-react',
amd: 'frint-router-react'
}
amd: 'frint-router-react',
},
}];

export default rxjs
Expand Down
2 changes: 1 addition & 1 deletion packages/frint-config/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import externals, {
frint,
lodash,
thirdParties,
rxjs
rxjs,
} from './externals';

export default {
Expand Down
4 changes: 2 additions & 2 deletions packages/frint-data/src/ChainableTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const isRequired = {
}

return value;
}
},
};

export const defaults = {
Expand All @@ -18,5 +18,5 @@ export const defaults = {
}

return defaultValue;
}
},
};
Loading