mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
chore(inputs): remove allowedLineEnding rule as it is to heavy
This commit is contained in:
3 files changed
-14
No files matched your search
@@ -34,7 +34,6 @@ export enum Input {
|
||||
AllowedPaths = "allowed-paths",
|
||||
BlockedPaths = "blocked-paths",
|
||||
RequireFinalNewline = "require-final-newline",
|
||||
AllowedLineEnding = "allowed-line-ending",
|
||||
|
||||
// User Health Checks
|
||||
MinRepoMergedPrs = "min-repo-merged-prs",
|
||||
|
||||
@@ -12,7 +12,6 @@ const VALID_AUTHOR_ASSOCIATIONS = [
|
||||
"NONE",
|
||||
"OWNER",
|
||||
];
|
||||
const VALID_LINE_ENDINGS = ["lf", "crlf", "cr"];
|
||||
|
||||
function parseList(raw: string): string[] {
|
||||
return raw
|
||||
@@ -57,7 +56,6 @@ export function getSettings(): Settings {
|
||||
allowedPaths: core.getMultilineInput(Input.AllowedPaths),
|
||||
blockedPaths: core.getMultilineInput(Input.BlockedPaths),
|
||||
requireFinalNewline: core.getBooleanInput(Input.RequireFinalNewline),
|
||||
allowedLineEnding: core.getInput(Input.AllowedLineEnding),
|
||||
|
||||
// User Health Checks
|
||||
minRepoMergedPrs: parseInt(core.getInput(Input.MinRepoMergedPrs)),
|
||||
@@ -146,14 +144,4 @@ function validateSettings(settings: Settings): void {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
settings.allowedLineEnding !== "" &&
|
||||
!VALID_LINE_ENDINGS.includes(settings.allowedLineEnding)
|
||||
) {
|
||||
throw new Error(
|
||||
`"allowed-line-ending" must be one of ${VALID_LINE_ENDINGS.join(", ")} or empty, ` +
|
||||
`got "${settings.allowedLineEnding}"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,6 @@ export interface Settings {
|
||||
allowedPaths: string[];
|
||||
blockedPaths: string[];
|
||||
requireFinalNewline: boolean;
|
||||
allowedLineEnding: string;
|
||||
|
||||
// User Health Checks
|
||||
minRepoMergedPrs: number;
|
||||
|
||||
Reference in new issue
Block a user