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