2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-11 07:41:04 +00:00

Make eslint happy

This commit is contained in:
Ronan Jouchet 2018-07-21 09:16:02 -04:00
parent bbef14ccc6
commit 19561e9ad6
20 changed files with 34 additions and 36 deletions

View File

@ -3,9 +3,9 @@ import path from 'path';
import { BrowserWindow, shell, ipcMain, dialog } from 'electron';
import windowStateKeeper from 'electron-window-state';
import mainWindowHelpers from './mainWindowHelpers';
import helpers from './../../helpers/helpers';
import createMenu from './../menu/menu';
import initContextMenu from './../contextMenu/contextMenu';
import helpers from '../../helpers/helpers';
import createMenu from '../menu/menu';
import initContextMenu from '../contextMenu/contextMenu';
const {
isOSX,

View File

@ -1,4 +1,4 @@
import helpers from './../../helpers/helpers';
import helpers from '../../helpers/helpers';
const { linkIsInternal } = helpers;

View File

@ -1,4 +1,4 @@
import helpers from './../../helpers/helpers';
import helpers from '../../helpers/helpers';
const { app, Tray, Menu, ipcMain, nativeImage } = require('electron');

View File

@ -1,6 +1,6 @@
import gulp from 'gulp';
import webpack from 'webpack-stream';
import PATHS from './../helpers/src-paths';
import PATHS from '../helpers/src-paths';
const webpackConfig = require('./../../webpack.config.js');

View File

@ -1,6 +1,6 @@
import gulp from 'gulp';
import PATHS from './../helpers/src-paths';
import helpers from './../helpers/gulp-helpers';
import PATHS from '../helpers/src-paths';
import helpers from '../helpers/gulp-helpers';
const { buildES6 } = helpers;

View File

@ -1,6 +1,6 @@
import gulp from 'gulp';
import PATHS from './../helpers/src-paths';
import helpers from './../helpers/gulp-helpers';
import PATHS from '../helpers/src-paths';
import helpers from '../helpers/gulp-helpers';
const { buildES6 } = helpers;

View File

@ -5,11 +5,11 @@ import ncp from 'ncp';
import async from 'async';
import hasBinary from 'hasbin';
import log from 'loglevel';
import DishonestProgress from './../helpers/dishonestProgress';
import optionsFactory from './../options/optionsMain';
import DishonestProgress from '../helpers/dishonestProgress';
import optionsFactory from '../options/optionsMain';
import iconBuild from './iconBuild';
import helpers from './../helpers/helpers';
import PackagerConsole from './../helpers/packagerConsole';
import helpers from '../helpers/helpers';
import PackagerConsole from '../helpers/packagerConsole';
import buildApp from './buildApp';
const copy = ncp.ncp;

View File

@ -1,7 +1,7 @@
import path from 'path';
import log from 'loglevel';
import helpers from './../helpers/helpers';
import iconShellHelpers from './../helpers/iconShellHelpers';
import helpers from '../helpers/helpers';
import iconShellHelpers from '../helpers/iconShellHelpers';
const { isOSX } = helpers;
const { convertToPng, convertToIco, convertToIcns } = iconShellHelpers;

View File

@ -5,8 +5,8 @@ import program from 'commander';
import nativefier from './index';
const dns = require('dns');
const packageJson = require('./../package');
const log = require('loglevel');
const packageJson = require('./../package');
function collect(val, memo) {
memo.push(val);

View File

@ -3,7 +3,7 @@ import path from 'path';
import fs from 'fs';
import tmp from 'tmp';
import gitCloud from 'gitcloud';
import helpers from './../helpers/helpers';
import helpers from '../helpers/helpers';
const { downloadFile, allowedIconFormats } = helpers;
tmp.setGracefulCleanup();

View File

@ -1,5 +1,5 @@
import log from 'loglevel';
import { inferIcon } from './../../infer';
import { inferIcon } from '../../infer';
export default function({ icon, targetUrl, platform }) {
// Icon is the path to the icon

View File

@ -1,6 +1,6 @@
import log from 'loglevel';
import icon from './icon';
import { inferIcon } from './../../infer';
import { inferIcon } from '../../infer';
jest.mock('./../../infer/inferIcon');
jest.mock('loglevel');

View File

@ -1,7 +1,7 @@
import log from 'loglevel';
import { sanitizeFilename } from './../../utils';
import { inferTitle } from './../../infer';
import { DEFAULT_APP_NAME } from './../../constants';
import { sanitizeFilename } from '../../utils';
import { inferTitle } from '../../infer';
import { DEFAULT_APP_NAME } from '../../constants';
function tryToInferName({ name, targetUrl }) {
// .length also checks if its the commanderJS function or a string

View File

@ -1,8 +1,8 @@
import log from 'loglevel';
import name from './name';
import { DEFAULT_APP_NAME } from './../../constants';
import { inferTitle } from './../../infer';
import { sanitizeFilename } from './../../utils';
import { DEFAULT_APP_NAME } from '../../constants';
import { inferTitle } from '../../infer';
import { sanitizeFilename } from '../../utils';
jest.mock('./../../infer/inferTitle');
jest.mock('./../../utils/sanitizeFilename');

View File

@ -1,4 +1,4 @@
import { inferUserAgent } from './../../infer';
import { inferUserAgent } from '../../infer';
export default function({ userAgent, electronVersion, platform }) {
if (userAgent) {

View File

@ -1,5 +1,5 @@
import userAgent from './userAgent';
import { inferUserAgent } from './../../infer';
import { inferUserAgent } from '../../infer';
jest.mock('./../../infer/inferUserAgent');

View File

@ -1,9 +1,9 @@
import log from 'loglevel';
import inferOs from './../infer/inferOs';
import inferOs from '../infer/inferOs';
import normalizeUrl from './normalizeUrl';
import packageJson from './../../package.json';
import { ELECTRON_VERSION, PLACEHOLDER_APP_DIR } from './../constants';
import packageJson from '../../package.json';
import { ELECTRON_VERSION, PLACEHOLDER_APP_DIR } from '../constants';
import asyncConfig from './asyncConfig';
const { inferPlatform, inferArch } = inferOs;

View File

@ -1,6 +1,6 @@
import _ from 'lodash';
import sanitizeFilenameLib from 'sanitize-filename';
import { DEFAULT_APP_NAME } from './../constants';
import { DEFAULT_APP_NAME } from '../constants';
export default function(platform, str) {
let result = sanitizeFilenameLib(str);

View File

@ -1,6 +1,6 @@
import sanitizeFilenameLib from 'sanitize-filename';
import sanitizeFilename from './sanitizeFilename';
import { DEFAULT_APP_NAME } from './../constants';
import { DEFAULT_APP_NAME } from '../constants';
jest.mock('sanitize-filename');
sanitizeFilenameLib.mockImplementation((str) => str);

View File

@ -16,9 +16,7 @@ module.exports = {
},
externals: nodeModules,
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
],
rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }],
},
devtool: 'source-map',
mode: 'none',