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

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Oct 26, 2017
1 parent 722b175 commit 77b5c07
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
6 changes: 6 additions & 0 deletions examples/.eslintrc
@@ -0,0 +1,6 @@
{
"extends": "profiscience",
"parserOptions": {
"sourceType": "module"
}
}
3 changes: 2 additions & 1 deletion examples/lazy-loading/plugins/lazy-component-loader.js
Expand Up @@ -7,7 +7,7 @@ export default function plugin(componentName) {
componentName,

// then some middleware to load that component...
(ctx) => {
() => {
// bail if already loaded
if (ko.components.isRegistered(componentName)) {
return
Expand All @@ -16,6 +16,7 @@ export default function plugin(componentName) {
// https://webpack.js.org/guides/code-splitting-import/
return import('../views/' + componentName + '/index.js')
.then((exports) => ko.components.register(componentName, exports))
// eslint-disable-next-line no-console
.catch((err) => console.error('Error fetching component', componentName, err))
}
]
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack.config.js
@@ -1,4 +1,4 @@
'use strict'
'use strict' // eslint-disable-line strict

const path = require('path')

Expand Down
5 changes: 4 additions & 1 deletion tasks/.eslintrc
@@ -1,3 +1,6 @@
{
"extends": "profiscience"
"extends": "profiscience",
"parserOptions": {
"sourceType": "script"
}
}
2 changes: 1 addition & 1 deletion tasks/bundle.js
Expand Up @@ -20,7 +20,7 @@ module.exports = {
commonjs()
],
output: {
file: `ko-component-router.js`,
file: 'ko-component-router.js',
format: 'umd',
exports: 'named', // const { Router, Route, Context, ... } = ko.router
globals: {
Expand Down
2 changes: 2 additions & 0 deletions test/plugins.js
Expand Up @@ -29,9 +29,11 @@ ko.components.register('plugins', {
'/component': {
component: 'component'
},
// eslint-disable-next-line formatting/newline-object-in-array
'/data': ['data', {
data: Promise.resolve(true)
}],
// eslint-disable-next-line formatting/newline-object-in-array
'/data-multi': ['data-multi', {
data: {
true: Promise.resolve(true),
Expand Down
2 changes: 1 addition & 1 deletion test/routing/nested.js
Expand Up @@ -58,7 +58,7 @@ ko.components.register('nested', {
constructor(ctx) {
t.pass('works with implied router component (no specified component)')

t.equals(ctx.$root.$child.router, Router.get(1), 'Router.get(n) works')
t.equals(ctx.$root.$child.router, Router.get(1), 'Router.get(n) works')

t.equals(ctx.$root, Router.head.ctx, 'ctx.$root is Router.head.ctx')
t.equals(Router.head.ctx.$parent, undefined, 'root ctx.$parent is undefined')
Expand Down

0 comments on commit 77b5c07

Please sign in to comment.