Browse Source

Fixing incorrect documentation for linting (#169)

v6-dev
Eli Perelman 8 years ago
committed by GitHub
parent
commit
5724b5a395
  1. 6
      docs/presets/neutrino-preset-airbnb-base/README.md
  2. 12
      packages/neutrino-middleware-eslint/README.md

6
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'
}
}
});
};

12
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();
```

Loading…
Cancel
Save