Skip to content

refactor: corrected some aspects out of eslint feedback #1399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion packages/cli/bin/cli-actions/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const writeJsonAsync = require('../utils').writeJsonAsync;
const defaultPatternlabConfig = patternlab.getDefaultConfig();

// https://github.com/TehShrike/deepmerge#overwrite-array
const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray;
const overwriteMerge = (destinationArray, sourceArray) => sourceArray;

const init = (options) =>
wrapAsync(function* () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/bin/install-edition.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
} = require('@pattern-lab/core/src/lib/resolver');

// https://github.com/TehShrike/deepmerge#overwrite-array
const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray;
const overwriteMerge = (destinationArray, sourceArray) => sourceArray;

const installEdition = (edition, config, projectDir) => {
const pkg = require(path.resolve(projectDir, 'package.json'));
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const updateNotifier = require('update-notifier');
const packageInfo = require('../package.json');
const events = require('./lib/events');
const pe = require('./lib/pattern_exporter');
const pm = require('./lib/plugin_manager');

const defaultConfig = require('../patternlab-config.json');

Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-workshop/build/webpack-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function serve(patternlab, configPath, buildDir = 'public') {
const filesToWatch = [
{
match: [`${process.cwd()}/patternlab-config.json`],
fn: async function (event, filePath) {
fn: async function () {
// when the main PL config changes, clear Node's cache (so the JSON config is re-read) and trigger another PL build
// this allows config changes to show up without restarting the build!
Object.keys(require.cache).forEach(function (key) {
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/scripts/components/panels.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const Panels = {
},
};

function init(event) {
function init() {
// does the origin sending the message match the current host? if not dev/null the request

const fileSuffixPattern =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
html,
LitElement,
unsafeCSS,
css,
svg,
customElement,
} from 'lit-element';
import { html, LitElement, customElement } from 'lit-element';
import styles from './pl-icon.scss?external';
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
const icons = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import { reparentNodes } from 'lit-html/lib/dom.js';
// import { isPrimitive } from 'lit-html/lib/parts.js';
import { directive, NodePart } from 'lit-html/lit-html.js';
import { directive } from 'lit-html/lit-html.js';
import importNode from '@ungap/import-node';
// document.importNode = importNode;

Expand All @@ -28,7 +28,6 @@ import importNode from '@ungap/import-node';
// The DocumentFragment is used as a unique key to check if the last value
// rendered to the part was with unsafeSVG. If not, we'll always re-render the
// value passed to unsafeSVG.
const previousValues = new WeakMap();

/**
* Renders the result as SVG, rather than text.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LitElement, html, customElement } from 'lit-element';
import { LitElement, html } from 'lit-element';
import styles from './pl-tooltip.scss?external';
import { Slotify } from '../slotify';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const Slotify = (Base) =>
} else if (defaultContent) {
return defaultContent;
} else {
// eslint-disable-next-line consistent-return
return;
}
}
Expand Down
6 changes: 1 addition & 5 deletions packages/uikit-workshop/src/scripts/utils/url-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ export const urlHandler = {
* @param {String} the path given by the loaded iframe
*/
pushPattern(pattern, givenPath) {
const data = {
pattern,
};

const fileName = urlHandler.getFileName(pattern);
let path = window.location.pathname;
path =
Expand Down Expand Up @@ -216,6 +212,6 @@ export const urlHandler = {
/**
* handle the onpopstate event
*/
window.onpopstate = function (event) {
window.onpopstate = function () {
urlHandler.skipBack = true;
};