mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
eslint fixes
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
|||||||
modifyConfigReset
|
modifyConfigReset
|
||||||
} from "../modules/config";
|
} from "../modules/config";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import type { Config, Link } from "@scm-manager/ui-types";
|
import type { Config } from "@scm-manager/ui-types";
|
||||||
import ConfigForm from "../components/form/ConfigForm";
|
import ConfigForm from "../components/form/ConfigForm";
|
||||||
import { getConfigLink } from "../../modules/indexResource";
|
import { getConfigLink } from "../../modules/indexResource";
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import reducer, {
|
|||||||
getConfig,
|
getConfig,
|
||||||
getConfigUpdatePermission
|
getConfigUpdatePermission
|
||||||
} from "./config";
|
} from "./config";
|
||||||
import { getConfigLink } from "../../modules/indexResource";
|
|
||||||
|
|
||||||
const CONFIG_URL = "/config";
|
const CONFIG_URL = "/config";
|
||||||
const URL = "/api/v2" + CONFIG_URL;
|
const URL = "/api/v2" + CONFIG_URL;
|
||||||
|
|||||||
@@ -19,9 +19,8 @@ import {
|
|||||||
Footer,
|
Footer,
|
||||||
Header
|
Header
|
||||||
} from "@scm-manager/ui-components";
|
} from "@scm-manager/ui-components";
|
||||||
import type { Me, Link } from "@scm-manager/ui-types";
|
import type { Me } from "@scm-manager/ui-types";
|
||||||
import {
|
import {
|
||||||
fetchIndexResources,
|
|
||||||
getConfigLink,
|
getConfigLink,
|
||||||
getFetchIndexResourcesFailure,
|
getFetchIndexResourcesFailure,
|
||||||
getGroupsLink,
|
getGroupsLink,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
getLogoutFailure
|
getLogoutFailure
|
||||||
} from "../modules/auth";
|
} from "../modules/auth";
|
||||||
import { Loading, ErrorPage } from "@scm-manager/ui-components";
|
import { Loading, ErrorPage } from "@scm-manager/ui-components";
|
||||||
import { fetchIndexResources, getLogoutLink } from "../modules/indexResource";
|
import { getLogoutLink } from "../modules/indexResource";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
authenticated: boolean,
|
authenticated: boolean,
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import {
|
|||||||
createGroup,
|
createGroup,
|
||||||
isCreateGroupPending,
|
isCreateGroupPending,
|
||||||
getCreateGroupFailure,
|
getCreateGroupFailure,
|
||||||
createGroupReset,
|
createGroupReset
|
||||||
getCreateGroupLink
|
|
||||||
} from "../modules/groups";
|
} from "../modules/groups";
|
||||||
import type { Group } from "@scm-manager/ui-types";
|
import type { Group } from "@scm-manager/ui-types";
|
||||||
import type { History } from "history";
|
import type { History } from "history";
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import type { BrowserHistory } from "history/createBrowserHistory";
|
|||||||
|
|
||||||
import createReduxStore from "./createReduxStore";
|
import createReduxStore from "./createReduxStore";
|
||||||
import { ConnectedRouter } from "react-router-redux";
|
import { ConnectedRouter } from "react-router-redux";
|
||||||
import PluginLoader from "./containers/PluginLoader";
|
|
||||||
|
|
||||||
import { urls } from "@scm-manager/ui-components";
|
import { urls } from "@scm-manager/ui-components";
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import { isPending } from "./pending";
|
|||||||
import { getFailure } from "./failure";
|
import { getFailure } from "./failure";
|
||||||
import {
|
import {
|
||||||
callFetchIndexResources,
|
callFetchIndexResources,
|
||||||
FETCH_INDEXRESOURCES_SUCCESS,
|
fetchIndexResources,
|
||||||
fetchIndexResources, fetchIndexResourcesPending,
|
fetchIndexResourcesPending,
|
||||||
fetchIndexResourcesSuccess
|
fetchIndexResourcesSuccess
|
||||||
} from "./indexResource";
|
} from "./indexResource";
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ export const login = (
|
|||||||
return apiClient
|
return apiClient
|
||||||
.post(loginLink, login_data)
|
.post(loginLink, login_data)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
dispatch(fetchIndexResourcesPending())
|
dispatch(fetchIndexResourcesPending());
|
||||||
return callFetchIndexResources();
|
return callFetchIndexResources();
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ImageViewer extends React.Component<Props> {
|
|||||||
return (
|
return (
|
||||||
<div className="has-text-centered">
|
<div className="has-text-centered">
|
||||||
<figure>
|
<figure>
|
||||||
<img src={file._links.self.href} />
|
<img src={file._links.self.href} alt={file._links.self.href} />
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ export function getLanguage(contentType: string) {
|
|||||||
languageType = language;
|
languageType = language;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(languageType);
|
|
||||||
return languageType;
|
return languageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ export function getContentType(url: string, state: any) {
|
|||||||
return apiClient
|
return apiClient
|
||||||
.head(url)
|
.head(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response.headers.get("Content-Type"));
|
|
||||||
return { type: response.headers.get("Content-Type") };
|
return { type: response.headers.get("Content-Type") };
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
@@ -95,27 +95,6 @@ const noDirectory: File = {
|
|||||||
_embedded: collection
|
_embedded: collection
|
||||||
};
|
};
|
||||||
|
|
||||||
const directory: File = {
|
|
||||||
name: "package.json",
|
|
||||||
path: "package.json",
|
|
||||||
directory: false,
|
|
||||||
description: "bump version",
|
|
||||||
length: 780,
|
|
||||||
lastModified: "2017-07-31T11:17:19Z",
|
|
||||||
revision: "abc",
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href:
|
|
||||||
"http://localhost:8081/scm/rest/api/v2/repositories/scm/core/content/76aae4bb4ceacf0e88938eb5b6832738b7d537b4/package.json"
|
|
||||||
},
|
|
||||||
history: {
|
|
||||||
href:
|
|
||||||
"http://localhost:8081/scm/rest/api/v2/repositories/scm/core/sources/history/76aae4bb4ceacf0e88938eb5b6832738b7d537b4/package.json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_embedded: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
describe("sources fetch", () => {
|
describe("sources fetch", () => {
|
||||||
const mockStore = configureMockStore([thunk]);
|
const mockStore = configureMockStore([thunk]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user