diff --git a/docs/presets/neutrino-preset-airbnb-base/README.md b/docs/presets/neutrino-preset-airbnb-base/README.md index e8daec3..d65387f 100644 --- a/docs/presets/neutrino-preset-airbnb-base/README.md +++ b/docs/presets/neutrino-preset-airbnb-base/README.md @@ -195,8 +195,10 @@ const airbnb = require('neutrino-preset-airbnb-base'); module.exports = neutrino => { neutrino.use(airbnb, { - rules: { - semi: 'off' + eslint: { + rules: { + semi: 'off' + } } }); }; diff --git a/packages/neutrino-middleware-eslint/README.md b/packages/neutrino-middleware-eslint/README.md index 387e5ae..d20e955 100644 --- a/packages/neutrino-middleware-eslint/README.md +++ b/packages/neutrino-middleware-eslint/README.md @@ -106,8 +106,8 @@ document that clearly in your middleware. `neutrino-middleware-eslint` also provides a method for getting the ESLint configuration suitable for use in an eslintrc file. Typically this is used for providing hints or fix solutions to the development environment, e.g. IDEs and text -editors. Doing this requires [creating an instance of the Neutrino API](../../api/README.md) and providing the presets uses. -If you keep this information in `neutrino.presets` in package.json, this should be relatively straightforward. By +editors. Doing this requires [creating an instance of the Neutrino API](https://neutrino.js.org/docs/api) and providing the presets uses. +If you keep this information in `neutrino.use` in package.json, this should be relatively straightforward. By providing all the presets used to Neutrino, you can ensure all the linting options used across all presets will be merged together for your development environment, without the need for copying, duplication, or loss of organization and separation. @@ -116,11 +116,13 @@ _Example: Create a .eslintrc.js file in the root of the project._ ```js // .eslintrc.js -const Neutrino = require('neutrino'); +const { Neutrino } = require('neutrino'); const pkg = require('./package.json'); -const api = new Neutrino(); +const api = Neutrino(); -pkg.neutrino.presets.map(preset => neutrino.use(preset)); +pkg.neutrino.use + .map(require) + .map(api.use); module.exports = api.eslintrc(); ```