superlint/docs/disabling-linters.md
dependabot[bot] c266045e2b
Bump textlint-rule-terminology from 3.0.1 to 3.0.3 in /dependencies (#3247)
* Bump textlint-rule-terminology from 3.0.1 to 3.0.3 in /dependencies

Bumps [textlint-rule-terminology](https://github.com/sapegin/textlint-rule-terminology) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/sapegin/textlint-rule-terminology/releases)
- [Commits](https://github.com/sapegin/textlint-rule-terminology/compare/v3.0.1...v3.0.3)

---
updated-dependencies:
- dependency-name: textlint-rule-terminology
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix linting errors

* Fix linting errors

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marco Ferrari <ferrari.marco@gmail.com>
2022-09-28 18:27:12 +02:00

2.7 KiB

Disabling linters and Rules

Linters can often require additional configuration to ensure they work with your codebase and your team's coding style, to avoid flagging false-positives. The GitHub Super-Linter has set up some default configurations for each linter which should work reasonably well with common code bases, but many of the linters can be configured to disable certain rules or configure the rules to ignore certain pieces of codes.

To run with your own configuration for a linter, copy the relevant TEMPLATE configuration file for the linter you are using from this repository into the .github/linters/ folder in your own repository, and then edit it to modify, disable - or even add - rules and configuration to suit how you want your code checked.

How the changes are made differ for each linter, and also how much the GitHub Super-Linter has decided to change the linter's defaults. So, for some linters (e.g. pylint for python), there may be a large configuration file. For others (e.g. stylelint for CSS) the default configuration file may initially be nearly empty. And for some (e.g. StandardJS) it may not be possible to change configuration at all so there is no Template file.

Where a configuration file exists in your repository, it will be used in preference to the default one in the GitHub Super-Linter TEMPLATES directory (not in addition to it), and where one doesn't exist the TEMPLATES version will be used. So you should copy the complete configuration file you require to change from the TEMPLATES directory and not just the lines of config you want to change.

It is possible to have custom configurations for some linters, and continue to use the default from TEMPLATES directory for others, so if you use Python and JavaScript and only need to tweak the Python rules, then you only need to have a custom configuration for pylint and continue to use the default TEMPLATE from the main repository for ESLint, for example.

For some linters it is also possible to override rules on a case by case level with directives in your code. Where this is possible we try to note how to do this in the specific linter sections below, but the official linter documentation will likely give more detail on this.

NOTE: Please view each linters source and web page from the Supported Linters README to see additional information on how to configure, disable, or tune additional rules.