mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Clean up import order
This commit is contained in:
parent
ff11deae0d
commit
07d31aded6
15 changed files with 47 additions and 45 deletions
10
.eslintrc
10
.eslintrc
|
|
@ -148,9 +148,15 @@
|
|||
"use-isnan": "error",
|
||||
"valid-typeof": "error",
|
||||
"prettier/prettier": "error",
|
||||
"import/no-unresolved": "error",
|
||||
"import/default": "error",
|
||||
"import/export": "error",
|
||||
"import/no-extraneous-dependencies": "error"
|
||||
"import/first": "error",
|
||||
"import/named": "error",
|
||||
"import/namespace": "error",
|
||||
"import/no-duplicates": "error",
|
||||
"import/no-extraneous-dependencies": "error",
|
||||
"import/no-named-as-default-member": "error",
|
||||
"import/no-unresolved": "error",
|
||||
"import/order": "error"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
import getStore from "../../store";
|
||||
|
||||
import EqualizerWindow from "./index";
|
||||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
|
|
@ -16,13 +22,6 @@ function createNodeMock(element) {
|
|||
return null;
|
||||
}
|
||||
|
||||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
import getStore from "../../store";
|
||||
|
||||
import EqualizerWindow from "./index";
|
||||
|
||||
describe("EqualizerWindow", () => {
|
||||
let store;
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
import getStore from "../../store";
|
||||
|
||||
import MainWindow from "./index";
|
||||
|
||||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
|
|
@ -16,13 +23,6 @@ function createNodeMock(element) {
|
|||
return null;
|
||||
}
|
||||
|
||||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
import getStore from "../../store";
|
||||
|
||||
import MainWindow from "./index";
|
||||
|
||||
describe("MainWindow", () => {
|
||||
let store;
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@ import React from "react";
|
|||
import { connect } from "react-redux";
|
||||
import classnames from "classnames";
|
||||
import { getTimeObj } from "../utils";
|
||||
import Character from "./Character";
|
||||
|
||||
import { TOGGLE_TIME_MODE } from "../actionTypes";
|
||||
import Character from "./Character";
|
||||
|
||||
import "../../css/mini-time.css";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import {
|
|||
downloadHtmlPlaylist
|
||||
} from "../../actionCreators";
|
||||
|
||||
import PlaylistMenu from "./PlaylistMenu";
|
||||
import { ContextMenu, Hr, Node } from "../ContextMenu";
|
||||
import PlaylistMenu from "./PlaylistMenu";
|
||||
|
||||
/* eslint-disable no-alert */
|
||||
/* TODO: This should really be kitty-corner to the upper right hand corner of the MiscMenu */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import classnames from "classnames";
|
||||
import { getOrderedTracks, getMediaText } from "../../selectors";
|
||||
import { getTimeStr } from "../../utils";
|
||||
import {
|
||||
TOGGLE_PLAYLIST_WINDOW,
|
||||
|
|
@ -18,8 +19,6 @@ import {
|
|||
import CharacterString from "../CharacterString";
|
||||
import ResizeTarget from "./ResizeTarget";
|
||||
|
||||
import { getOrderedTracks, getMediaText } from "../../selectors";
|
||||
|
||||
class PlaylistShade extends React.Component {
|
||||
_addedWidth() {
|
||||
return this.props.playlistSize[0] * PLAYLIST_RESIZE_SEGMENT_WIDTH;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
loadFromUrl: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
|
|
@ -14,6 +6,14 @@ import { loadMediaFromUrl } from "../../actionCreators";
|
|||
|
||||
import PlaylistShade from "./PlaylistShade";
|
||||
|
||||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
loadFromUrl: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
describe("PlaylistShade", () => {
|
||||
let store;
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
import React from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import renderer from "react-test-renderer";
|
||||
import getStore from "../../store";
|
||||
|
||||
import PlaylistWindow from "./index";
|
||||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
describe("PlaylistWindow", () => {
|
||||
let store;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import "babel-polyfill";
|
||||
import Winamp from "./winamp";
|
||||
import Browser from "./browser";
|
||||
import Raven from "raven-js";
|
||||
import base from "../skins/base-2.91.wsz";
|
||||
import osx from "../skins/MacOSXAqua1-5.wsz";
|
||||
import topaz from "../skins/TopazAmp1-2.wsz";
|
||||
|
|
@ -8,7 +7,8 @@ import visor from "../skins/Vizor1-01.wsz";
|
|||
import xmms from "../skins/XMMS-Turquoise.wsz";
|
||||
import zaxon from "../skins/ZaxonRemake1-0.wsz";
|
||||
import green from "../skins/Green-Dimension-V2.wsz";
|
||||
import Raven from "raven-js";
|
||||
import Winamp from "./winamp";
|
||||
import Browser from "./browser";
|
||||
|
||||
import {
|
||||
hideAbout,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { userInput } from "./";
|
||||
import { SET_FOCUS, SET_SCRUB_POSITION, UNSET_FOCUS } from "../actionTypes";
|
||||
import { userInput } from "./";
|
||||
|
||||
describe("userInput reducer", () => {
|
||||
const state = userInput(undefined, { type: "@@INIT" });
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import reducer from "./playlist";
|
||||
import {
|
||||
SHIFT_CLICKED_TRACK,
|
||||
CLICKED_TRACK,
|
||||
CTRL_CLICKED_TRACK
|
||||
} from "../actionTypes";
|
||||
import reducer from "./playlist";
|
||||
|
||||
describe("playlist reducer", () => {
|
||||
it("can handle clicking a track", () => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { createSelector } from "reselect";
|
||||
import { denormalize, getTimeStr, clamp, percentToIndex } from "./utils";
|
||||
import {
|
||||
BANDS,
|
||||
|
|
@ -5,7 +6,6 @@ import {
|
|||
TRACK_HEIGHT
|
||||
} from "./constants";
|
||||
import { createPlaylistURL } from "./playlistHtml";
|
||||
import { createSelector } from "reselect";
|
||||
import * as fromPlaylist from "./reducers/playlist";
|
||||
|
||||
export const getEqfData = state => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import SKIN_SPRITES from "./skinSprites";
|
||||
import JSZip from "../node_modules/jszip/dist/jszip"; // Hack
|
||||
import SKIN_SPRITES from "./skinSprites";
|
||||
import regionParser from "./regionParser";
|
||||
import { parseViscolors, parseIni } from "./utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { createStore, applyMiddleware } from "redux";
|
||||
import reducer from "./reducers";
|
||||
import thunk from "redux-thunk";
|
||||
import { composeWithDevTools } from "redux-devtools-extension";
|
||||
import reducer from "./reducers";
|
||||
import mediaMiddleware from "./mediaMiddleware";
|
||||
import analyticsMiddleware from "./analyticsMiddleware";
|
||||
import { merge } from "./utils";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
const config = require("./webpack.config");
|
||||
const webpack = require("webpack");
|
||||
const config = require("./webpack.config");
|
||||
|
||||
const cdnUrl = process.env.CDN_URL || "/";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue