npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

global-linters

v0.1.5

Published

Linter wrappers for globally installed linters

Downloads

3

Readme

global-linters

Linter wrapper for globally installed linters.

Table of contents

Badges

| Badge | Description | Service | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------------- | | | 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.

| Argument | Usage | Type | Reference | | --------------------- | ---------- | --------------------------------- | --------------------------- | | 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.

  • hadolint - Dockerfile Linter

    A smarter Dockerfile linter that helps you build best practice Docker images. The linter is parsing the Dockerfile into an AST and performs rules on top of the AST. It is standing on the shoulders of ShellCheck to lint the Bash code inside RUN instructions.

  • shellcheck - A shell script static analysis tool

    The goals of ShellCheck are

    • To point out and clarify typical beginner's syntax issues that cause a shell to give cryptic error messages.
    • To point out and clarify typical intermediate level semantic problems that cause a shell to behave strangely and counter-intuitively.
    • To point out subtle caveats, corner cases and pitfalls that may cause an advanced user's otherwise working script to fail under future circumstances.

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.

| Linter | Range option supported from version | Reference | | ---------- | ----------------------------------- | ----------------------------------------------------------------------------- | | hadolint | >=1.2.0 | v1.2 release notes. | | shellcheck | >=0.3.1 | Commit 4e5d32b. |

--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.

  1. Use double quotes inside single quotes.

    --options '"--hello -x=yes -v"'
  2. 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.