The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Linting React JSX with ESLint (in ES6)

Linting React JSX with ESLint (in ES6)

4:55
ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through setting up ESLint in a project, using the `eslint --init` CLI tool with the JSX and ES6 options, writing a React component in JSX, and adding some extra react linting rules with a plugin. ESLint is built to be "pluggable" with simple, extendable, modular rules and an API for writing and using plugins. ESLint has many rules which are all turned off by default; you can extend the core "recommended" rules which will catch common JavaScript errors, and you can also turn on stylistic rules for code consistency. You can also use plugin rules which we do in this lesson with the `eslint-plugin-react` package.
Watch this lesson now
Avatar
egghead.io

ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through setting up ESLint in a project, using the eslint --init CLI tool with the JSX and ES6 options, writing a React component in JSX, and adding some extra react linting rules with a plugin. ESLint is built to be "pluggable" with simple, extendable, modular rules and an API for writing and using plugins. ESLint has many rules which are all turned off by default; you can extend the core "recommended" rules which will catch common JavaScript errors, and you can also turn on stylistic rules for code consistency. You can also use plugin rules which we do in this lesson with the eslint-plugin-react package.

Avatar
tyler

Thanks for the demo, what Atom linter are you using?

In reply to egghead.io
Avatar
Trevor

Thanks Tyler! I'm using the "AtomLinter" linter package with the linter-eslint package; I set the package settings to look for an .eslintrc in the project and use that. The Atom Linter website is pretty cool if you want to dig into other linting options for Atom. Hope this helps!

In reply to tyler
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?