Skip to content

Commit

Permalink
FIX ESLint issues
Browse files Browse the repository at this point in the history
FIX
  • Loading branch information
Sabina Talipova committed Jul 4, 2023
1 parent 82d0389 commit e101022
Show file tree
Hide file tree
Showing 296 changed files with 2,590 additions and 2,583 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-email.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-external.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions client/src/boot/BootRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import i18n from 'i18n';
import { isDirty } from 'redux-form';
import getFormState from 'lib/getFormState';
import { Route } from 'react-router';
import joinUrlPaths from 'lib/urls';
import { joinUrlPaths } from 'lib/urls';
import NavigationBlocker from '../components/NavigationBlocker/NavigationBlocker';

/**
Expand Down Expand Up @@ -122,19 +122,19 @@ class BootRoutes {
{reactRouteRegister.getChildRoutes().map(
(route) => (
<Route key={route.path} path={route.path} element={<route.component />} />
),
)
)}
</Route>,
</Route>
),
{ basename: joinUrlPaths(Config.get('baseUrl'), Config.get('adminUrl')) },
{ basename: joinUrlPaths(Config.get('baseUrl'), Config.get('adminUrl')) }
);

createRoot(document.getElementsByClassName('cms-content')[0]).render(
<ApolloProvider client={this.client}>
<ReduxProvider store={this.store}>
<RouterProvider router={router} />
</ReduxProvider>
</ApolloProvider>,
</ApolloProvider>
);
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/boot/apollo/buildCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const buildCache = (introspectionQueryResultData) => {
return new InMemoryCache({
possibleTypes,
dataIdFromObject,
addTypename: true,
addTypename: true
});
};

Expand Down
12 changes: 6 additions & 6 deletions client/src/boot/apollo/buildNetworkComponents.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { ApolloLink, HttpLink } from '@apollo/client';
import { onError } from '@apollo/client/link/error';
import Config from 'lib/Config';
import joinUrlPaths from 'lib/urls';
import { joinUrlPaths } from 'lib/urls';

const buildNetworkComponents = (baseUrl) => {
const httpLink = new HttpLink({
uri: joinUrlPaths(baseUrl, 'admin/graphql'),
fetchOptions: {
credentials: 'same-origin',
headers: {
accept: 'application/json',
},
},
accept: 'application/json'
}
}
});

const errorLink = onError(({ networkError }) => {
Expand All @@ -24,8 +24,8 @@ const buildNetworkComponents = (baseUrl) => {
const middlewareLink = new ApolloLink((operation, forward) => {
operation.setContext({
headers: {
'X-CSRF-TOKEN': Config.get('SecurityID'),
},
'X-CSRF-TOKEN': Config.get('SecurityID')
}
});

return forward(operation);
Expand Down
14 changes: 7 additions & 7 deletions client/src/boot/apollo/getGraphqlFragments.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import fetch from 'isomorphic-fetch';
import joinUrlPaths from 'lib/urls';
import { joinUrlPaths } from 'lib/urls';

const parseResponse = (result) => {
const fragmentData = result.data;
fragmentData.__schema.types = fragmentData.__schema.types.filter(
(type) => type.possibleTypes !== null,
(type) => type.possibleTypes !== null
);
return fragmentData;
};
Expand All @@ -14,7 +14,7 @@ const handleError = (response) => {
throw new Error(
`The types.graphql file could not be loaded. You probably need to run a ?flush to generate it.
Alternatively, you can use the IntrospectionProvider extension to generate the file dynamically.
More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection`,
More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection`
);
}

Expand All @@ -27,12 +27,12 @@ const getGraphqlFragments = async (baseUrl, preferStatic = true) => {

const urls = [
joinUrlPaths(baseUrl, '_graphql/admin.types.graphql'),
joinUrlPaths(baseUrl, 'admin.types.graphql'),
joinUrlPaths(baseUrl, 'admin.types.graphql')
];

const legacyURLs = [
joinUrlPaths(baseUrl, 'admin/graphql/types'),
joinUrlPaths(baseUrl, 'assets/admin.types.graphql'),
joinUrlPaths(baseUrl, 'assets/admin.types.graphql')
];

let primaryURL;
Expand All @@ -50,10 +50,10 @@ const getGraphqlFragments = async (baseUrl, preferStatic = true) => {
const fetchConfig = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Content-Type': 'application/json'
},
uri: baseUrl,
credentials: 'same-origin',
credentials: 'same-origin'
};

const fetchSchema = async (url) => (
Expand Down
Loading

0 comments on commit e101022

Please sign in to comment.