最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is ".eslintrc.js" in React Native? - Stack Overflow

programmeradmin2浏览0评论

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?

Share Improve this question edited Nov 22, 2019 at 8:06 Mahdi Bashirpour asked Nov 22, 2019 at 7:39 Mahdi BashirpourMahdi Bashirpour 18.9k17 gold badges131 silver badges152 bronze badges 2
  • 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
Add a ment  | 

3 Answers 3

Reset to default 3

The 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.

发布评论

评论列表(0)

  1. 暂无评论