DEV Community

Cover image for "ESLint was configured to run ... However, that TSConfig does not / none of those TSConfigs include this file"
YURII DE.
YURII DE.

Posted on

"ESLint was configured to run ... However, that TSConfig does not / none of those TSConfigs include this file"

Linting with Type Information
Some typescript-eslint rules utilize the awesome power of TypeScript's type checking APIs to provide much deeper insights into your code. To tap into TypeScript's additional powers, there are two small changes you need to make to your config file:

.eslintrc.cjs



/* eslint-env node */
module.exports = {
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended-type-checked', // change
  ],
  plugins: ['@typescript-eslint'],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    project: true, // change
    tsconfigRootDir: __dirname,
  },
  root: true,
};


Enter fullscreen mode Exit fullscreen mode

Image description

Top comments (1)

Collapse
 
dsnunez profile image
Daniela Núñez

Thanks! This solved my issue :)