frontend-standards-checker
Version:
A comprehensive frontend standards validation tool with TypeScript support
66 lines • 2.59 kB
TypeScript
import type { IValidationError } from '../types/additionalValidators.type';
/**
* Check for inline styles
*/
export declare function checkInlineStyles(content: string, filePath: string): IValidationError[];
/**
* Check for commented code
*/
export declare function checkCommentedCode(content: string, filePath: string): IValidationError[];
/**
* Check for hardcoded data
*/
export declare function checkHardcodedData(content: string, filePath: string): IValidationError[];
/**
* Check for missing comments in complex functions
* This function analyzes JavaScript/TypeScript code to identify functions with high complexity
* that lack proper documentation. It calculates complexity based on control flow structures,
* async operations, array methods, and function length. Functions exceeding complexity
* thresholds require explanatory comments or JSDoc documentation.
*/
export declare function checkFunctionComments(content: string, filePath: string): IValidationError[];
/**
* Check for unused variables
*/
export declare function checkUnusedVariables(content: string, filePath: string): IValidationError[];
/**
* Check for function naming conventions
*/
export declare function checkFunctionNaming(content: string, filePath: string): IValidationError[];
/**
* Check for interface naming conventions
*/
export declare function checkInterfaceNaming(content: string, filePath: string): IValidationError[];
/**
* Check for style conventions
*/
export declare function checkStyleConventions(content: string, filePath: string): IValidationError[];
/**
* Check for enums outside types folder
*/
export declare function checkEnumsOutsideTypes(filePath: string): IValidationError | null;
/**
* Check for hook file extension
*/
export declare function checkHookFileExtension(filePath: string): IValidationError | null;
/**
* Check for asset naming conventions
*/
export declare function checkAssetNaming(filePath: string): IValidationError | null;
/**
* Check naming conventions for files
*/
export declare function checkNamingConventions(filePath: string): IValidationError | null;
/**
* Check directory naming conventions
*/
export declare function checkDirectoryNaming(dirPath: string): IValidationError[];
/**
* Check component structure
*/
export declare function checkComponentStructure(componentDir: string): IValidationError[];
/**
* Check component function name matches folder name
*/
export declare function checkComponentFunctionNameMatch(content: string, filePath: string): IValidationError | null;
//# sourceMappingURL=additional-validators.d.ts.map