mirror of
https://github.com/rancher-sandbox/rancher-desktop.git
synced 2021-10-13 00:04:06 +03:00
ESLint: Skip no-undef for TypeScript
ESLint doesn't recognize TypeScript built-ins. This is fine, as the TypeScript compiler will error out on undefined variables. Signed-off-by: Mark Yen <mark.yen@suse.com>
This commit is contained in:
11
.eslintrc.js
11
.eslintrc.js
@@ -194,3 +194,14 @@ Object.assign(module.exports.rules, {
|
||||
// Allow using `any` in TypeScript, until the whole project is converted.
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
});
|
||||
|
||||
module.exports.overrides = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
// For TypeScript, disable no-undef because the compiler checks it.
|
||||
// Also, it is unaware of TypeScript types.
|
||||
'no-undef': 'off',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user