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

es7lint

v1.0.15

Published

A Javascript code syntax-fixer using the new features from ES6 and ES7

Downloads

21

Readme

es7lint

Node version Build Status David deps

A Javascript code syntax-fixer using the new features from ES6 and ES7.

Goal

Why did you made this module, if people can just use Lebab or Custom-standard?

  • Lebab on its own is pretty nice, but the output formatting is not that readable specially on long arrays/objects.
  • Prettier itself is a beautifier which is used by some bigger companies, but is not a transpiler, it doesn't transform your code to ES6/ES7 syntax.
  • So instead of using individually to attain a better syntax, i made this.

Requirements

  • Node V8.x and higher for Async/Await and Promisify features.

Features

  • Converts your codes to a readable syntax using the latest features from ES6/ES7
  • Customizable, you can set how you like you code to look.

Caveats

  • Since this module relies on both Lebab and Prettier, their caveats are also this module's caveats.

Install

//for local use
npm install es7lint --save
//for development use
npm install es7lint --save-dev
//for global use
npm install es7lint -g

Options

.es7rc is where es7lint reads the options. Simple create a .es7rc file on your application root and put all options on this file. es7lint uses Lebab and Custom-Standard to format and fix your code syntax. All options available on the said modules are also available on es7lint.

.es7rc must have the following format:

{
  "files": ["*.js"], /** glob pattern for files to format */
  "output": "inherit", /** set this to inherit or prefix */
  "format": {
    "lebab": [/** lebab options */],
    "standard": {
		"rules": {
  			"space-before-function-paren": [2, "never"]
		}
    }
  }
}

files

Is a glob pattern for all files that you want to format. This can be an array of globs or a single glob string.

output

  • inherit will write the formatted code to the same file.
  • prefix will write the formatted code to the same directory with new filename prefixed with _es7. (filename_es7.js)

format

Is where all options pertaining to Lebab goes to.

Usage

If .es7rc is missing on your root directory, it will use the default options found on the module's folder If an argument is passed via cli(command) this will override the files set on your .es7rc

//local usage
./node_modules/.bin/es7lint src/*.js scripts/**/*.js
//global usage
es7lint src/*.js scripts/**/*.js

Errors

  • es7lint also checks for any syntax errors before saving them, and will output any errors found.
  • If an error is found, es7lint will stop formatting and exits.

Contributions and Issues

Feel free to create a Pull request and/or Submit an Issue