From 5724b5a3955233d3e1b582e5ef0b5b5e5603e8a8 Mon Sep 17 00:00:00 2001 From: Eli Perelman Date: Thu, 6 Apr 2017 13:42:48 -0500 Subject: [PATCH] Fixing incorrect documentation for linting (#169) --- docs/presets/neutrino-preset-airbnb-base/README.md | 6 ++++-- packages/neutrino-middleware-eslint/README.md | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) 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(); ```