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

xlint

v0.2.2

Published

Powerful CLI for any lint (JSLint/JSHint +) solution.

Downloads

120

Readme

xlint

Powerful CLI for any lint solution

Usage

$ xlint [options] [<paths>]

for example:

$ xlint --linter=path/to/jslint-module.js project/path

Interested in live console?

$ xlint --watch --linter=path/to/jslint-module.js project/path

Installation

$ npm install -g xlint

Options

  • linter path - Path to linter module. It must be CJS module, see e.g. xlint-jslint for JSLint provided as one
  • cache bool - Whether to cache generated reports. Very useful if we rerun the script on large projects. Cached reports are saved into .lintcache file in your project main directory [default: true]
  • color bool - Colorize console output [default: true]
  • depth number - How deeply to recurse into subdirectories [default: Infinity]
  • ignoreRules string - Whether to obey rules found in ignore files (Currently just git for .giitignore rules is supported). It's backed by fs2.isIgnored [default: git]
  • stream bool - Whether to generate reports on the go (as soon as first filenames are obtained) [default: true]
  • watch bool - Output reports in live console which updates after code or configuration files are updated [default: false]

Ignoring specific files and directories

Apart of support for .gitignore rules, XLint also looks for rules in .lintignore files. Syntax rules for those files is same as for .gitignore files.

Configuration files

XLint supports external .lint configuration files, through which we may setup options that are passed to linter. There can be many_.lint_ files placed in any directory within project

File format is similar to conf files as we know them from *nix systems:

# This is a comment, any of this are ignored by the parser

@root                     # Root of a project, means that any rules found in upper directories won't have effect

plusplus                  # Regular boolean option
indent 2                  # Numeric option
predef console, window    # Array of strings

./foo.js                  # Options that would only address foo.js file
!plusplus                 # Overridden boolean option (set to false)
predef+ XMLHttpRequest    # Add token to array option
predef- console           # Remove token from array option

./some-dir                # Options that address only files within given directory
predef foo, bar           # Override array option
otherarr one,             # Other array option, if we set just one token, we need to post-fix it with comma

JSHint case

XLint doesn't support options defined in jshintrc files.
JSHint separates global variable settings from other options, but in XLint configuration files, global should be defined same as other options (as e.g. predef for JSLint), it will be passed to JSHint as expected.

Tests Build Status

$ npm test