chore: remove unused imports (#1534)
This commit is contained in:
parent
99d4b2b50c
commit
4f6e8cea44
@ -3,7 +3,6 @@ import React from 'react';
|
||||
import styled from 'react-emotion';
|
||||
import { partial } from 'lodash';
|
||||
import {
|
||||
Icon,
|
||||
AuthenticationPage,
|
||||
buttons,
|
||||
shadows,
|
||||
|
@ -1,6 +1,5 @@
|
||||
import GoTrue from "gotrue-js";
|
||||
import jwtDecode from 'jwt-decode';
|
||||
import { List } from 'immutable';
|
||||
import { get, pick, intersection } from "lodash";
|
||||
import { unsentRequest } from "netlify-cms-lib-util";
|
||||
import { GitHubBackend } from "netlify-cms-backend-github";
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from 'react-emotion';
|
||||
import { NetlifyAuthenticator } from 'netlify-cms-lib-auth';
|
||||
import { AuthenticationPage, Icon, buttons, shadows } from 'netlify-cms-ui-default';
|
||||
import { AuthenticationPage, Icon } from 'netlify-cms-ui-default';
|
||||
|
||||
const LoginButtonIcon = styled(Icon)`
|
||||
margin-right: 18px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { localForage, unsentRequest, then, APIError, Cursor } from "netlify-cms-lib-util";
|
||||
import { Base64 } from "js-base64";
|
||||
import { fromJS, List, Map } from "immutable";
|
||||
import { cond, flow, isString, partial, partialRight, pick, omit, set, update, get } from "lodash";
|
||||
import { List, Map } from "immutable";
|
||||
import { flow, partial, pick, get } from "lodash";
|
||||
|
||||
export default class API {
|
||||
constructor(config) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import trimStart from 'lodash/trimStart';
|
||||
import semaphore from "semaphore";
|
||||
import { fileExtension, Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||
import { CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||
import AuthenticationPage from "./AuthenticationPage";
|
||||
import API from "./API";
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { fromJS } from 'immutable';
|
||||
import { remove, attempt, isError, take } from 'lodash';
|
||||
import { attempt, isError, take } from 'lodash';
|
||||
import uuid from 'uuid/v4';
|
||||
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
||||
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||
|
@ -5,7 +5,7 @@ import { serializeValues } from 'Lib/serializeEntryValues';
|
||||
import { currentBackend } from 'src/backend';
|
||||
import { getAsset } from 'Reducers';
|
||||
import { selectFields } from 'Reducers/collections';
|
||||
import { status, EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||
import { EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
||||
import { loadEntry } from './entries';
|
||||
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { fromJS, List, Set } from 'immutable';
|
||||
import { fromJS, List } from 'immutable';
|
||||
import { actions as notifActions } from 'redux-notifications';
|
||||
import { serializeValues } from 'Lib/serializeEntryValues';
|
||||
import { currentBackend } from 'src/backend';
|
||||
@ -9,7 +9,6 @@ import { selectCollectionEntriesCursor } from 'Reducers/cursors';
|
||||
import { Cursor } from 'netlify-cms-lib-util';
|
||||
import { createEntry } from 'ValueObjects/Entry';
|
||||
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
||||
import isArray from 'lodash/isArray';
|
||||
|
||||
const { notifSend } = notifActions;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { actions as notifActions } from 'redux-notifications';
|
||||
import { currentBackend } from 'src/backend';
|
||||
import { createAssetProxy } from 'ValueObjects/AssetProxy';
|
||||
import { getAsset, selectIntegration } from 'Reducers';
|
||||
import { selectIntegration } from 'Reducers';
|
||||
import { getIntegrationProvider } from 'Integrations';
|
||||
import { addAsset } from './media';
|
||||
import { sanitizeSlug } from "Lib/urlHelper";
|
||||
|
@ -1,10 +1,6 @@
|
||||
import fuzzy from 'fuzzy';
|
||||
import { currentBackend } from 'src/backend';
|
||||
import { getIntegrationProvider } from 'Integrations';
|
||||
import { selectIntegration, selectEntries } from 'Reducers';
|
||||
import { selectInferedField } from 'Reducers/collections';
|
||||
import { WAIT_UNTIL_ACTION } from 'Redux/middleware/waitUntilAction';
|
||||
import { loadEntries, ENTRIES_SUCCESS } from './entries';
|
||||
import { selectIntegration } from 'Reducers';
|
||||
|
||||
/*
|
||||
* Contant Declarations
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { attempt, flatten, isError } from 'lodash';
|
||||
import { fromJS, Map } from 'immutable';
|
||||
import { Map } from 'immutable';
|
||||
import fuzzy from 'fuzzy';
|
||||
import { resolveFormat } from "Formats/formats";
|
||||
import { selectIntegration } from 'Reducers/integrations';
|
||||
@ -15,7 +15,7 @@ import {
|
||||
} from "Reducers/collections";
|
||||
import { createEntry } from "ValueObjects/Entry";
|
||||
import { sanitizeSlug } from "Lib/urlHelper";
|
||||
import { registerBackend, getBackend } from 'Lib/registry';
|
||||
import { getBackend } from 'Lib/registry';
|
||||
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||
import { EDITORIAL_WORKFLOW, status } from 'Constants/publishModes';
|
||||
|
||||
|
@ -4,19 +4,18 @@ import { hot } from 'react-hot-loader';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled from 'react-emotion';
|
||||
import { connect } from 'react-redux';
|
||||
import { Route, Switch, Link, Redirect } from 'react-router-dom';
|
||||
import { Route, Switch, Redirect } from 'react-router-dom';
|
||||
import { Notifs } from 'redux-notifications';
|
||||
import TopBarProgress from 'react-topbar-progress-indicator';
|
||||
import { loadConfig as actionLoadConfig } from 'Actions/config';
|
||||
import { loginUser as actionLoginUser, logoutUser as actionLogoutUser } from 'Actions/auth';
|
||||
import { currentBackend } from 'src/backend';
|
||||
import { showCollection, createNewEntry } from 'Actions/collections';
|
||||
import { createNewEntry } from 'Actions/collections';
|
||||
import { openMediaLibrary as actionOpenMediaLibrary } from 'Actions/mediaLibrary';
|
||||
import MediaLibrary from 'MediaLibrary/MediaLibrary';
|
||||
import { Toast } from 'UI';
|
||||
import { Loader, colors } from 'netlify-cms-ui-default';
|
||||
import history from 'Routing/history';
|
||||
import { getCollectionUrl, getNewEntryUrl } from 'Lib/urlHelper';
|
||||
import { SIMPLE, EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||
import Collection from 'Collection/Collection';
|
||||
import Workflow from 'Workflow/Workflow';
|
||||
|
@ -3,14 +3,12 @@ import React from "react";
|
||||
import ImmutablePropTypes from "react-immutable-proptypes";
|
||||
import styled, { css } from 'react-emotion';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import uuid from 'uuid/v4';
|
||||
import {
|
||||
Icon,
|
||||
Dropdown,
|
||||
DropdownItem,
|
||||
StyledDropdownButton,
|
||||
colors,
|
||||
colorsRaw,
|
||||
lengths,
|
||||
shadows,
|
||||
buttons,
|
||||
|
@ -8,7 +8,7 @@ import Sidebar from './Sidebar';
|
||||
import CollectionTop from './CollectionTop';
|
||||
import EntriesCollection from './Entries/EntriesCollection';
|
||||
import EntriesSearch from './Entries/EntriesSearch';
|
||||
import { VIEW_STYLE_LIST, VIEW_STYLE_GRID } from 'Constants/collectionViews';
|
||||
import { VIEW_STYLE_LIST } from 'Constants/collectionViews';
|
||||
|
||||
const CollectionContainer = styled.div`
|
||||
margin: ${lengths.pageMargin};
|
||||
|
@ -1,11 +1,8 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled from 'react-emotion';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { resolvePath } from 'netlify-cms-lib-util';
|
||||
import { colors, colorsRaw, components, lengths } from 'netlify-cms-ui-default';
|
||||
import history from 'Routing/history';
|
||||
import { VIEW_STYLE_LIST, VIEW_STYLE_GRID } from 'Constants/collectionViews';
|
||||
|
||||
const ListCardLink = styled(Link)`
|
||||
|
@ -1,12 +1,9 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css } from 'react-emotion';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import uuid from 'uuid/v4';
|
||||
import { Icon, components, colors, colorsRaw, lengths } from 'netlify-cms-ui-default';
|
||||
import { searchCollections } from 'Actions/collections';
|
||||
import { getCollectionUrl } from 'Lib/urlHelper';
|
||||
|
||||
const styles = {
|
||||
sidebarNavLinkActive: css`
|
||||
|
@ -1,8 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { Map } from 'immutable';
|
||||
import { get } from 'lodash';
|
||||
import { connect } from 'react-redux';
|
||||
import { Loader } from 'netlify-cms-ui-default';
|
||||
import history from 'Routing/history';
|
||||
|
@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css, injectGlobal } from 'react-emotion';
|
||||
import SplitPane from 'react-split-pane';
|
||||
import { Icon, colors, colorsRaw, components, transitions } from 'netlify-cms-ui-default';
|
||||
import { colors, colorsRaw, components, transitions } from 'netlify-cms-ui-default';
|
||||
import { ScrollSync, ScrollSyncPane } from './EditorScrollSync';
|
||||
import EditorControlPane from './EditorControlPane/EditorControlPane';
|
||||
import EditorPreviewPane from './EditorPreviewPane/EditorPreviewPane';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||
import { selectUnpublishedEntry, selectEntry } from 'Reducers';
|
||||
import { selectUnpublishedEntry } from 'Reducers';
|
||||
import { selectAllowDeletion } from 'Reducers/collections';
|
||||
import { loadUnpublishedEntry, persistUnpublishedEntry } from 'Actions/editorialWorkflow';
|
||||
|
||||
|
@ -3,7 +3,6 @@ import { connect } from 'react-redux';
|
||||
import { orderBy, map } from 'lodash';
|
||||
import fuzzy from 'fuzzy';
|
||||
import { resolvePath, fileExtension } from 'netlify-cms-lib-util';
|
||||
import { changeDraftField } from 'Actions/entries';
|
||||
import {
|
||||
loadMedia as loadMediaAction,
|
||||
persistMedia as persistMediaAction,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled, { css } from 'react-emotion';
|
||||
import styled from 'react-emotion';
|
||||
import { isEmpty } from 'lodash';
|
||||
import Waypoint from 'react-waypoint';
|
||||
import { Modal } from 'UI';
|
||||
@ -9,7 +9,7 @@ import MediaLibraryHeader from './MediaLibraryHeader';
|
||||
import MediaLibraryActions from './MediaLibraryActions';
|
||||
import MediaLibraryCardGrid from './MediaLibraryCardGrid';
|
||||
import EmptyMessage from './EmptyMessage';
|
||||
import { buttons, shadows, colors, borders, lengths } from 'netlify-cms-ui-default';
|
||||
import { colors } from 'netlify-cms-ui-default';
|
||||
|
||||
/**
|
||||
* Responsive styling needs to be overhauled. Current setup requires specifying
|
||||
|
@ -1,11 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { css } from 'react-emotion';
|
||||
import { colors } from 'netlify-cms-ui-default';
|
||||
|
||||
const DefaultErrorComponent = () => {
|
||||
};
|
||||
|
||||
const ISSUE_URL = "https://github.com/netlify/netlify-cms/issues/new";
|
||||
|
||||
const styles = {
|
||||
|
@ -3,8 +3,7 @@ import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css, cx } from 'react-emotion';
|
||||
import moment from 'moment';
|
||||
import { capitalize } from 'lodash'
|
||||
import { colors, colorsRaw, lengths } from 'netlify-cms-ui-default';
|
||||
import { colors, lengths } from 'netlify-cms-ui-default';
|
||||
import { status } from 'Constants/publishModes';
|
||||
import { DragSource, DropTarget, HTML5DragDrop } from 'UI'
|
||||
import WorkflowCard from './WorkflowCard';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { isArray, isObject, isEmpty, isNil } from 'lodash';
|
||||
import { isNil } from 'lodash';
|
||||
import { Map, List } from 'immutable';
|
||||
import { getWidgetValueSerializer } from './registry';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { List } from 'immutable';
|
||||
import { has, get, escapeRegExp } from 'lodash';
|
||||
import { escapeRegExp } from 'lodash';
|
||||
import consoleError from 'Lib/consoleError';
|
||||
import { CONFIG_SUCCESS } from 'Actions/config';
|
||||
import { FILES, FOLDER } from 'Constants/collectionTypes';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { fromJS, Map } from 'immutable';
|
||||
import { fromJS } from 'immutable';
|
||||
import { Cursor } from 'netlify-cms-lib-util';
|
||||
import {
|
||||
ENTRIES_SUCCESS,
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { get } from "lodash";
|
||||
import { fromJS } from "immutable";
|
||||
import { fileExtension } from "./path";
|
||||
import unsentRequest from "./unsentRequest";
|
||||
import { CURSOR_COMPATIBILITY_SYMBOL } from "./Cursor";
|
||||
|
||||
export const filterByPropExtension = (extension, propName) => arr =>
|
||||
arr.filter(el => fileExtension(get(el, propName)) === extension);
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from 'react-emotion';
|
||||
import Icon from './Icon';
|
||||
import { buttons, shadows } from './styles';
|
||||
|
@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled, { css } from 'react-emotion';
|
||||
import { Wrapper, Button as DropdownButton, Menu, MenuItem } from 'react-aria-menubutton';
|
||||
import { shadows, colors, colorsRaw, lengths, buttons, components } from './styles';
|
||||
import { buttons, components } from './styles';
|
||||
import Icon from './Icon';
|
||||
|
||||
const StyledWrapper = styled(Wrapper)`
|
||||
|
@ -9,9 +9,6 @@ injectGlobal`
|
||||
${dateTimeStyles}
|
||||
`
|
||||
|
||||
const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
|
||||
const DEFAULT_DATETIME_FORMAT = moment.defaultFormat;
|
||||
|
||||
export default class DateControl extends React.Component {
|
||||
static propTypes = {
|
||||
field: PropTypes.object.isRequired,
|
||||
|
@ -7,7 +7,6 @@ import { partial } from 'lodash';
|
||||
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
||||
import { ObjectControl } from 'netlify-cms-widget-object';
|
||||
import {
|
||||
Icon,
|
||||
ListItemTopBar,
|
||||
ObjectWidgetTopBar,
|
||||
colors,
|
||||
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css } from 'react-emotion';
|
||||
import { List } from 'immutable';
|
||||
import {
|
||||
Icon,
|
||||
Toggle,
|
||||
Dropdown,
|
||||
DropdownItem,
|
||||
|
@ -1,12 +1,11 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css, cx } from 'react-emotion';
|
||||
import styled, { cx } from 'react-emotion';
|
||||
import { get, isEmpty, debounce } from 'lodash';
|
||||
import { Map } from 'immutable';
|
||||
import { Value, Document, Block, Text } from 'slate';
|
||||
import { Editor as Slate } from 'slate-react';
|
||||
import { lengths, fonts } from 'netlify-cms-ui-default';
|
||||
import { slateToMarkdown, markdownToSlate, htmlToSlate } from '../serializers';
|
||||
import Toolbar from '../MarkdownControl/Toolbar';
|
||||
import { renderNode, renderMark } from './renderers';
|
||||
@ -14,7 +13,7 @@ import { validateNode } from './validators';
|
||||
import plugins, { EditListConfigured } from './plugins';
|
||||
import onKeyDown from './keys';
|
||||
import visualEditorStyles from './visualEditorStyles';
|
||||
import { editorStyleVars, EditorControlBar } from '../styles';
|
||||
import { EditorControlBar } from '../styles';
|
||||
|
||||
const VisualEditorContainer = styled.div`
|
||||
position: relative;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { Text, Inline } from 'slate';
|
||||
import isHotkey from 'is-hotkey';
|
||||
import SlateSoftBreak from 'slate-soft-break';
|
||||
import EditList from 'slate-edit-list';
|
||||
import EditTable from 'slate-edit-table';
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { List } from 'immutable';
|
||||
import Shortcode from './Shortcode';
|
||||
|
||||
/**
|
||||
|
@ -1,14 +1,11 @@
|
||||
/* eslint max-len:0 */
|
||||
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { padStart } from 'lodash';
|
||||
import MarkdownPreview from '../MarkdownPreview';
|
||||
import { markdownToHtml } from '../serializers';
|
||||
|
||||
const parser = markdownToHtml;
|
||||
|
||||
describe('Markdown Preview renderer', () => {
|
||||
describe('Markdown rendering', () => {
|
||||
describe('General', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { get, isEmpty, reduce, pull, trimEnd } from 'lodash';
|
||||
import { trimEnd } from 'lodash';
|
||||
import unified from 'unified';
|
||||
import u from 'unist-builder';
|
||||
import markdownToRemarkPlugin from 'remark-parse';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { concat, last, nth, isEmpty, set } from 'lodash';
|
||||
import { concat, last, nth, isEmpty } from 'lodash';
|
||||
import visitParents from 'unist-util-visit-parents';
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { has, flow, partial, flatMap, flatten, map } from 'lodash';
|
||||
import { has, flow, partial, map } from 'lodash';
|
||||
import { joinPatternSegments, combinePatterns, replaceWhen } from '../regexHelper';
|
||||
|
||||
/**
|
||||
|
@ -1,13 +1,10 @@
|
||||
import {
|
||||
get,
|
||||
set,
|
||||
find,
|
||||
findLast,
|
||||
startsWith,
|
||||
endsWith,
|
||||
trimStart,
|
||||
trimEnd,
|
||||
concat,
|
||||
flatMap
|
||||
} from 'lodash';
|
||||
import u from 'unist-builder';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { get, isEmpty, isArray, last, flatMap } from 'lodash';
|
||||
import u from 'unist-builder';
|
||||
|
||||
/**
|
||||
* A Remark plugin for converting an MDAST to Slate Raw AST. Remark plugins
|
||||
|
@ -1,4 +1,4 @@
|
||||
import styled, { css } from 'react-emotion';
|
||||
import styled from 'react-emotion';
|
||||
|
||||
export const editorStyleVars = {
|
||||
stickyDistanceBottom: '100px',
|
||||
|
@ -1,10 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled, { css, cx } from 'react-emotion';
|
||||
import { css, cx } from 'react-emotion';
|
||||
import { Map } from 'immutable';
|
||||
import { partial } from 'lodash';
|
||||
import { ObjectWidgetTopBar, Icon, colors, components } from 'netlify-cms-ui-default';
|
||||
import { ObjectWidgetTopBar, components } from 'netlify-cms-ui-default';
|
||||
|
||||
const styles = {
|
||||
nestedObjectControl: css`
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { injectGlobal, css } from 'react-emotion';
|
||||
import { injectGlobal } from 'react-emotion';
|
||||
import Autosuggest from 'react-autosuggest';
|
||||
import uuid from 'uuid/v4';
|
||||
import { List, Map } from 'immutable';
|
||||
import { List } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import { Loader, components } from 'netlify-cms-ui-default';
|
||||
|
||||
@ -45,10 +45,6 @@ injectGlobal`
|
||||
}
|
||||
`
|
||||
|
||||
function escapeRegexCharacters(str) {
|
||||
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
}
|
||||
|
||||
export default class RelationControl extends React.Component {
|
||||
static propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
|
Loading…
x
Reference in New Issue
Block a user