Repository URL to install this package:
|
Version:
0.0.10 ▾
|
| package.json |
| index.js |
| README.md |
This module contains the default ESLint configuration for Doodle Javascript modules.
Add eslint and @doodle/eslint-config to the devDependencies
$ yarn add -D eslint @doodle/eslint-config
Create a .eslintrc.js file in your project's root directory and extend the default configuration.
// File: web-my-frontend/.eslintrc.js module.exports = { "extends": "@doodle" // Add here your custom rules };
You must run the local installation of ESLint and not the global one, otherwise the custom configuration won't be found. This is the error that would pop up if you use the global ESLint:
Error: Cannot find module '@doodle/eslint-config'
The correct ways of running eslint are as follows:
$ npx eslint src
or
$ ./node_modules/.bin/eslint src
Right now, a single ESLint configuration is enough for our frontends. If things change in the future, we can use this module to provide more than one default configuration. You can refer to the ESLint documentation on multiple configs.
When you want to publish a new version of the module, you can simply update the version in the package.json and run the following command.
$ npm publish