Skip to main content

require or disallow initialization in variable declarations (init-declarations)

Rule Details

This rule extends the base eslint/init-declarations rule. It adds support for TypeScript's declare variables.

How to Use

// note you must disable the base rule as it can report incorrect errors
"init-declarations": "off",
"@typescript-eslint/init-declarations": ["error"]


See eslint/init-declarations options.

Taken with โค๏ธ from ESLint core


  • โœ… Recommended
  • ๐Ÿ”ง Fixable
  • ๐Ÿ’ญ Requires type information