refactor: Apply naming-convention rules

This commit is contained in:
Joachim Van Herwegen
2020-09-17 11:01:15 +02:00
parent 9657fbafb1
commit e349e04119
3 changed files with 30 additions and 4 deletions

View File

@@ -13,13 +13,13 @@ import { pipeStreamsAndErrors } from './Util';
export class MetadataController {
/**
* Helper function to generate quads for a Container or Resource.
* @param URI - The URI for which the quads should be generated.
* @param uri - The URI for which the quads should be generated.
* @param stats - The Stats of the subject.
*
* @returns The generated quads.
*/
public generateResourceQuads(URI: string, stats: Stats): Quad[] {
const metadata = new RepresentationMetadata(URI);
public generateResourceQuads(uri: string, stats: Stats): Quad[] {
const metadata = new RepresentationMetadata(uri);
if (stats.isDirectory()) {
metadata.add(RDF.type, getNamedNode(LDP.Container));
metadata.add(RDF.type, getNamedNode(LDP.BasicContainer));

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/naming-convention */
const createSuffixFn = (prefix: string): ((suf: string) => string) => (suffix: string): string => `${prefix}${suffix}`;
const ACL_PREFIX = createSuffixFn('http://www.w3.org/ns/auth/acl#');