chore: update prettier (#5412)

This commit is contained in:
Vladislav Shkodin
2021-05-19 14:39:35 +02:00
committed by GitHub
parent 46738492a0
commit 39f113715a
66 changed files with 1625 additions and 1763 deletions

View File

@ -245,10 +245,8 @@ export default class API {
MAINTAINER_ACCESS = 40;
hasWriteAccess = async () => {
const {
shared_with_groups: sharedWithGroups,
permissions,
}: GitLabRepo = await this.requestJSON(this.repoURL);
const { shared_with_groups: sharedWithGroups, permissions }: GitLabRepo =
await this.requestJSON(this.repoURL);
const { project_access: projectAccess, group_access: groupAccess } = permissions;
if (projectAccess && projectAccess.access_level >= this.WRITE_ACCESS) {

View File

@ -287,10 +287,7 @@ describe('gitlab backend', () => {
function interceptFiles(backend, path) {
const api = mockApi(backend);
const url = `${expectedRepoUrl}/repository/files/${encodeURIComponent(path)}/raw`;
api
.get(url)
.query(true)
.reply(200, mockRepo.files[path]);
api.get(url).query(true).reply(200, mockRepo.files[path]);
api
.get(`${expectedRepoUrl}/repository/commits`)
@ -391,10 +388,7 @@ describe('gitlab backend', () => {
it('returns an entry from folder collection', async () => {
const entryTree = mockRepo.tree[collectionContentConfig.folder][0];
const slug = entryTree.path
.split('/')
.pop()
.replace('.md', '');
const slug = entryTree.path.split('/').pop().replace('.md', '');
interceptFiles(backend, entryTree.path);
interceptCollection(backend, collectionContentConfig);