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

@@ -1,4 +1,4 @@
import { YargsParameter, YargsCliExtractor } from '../../../../src/init/cli/YargsCliExtractor';
import { YargsCliExtractor, YargsParameter } from '../../../../src/init/cli/YargsCliExtractor';
const error = jest.spyOn(console, 'error').mockImplementation(jest.fn());
const log = jest.spyOn(console, 'log').mockImplementation(jest.fn());
@@ -76,7 +76,6 @@ describe('A YargsCliExtractor', (): void => {
// This can probably be fixed by changing jest setup to already load the custom env before loading the tests,
// but does not seem worth it just for this test.
const { env } = process;
// eslint-disable-next-line @typescript-eslint/naming-convention
process.env = { ...env, TEST_ENV_PORT: '3333' };
extractor = new YargsCliExtractor(parameters, { loadFromEnv: true, envVarPrefix: 'TEST_ENV' });
const argv = [ 'node', 'script', '-b', 'http://localhost:3333/' ];