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

make-up

v10.0.0

Published

Handle configurations for Holiday Extras

Downloads

1,079

Readme

Build Status Dev Dependency Status

About

All of the configs for all of the linters and some third party tools.

Usage

Install

npm install make-up --save-dev

Any existing eslint ruleset will be removed from the current directory upon installation. You should ignore .eslintrc and .eslintcache from your version control system.

Consume

This library's functions can be run programmatically:

var makeup = require('make-up');
var options = {
  dirs: []
};
makeup.check(options, function(error, results) {
  ...
});
  • scss-lint - config: makeup.path( 'scss-lint.yml' )

Not that if you use Make-up with scss-lint, you need version 0.34+

Integrations

Make-up currently features integrations with:

All integrations are enabled by default. You can use the -i command line switch to pass a comma separated list of explicitly enabled integrations. For example:

node_modules/.bin/make-up -i eslint

will only run the ESLint integration.

node_modules/.bin/make-up -i eslint,snyk

will run both the ESLint and Snyk integrations.

Linting

To lint all the files in specific directories run the following:

node_modules/.bin/make-up directory1 directory2

The current directory is always automatically included.

This will automatically download the lint ruleset from Holiday Extras culture repo and check any JS or JSX files found.

If any errors are found a non zero exit status will be returned equal to the number of errors.

Limiting by date

To only check files newer than a specific date, use the following option:

node_modules/.bin/make-up -s 'Sun, 09 Oct 2011 23:24:11 GMT' directory1 directory2
node_modules/.bin/make-up -s 'Tue Jun 09 2015 14:49:57 GMT+0100 (BST)' directory1 directory2

The -s (since) argument can be in any format that the JS Date constructor supports.

Limiting by changes compared to git branch

To only check files that were modified in the current git branch compared to a specified git branch (typically master), use the -b command line switch followed by the branch name as in the following example:

node_modules/.bin/make-up -b master directory1 directory2

⚠️Note: if the HEAD branch you're comparing the current branch with is no longer the branch point for the current branch (i.e. new commits were made there meanwhile), this switch will naturally also lint the changed files in the new commits of the branch you're comparing with. You'll need to merge or rebase he compare to branch to go back to linting only the changed files in the current branch.

Extending

To add a new integration to this project follow the steps below:

  1. Create a new js module in the lib/integrations directory.
  2. Make sure this module exports an object.
  3. Create a function named run on the new integration object, this will take three arguments; an options object, a writable stream and callback function.
  4. The run function will output any detail to the user using the provided stream.
  5. The run function will run the given callback in the usual node manner with the first argument being set as an error object and the second being the given writeable stream.
  6. Add the new integration to the checkIntegrations object in the index.js file.

Testing eslint configs

The script script/calculate_eslint_config.js can be used to show what exact config is used by eslint, this will include any autogenerated rules. This script expects one argument, which is a eslint config file.