From the course: ESLint: Checking for Syntax and Logic Errors

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Flagging issues in functions

Flagging issues in functions

From the course: ESLint: Checking for Syntax and Logic Errors

Start my 1-month free trial

Flagging issues in functions

- [Instructor] My project includes some test code for the ESLint rules and writing. In the files for this course I'm in the Error Checking folder and within that the Source folder contains index.js. And immediately when I open that up I see the ESLint is reporting an error here on line six. And when I hover that I have this error argument name clash. So my function has duplicate argument names. Which is generally a result of mistyping. Notice as this flags a parsing error. Which is separate from the customizable rules. Now there is a rule that covers the same case. No-dupe-args. It flags code for a function with a repeated argument name. In my code the parser flags this because I'm using a module. And modules are always evaluated in strict mode. So the parser error checking happens before the configurable rules. But in this case I want to use my rules on code that's not running in strict mode. So I'll go ahead…

Contents