I am using React Native version 0.61.4 where the .eslintrc.js
file caught my eye.
What is .eslintrc.js
and what is its use in the React Native?
I am using React Native version 0.61.4 where the .eslintrc.js
file caught my eye.
What is .eslintrc.js
and what is its use in the React Native?
- 1 eslint/docs/user-guide/configuring – jonrsharpe Commented Nov 22, 2019 at 7:40
- linter for your code base, you decide your lint rules. – Kerem atam Commented Nov 22, 2019 at 7:42
3 Answers
Reset to default 3The file.eslintrc.js is a configuration file for a tool named ESLINT.
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs. In many ways, it is similar to JSLint and JSHint with a few exceptions:
- ESLint uses Espree for JavaScript parsing.
- ESLint uses an AST to evaluate patterns in code.
- ESLint is pletely pluggable, every single rule is a plugin and you can add more at runtime.
Source: https://eslint/docs/user-guide/getting-started
It is ESlint configuration file.
ESLint statically analyzes your code to quickly find problems. ... Many problems ESLint finds can be automatically fixed. Fixes are syntax-aware so you won't experience errors introduced by traditional find-and-replace algorithms.
More information about ESlint and configuration you can find here https://eslint/docs/user-guide/configuring
It is not related to react-native
, but to eslint. Which is probably the most popular js linter.
In a nut shell it is a configuration file for eslint.