refactor: Replace linting configurations

The previous package was outdated, preventing us from updating TS.
This one also lints YAML and JSON,
and applies many more rules to the test files,
explaining all the changes in this PR.
This commit is contained in:
Joachim Van Herwegen
2023-10-27 11:28:57 +02:00
parent 58daeb684f
commit 6248ed0938
327 changed files with 6424 additions and 3375 deletions

View File

@@ -70,17 +70,17 @@ export class AcpHelper {
accessControlResource: {
iri: joinUrl(baseUrl, v4()),
accessControl: policies ?
[{
iri: joinUrl(baseUrl, v4()),
policy: [ ...policies ],
}] :
[],
[{
iri: joinUrl(baseUrl, v4()),
policy: [ ...policies ],
}] :
[],
memberAccessControl: memberPolicies ?
[{
iri: joinUrl(baseUrl, v4()),
policy: [ ...memberPolicies ],
}] :
[],
[{
iri: joinUrl(baseUrl, v4()),
policy: [ ...memberPolicies ],
}] :
[],
},
};
}

View File

@@ -12,7 +12,7 @@ export default async function(): Promise<void> {
// Also set the logger factory of transpiled JS modules
// (which are instantiated by Components.js)
try {
// eslint-disable-next-line global-require,@typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports
// eslint-disable-next-line ts/no-var-requires,ts/no-require-imports
const dist = require('../../dist/logging/LogUtil');
dist.setGlobalLoggerFactory(loggerFactory);
} catch {

View File

@@ -38,12 +38,10 @@ const portNames = [
'BaseServerFactory',
] as const;
/* eslint-disable @typescript-eslint/naming-convention */
// These are ports that are not allowed to change for various reasons
const fixedPorts = {
V6Migration: 6999,
} as const;
/* eslint-enable @typescript-eslint/naming-convention */
const socketNames = [
// Unit