mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Enable style/indent-binary-ops rule
This commit is contained in:
parent
73fbe80cff
commit
331f83d659
@ -66,8 +66,7 @@ module.exports = {
|
||||
'style/block-spacing': 'off',
|
||||
'style/brace-style': [ 'error', '1tbs', { allowSingleLine: false }],
|
||||
'style/generator-star-spacing': [ 'error', { before: false, after: true }],
|
||||
// Seems to be inconsistent in when it adds indentation and when it does not
|
||||
'style/indent-binary-ops': 'off',
|
||||
'style/indent-binary-ops': 'error',
|
||||
'style/member-delimiter-style': [ 'error', {
|
||||
multiline: { delimiter: 'semi', requireLast: true },
|
||||
singleline: { delimiter: 'semi', requireLast: false },
|
||||
|
@ -102,7 +102,9 @@ export class ParentContainerReader extends PermissionReader {
|
||||
// When an operation requests to delete a resource,
|
||||
// the server MUST match Authorizations allowing the acl:Write access privilege
|
||||
// on the resource and the containing container.
|
||||
mergedPermission.delete = resourcePermission.write && containerPermission.write &&
|
||||
mergedPermission.delete =
|
||||
resourcePermission.write &&
|
||||
containerPermission.write &&
|
||||
resourcePermission.delete !== false;
|
||||
|
||||
return mergedPermission;
|
||||
|
@ -67,8 +67,10 @@ export class LinkRelObject {
|
||||
if (this.objectAllowed(object)) {
|
||||
if (this.ephemeral) {
|
||||
metadata.add(this.value, namedNode(object), SOLID_META.terms.ResponseMetadata);
|
||||
logger.debug(`"<${metadata.identifier.value}> <${this.value.value}> <${object}>." ` +
|
||||
`will not be stored permanently in the metadata.`);
|
||||
logger.debug(
|
||||
`"<${metadata.identifier.value}> <${this.value.value}> <${object}>." ` +
|
||||
`will not be stored permanently in the metadata.`,
|
||||
);
|
||||
} else {
|
||||
metadata.add(this.value, namedNode(object));
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ export function parseParameters(parameters: string[], replacements: Record<strin
|
||||
// parameter = token "=" ( token / quoted-string )
|
||||
// second part is optional for certain parameters
|
||||
if (!(TOKEN.test(name) && (!rawValue || /^"\d+"$/u.test(rawValue) || TOKEN.test(rawValue)))) {
|
||||
handleInvalidValue(`Invalid parameter value: ${name}=${replacements[rawValue] || rawValue} ` +
|
||||
`does not match (token ( "=" ( token / quoted-string ))?). `, strict);
|
||||
handleInvalidValue(`Invalid parameter value: ${name}=${replacements[rawValue] || rawValue
|
||||
} does not match (token ( "=" ( token / quoted-string ))?). `, strict);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -177,8 +177,11 @@ function parseAcceptPart(part: string, replacements: Record<string, string>, str
|
||||
weight = parseQValue(value);
|
||||
} else {
|
||||
if (!value && map !== extensionParams) {
|
||||
handleInvalidValue(`Invalid Accept parameter ${name}: ` +
|
||||
`Accept parameter values are not optional when preceding the q value`, strict);
|
||||
handleInvalidValue(
|
||||
`Invalid Accept parameter ${name}: ` +
|
||||
`Accept parameter values are not optional when preceding the q value`,
|
||||
strict,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
map[name] = value || '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user