Could you provide guidance on setting up ESLint, Prettier, and TypeScript in React Native? I'm currently using absolute paths to specify components. Can you confirm if this setup is correct?
tsconfig
{
"extends": "@tsconfig/react-native/tsconfig.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"@types/index.d.ts",
".eslintrc.js"
],
"compilerOptions": {
"jsx": "react-native",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
...
// Paths continue here
...
}
}
}
babel.config.js
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
plugins: [
...
// Plugins configuration continued below
...
],
};
@tsconfig/react-native/tsconfig.json
{
...
// Compiler options for tsconfig file
...
}
.eslintrc.js
module.exports = {
...
// ESLint configuration settings
...
};
.prettier.js
module.exports = {
tabWidth: 4,
semi: true,
singleQuote: false,
trailingComma: "all",
};
I'm getting an ESLint error in my babel.config.js file with a message that says "Parsing error: ESLint was configured to run on /babel.config.js using parserOptions.project." Any ideas on what might be causing this issue?