chore: clean up ESLint config, enable a few rules (#6514)

* chore: clean up ESLint config, enable a few rules

* enable max-len for comments

* fix build
This commit is contained in:
Joshua Chen 2022-01-31 10:31:24 +08:00 committed by GitHub
parent b8ccb869f1
commit aa446b7a9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
167 changed files with 1157 additions and 960 deletions

View file

@ -58,12 +58,11 @@ export function normalizePluginOptions<T extends {id?: string}>(
if (isValidationDisabledEscapeHatch) {
logger.error(error);
return options as T;
} else {
throw error;
}
throw error;
}
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
return value!; // TODO remove this ! in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
}
export function normalizeThemeConfig<T>(
@ -86,11 +85,10 @@ export function normalizeThemeConfig<T>(
if (isValidationDisabledEscapeHatch) {
logger.error(error);
return themeConfig as T;
} else {
throw error;
}
throw error;
}
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
return value!; // TODO remove this ! in TS 4.6
}
export function validateFrontMatter<T>(
@ -120,5 +118,5 @@ ${errorDetails.map(({message}) => message)}
throw error;
}
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
return value!; // TODO remove this ! in TS 4.6
}