eslint: fix typescript undefined globals

This commit is contained in:
Alex Gleason 2022-03-09 13:23:52 -06:00
parent 894bf1e880
commit 8c7a7fd7dc
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 10 additions and 4 deletions

View File

@ -40,9 +40,7 @@ module.exports = {
react: { react: {
version: 'detect', version: 'detect',
}, },
'import/extensions': [ 'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'.js',
],
'import/ignore': [ 'import/ignore': [
'node_modules', 'node_modules',
'\\.(css|scss|json)$', '\\.(css|scss|json)$',
@ -257,9 +255,17 @@ module.exports = {
overrides: [ overrides: [
{ {
files: ['**/*.tsx'], files: ['**/*.tsx'],
'rules': { rules: {
'react/prop-types': 'off', 'react/prop-types': 'off',
}, },
}, },
// Disable no-undef in TypeScript
// https://stackoverflow.com/a/69155899
{
files: ['*.ts', '*.tsx'],
rules: {
'no-undef': 'off',
},
},
], ],
}; };