From the course: Angular: Testing and Debugging
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Basic ESLint configuration - Angular Tutorial
From the course: Angular: Testing and Debugging
Basic ESLint configuration
- [Narrator] In the last video we installed ESLint. in this video, we'll take a look at ESLint's config file. The config file lives in the root of your project. You can use JavaScript, Json or Yaml for your config file syntex. I'm using JavaScript here because that's what I use most often, but you can use the file format that works best for your project. The ENV property gives you predefined global variables for things like the browser, node, and service workers. For angular projects I recommend adding node, Jasmine, and Protractor to this list. - ESLint config files can inherit properties and rules from other config files. Use the extends property here, to list one or more base configs you want to extend from. I like to add the import errors, import warnings, and import TypeScript plugins to my config. These plugins look for issues with import statements. We'll also need to add the NPM package for the plugin. I'll make a new terminal window, type NPM install, ESLint, dash plugin…