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

mimosa-jshint

v2.2.0

Published

A JSHint module for Mimosa

Downloads

88

Readme

mimosa-jshint

This is Mimosa's JavaScript hinting module. It is soon to be a Mimosa default module but can be used in any scenario.

  • For more information regarding Mimosa, see http://mimosa.io
  • For more info about jshint, check out http://www.jshint.com/

Usage

Add 'jshint' to your list of modules. That's all! Mimosa will install the module for you when you start mimosa watch or mimosa build.

Functionality

When mimosa watch or mimosa build are executed this module will run jshint over your project's JavaScript files. This includes both regular .css as well as the output of transpilers like CoffeeScript or Esperanto. jshint can be run on vendor files, but that is by default turned off.

Default Config

jshint: {
  exclude:[],
  compiled: true,
  copied: true,
  vendor: false,
  executeAfterCompile: true,
  rules: {},
  jshintrc: ".jshintrc"  
}

jshint.exclude array of string/regex

Files to exclude from linting. This setting is an array and can be comprised of strings or regexes. Strings are paths that can be relative to the watch.compiledDir or absolute. String paths must include the file name.

jshint.compiled boolean

When this property is set to true, compiled JavaScript (i.e. CoffeeScript/LiveScript) will be jshinted.

jshint.copied boolean

When this property is set to true, copied JS will be jshinted.

jshint.vendor boolean

When this property is set to true, vendor JS will be jshinted. What files are vendor is determined by Mimosa core. Mimosa has a vendor setting which indicates where vendor files are located.

executeAfterCompile boolean

Determines whether JSHint runs on code before or after it is compiled. This defaults to true which means that JSHint runs on compiled code. So, for instance, it would not run on CoffeeScript, instead it would run on the compiled JavaScript. You may find you want to run on pre-compiled code. Some compilers, like Babel will transform the style of the code when it compiles it. If running on the compiled output of Babel, JSHint will have many problems that cannot be avoided.

jshint.rules object

If you disagree with any of the jshint settings, or want to turn some of the rules off, add overrides as key/value pairs underneath this property.

jshint.jshintrc string

Location of a .jshintrc file if one exists. Mimosa will look up the file structure in an attempt to find this file, eventually stopping at the file system root.

Default rules for CoffeeScript and Iced CoffeeScript

Both CoffeeScript and Iced CoffeeScript compile to JavaScript that fail several JS hint validations. There is no way around the compiled code triggering the jshint validations. Because of this, this module automatically sets the following rules when validating Coffee/Iced files.

{
  boss: true,
  eqnull: true,
  shadow: true,
  expr: true
}