fix: no longer need to run yarn watch to fix eslint unresolved imports in vs code

This commit is contained in:
William Grant 2023-09-01 16:08:20 +10:00
parent 22036000a6
commit db8c309954
2 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,11 @@ module.exports = {
root: true,
settings: {
'import/core-modules': ['electron'],
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
react: {
version: 'detect',
},

View File

@ -1,4 +1,10 @@
const ignoredFiles = ['package.json', 'yarn.lock', 'tsconfig.json', '.lintstagedrc.js'];
const ignoredFiles = [
'package.json',
'yarn.lock',
'tsconfig.json',
'.lintstagedrc.js',
'.eslintrc.js',
];
const path = require('path');
@ -15,7 +21,7 @@ const buildLintCommand = filenames => {
.map(f => path.relative(process.cwd(), f))
.filter(f => !ignoredFiles.includes(f));
return results.length ? `eslint ${results.join(' ')}`: '';
return results.length ? `eslint ${results.join(' ')}` : '';
};
module.exports = {