I created a new React Native project with --template typescript
I deleted the template directory which came as part of the boilerplate.
I then proceeded to add ESLint:
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["airbnb-typescript-prettier"]
};
However, when I open babel.config.js, I get this error
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config:
/Users/Dan/site/babel.config.js.The file must be included in at least one of the projects provided.eslint
babel.config.jsin thetsconfig.jsfile: "include": [ "next-env.d.ts", "*/.ts", "*/.tsx", "postcss.config.js", ".eslintrc.js" ] - Himanshu Tanwarbabel.config.js, just don't parse it with ESLint TypeScript parser. Take a look at my answer for another approach, parsing only TS files. - Rafael Tavares