Do not use variables before they are declared.
This rule applies only to .js and .ts files.
// code-linter.json5
{
"rules": {
"@typescript-eslint/no-use-before-define": "error"
}
} const a = '10';
console.info(a);
function ff(): void {
console.info('function');
}
ff();
const foo = '1';
export { foo }; console.info(a);
const a = '10';
ff();
function ff(): void {
console.info('function');
}
export { foo };
const foo = '1'; plugin:@typescript-eslint/all
For details about how to configure Code Linter check rules, see Code Linter.