From the course: Node.js: Testing and Code Quality

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Extending an ESLint shareable config

Extending an ESLint shareable config

From the course: Node.js: Testing and Code Quality

Extending an ESLint shareable config

- [Instructor] One of the nice features of ESLint is the ability to extend an existing ESLint configuration. These are known as shareable configs. Practically, a shareable config is just an npm package that exports an ESLint configuration object. The name of the package must begin with "enslint-config-" then the name of the configuration. Shareable configs can be published on npm to share with others. I always like the open source approach. They can also be kept private, which works well for organizational standards that may include proprietary justification or context. There are two steps necessary for using a shareable config. First, add the package to the development dependencies of the project and install it. Then update the ESLint configuration to include the extends property and the name of the configuration that it extends. For example, "extends": "enslint-config-myconfig." There's a shorthand as well, which…

Contents