eslint: fix typescript undefined globals
This commit is contained in:
parent
894bf1e880
commit
8c7a7fd7dc
14
.eslintrc.js
14
.eslintrc.js
|
@ -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',
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue