global-linters
Linter wrapper for globally installed linters.
Table of contents
Badges
 | Code style | Prettier |
 | Commit style | Conventional Commits |
 | Code coverage | Codecov |
 | CI status: Build and test | Shippable |
 | CI status: Commit style | Travis CI |
 | npm package version | npm |
CLI
Run the CLI without any arguments to see the options. The options are also described in the table and paragraphs below.
linter | Required | String [hadolint , shellcheck ] | details |
glob | Required | String | details |
--ignore-path , -i | Optional | String | details |
--range , -r | Optional | String | details |
--options | Optional | String | details |
—version , -v | Optional | Boolean | details |
—help , -h | Optional | Boolean | |
linter
Linter to run. Currently the list below shows the supported linter. If your favourite linter is not supported, please create a ticket to discuss adding support for it.
glob
Glob pattern for searching files. The glob syntax of the glob module is used, so the given pattern must be according to the syntax of node-glob.
--ignore-path
, -i
Path to a file containing patterns that describe files to ignore. By default it looks for ./.prettierignore
. The patterns in the ignore file should be according to the .gitignore specification.
--range
, -r
Version range the linter must satisfy. The range must be specified according to the node-semver ranges specification and will show an error otherwise. This option only works if the linter supports a version option, which for some linters is not included in early versions. The table below shows for which versions of each supported linter the range option is supported.
--options
Options to pass to the linter. When using string arguments that include dashes (-
), those will be seen as a separate option by the shell instead of part of the string. The problem is that shells like bash tend to strip quotes. The solution for this is to wrap the string in two sets of quotes of which there are two options.
-
Use double quotes inside single quotes.
--options '"--hello -x=yes -v"'
-
Use escaped double quotes inside double quotes.
--options "\"--hello -x=yes -v\""
--version
, -v
Display only the version number and exit the process.
API
These docs will be added in the first (full) release 1.0.0.
License
This project is licensed under the GPLv3 license.
Copyright © 2019 Jeroen de Bruijn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
The full text of the license is available in the LICENSE.md file in this repository and online.