Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

babel-eslint vs eslint-plugin-babel vs eslint-plugin-react?

What is the difference between the libraries?

  • babel-eslint [github.com/babel/babel-eslint]
  • eslint-plugin-babel [github.com/babel/eslint-plugin-babel]
  • eslint-plugin-react [github.com/yannickcr/eslint-plugin-react]
like image 254
Ahmed Abbas Avatar asked Feb 16 '16 00:02

Ahmed Abbas


People also ask

What is babel-eslint used for?

babel-eslint is a parser that allows you to use ESLint with code that is supported by Babel (ES6+ features, flow types, etc.). ESLint on it's own only supports ES6, JSX and object rest/spread. Anything beyond that, requires babel-eslint .

Does ESLint require Babel?

You only need to use babel-eslint if you are using types (Flow) or experimental features not supported in ESLint itself yet. Otherwise try the default parser (you don't have to use it just because you are using Babel).

What is ESLint plugin react?

Basically, it is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. It analyzes your code quickly, finds any problems in your code, and even fixes them automatically. In this article, we are going to explore four essential ESLint plugins you will need in your React setup.


Video Answer


1 Answers

  • babel-eslint is a parser that allows you to use ESLint with code that is supported by Babel (ES6+ features, flow types, etc.). ESLint on it's own only supports ES6, JSX and object rest/spread. Anything beyond that, requires babel-eslint.
  • eslint-plugin-babel is a plugin that fixes/adds a few rules that work with ES7 and beyond features.
  • eslint-plugin-react is a plugin that adds a bunch of rules specific to React applications.
like image 143
Ilya Volodin Avatar answered Oct 30 '22 13:10

Ilya Volodin