How to configure eslint and tsconfig? #1107
Unanswered
danielo515
asked this question in
Q&A
Replies: 2 comments
-
You may need to "Reload Window" if you had your I'd have to google for how to configure the eslint rules. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It was not as simple as just letting TS pick the types, eslint does not immmediately understand TS. module.exports = {
env: {
es2021: true,
node: true,
},
extends: 'xo',
overrides: [
{
extends: ['xo-typescript'],
files: ['*.ts'],
},
],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
rules: {},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I'm really interested in having my project be properly linted and type checked.
Currently, I'm getting lots of eslint errors because undefined globals, and I was wondering how can I configure so eslint and typescript knows about the same globals?
Beta Was this translation helpful? Give feedback.
All reactions