From ca92b00241f2aaa5f54a07c211d4362ec3a9ed65 Mon Sep 17 00:00:00 2001 From: constgen Date: Sun, 14 May 2017 22:32:32 +0300 Subject: [PATCH] Add description how to ignore files in an IDE lint --- packages/neutrino-middleware-eslint/README.md | 13 +++++++++++++ packages/neutrino-preset-airbnb-base/README.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/packages/neutrino-middleware-eslint/README.md b/packages/neutrino-middleware-eslint/README.md index d20e955..224fdd9 100644 --- a/packages/neutrino-middleware-eslint/README.md +++ b/packages/neutrino-middleware-eslint/README.md @@ -127,6 +127,19 @@ pkg.neutrino.use module.exports = api.eslintrc(); ``` +Projects authors may also face the problem when their code editor lints all files in the project and highlights errors in all of them. It ignores Neutrino `include` and `exclude` options. This is because editors use CLI to call ESLint instead of Neutrino infrastructure. + +Unfortunatly ESlint doesn't provide possibility to configure ignored paths from `.neutrino.js` to exclude them from linting. Projects authors should define this manually in their project root directory in `.eslintignore` file. + +*.eslintignore:* + +``` +/build +/*.* +``` + +This paths exactly will exclude built files and any files in the root directory (e.g. custom Neutrino configuration) but `src` and `test` folders will be still checked. `/node_modules` are ignored by default in ESLint. More information can be found in the [ESLint user guide](http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) + ## Contributing This preset is part of the [neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev) repository, a monorepo diff --git a/packages/neutrino-preset-airbnb-base/README.md b/packages/neutrino-preset-airbnb-base/README.md index a5d3af3..3213563 100644 --- a/packages/neutrino-preset-airbnb-base/README.md +++ b/packages/neutrino-preset-airbnb-base/README.md @@ -251,6 +251,19 @@ pkg.neutrino.use module.exports = api.eslintrc(); ``` +Projects authors may also face the problem when their code editor lints all files in the project and highlights errors in all of them. It ignores Neutrino `include` and `exclude` options. This is because editors use CLI to call ESLint instead of Neutrino infrastructure. + +Unfortunatly ESlint doesn't provide possibility to configure ignored paths from `.neutrino.js` to exclude them from linting. Projects authors should define this manually in their project root directory in `.eslintignore` file. + +*.eslintignore:* + +``` +/build +/*.* +``` + +This paths exactly will exclude built files and any files in the root directory (e.g. custom Neutrino configuration) but `src` and `test` folders will be still checked. `/node_modules` are ignored by default in ESLint. More information can be found in the [ESLint user guide](http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) + ## Contributing This preset is part of the [neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev) repository, a monorepo