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

@fallen-empire/linter

v1.0.0

Published

Unconfigurable & opinionated TypeScript linting CLI

Downloads

2

Readme

@fallen-empire/linter

Fallen Empires zero-config, opinionated, unconfigurable TypeScript linting tool.

@fallen-empire/linter is a linting CLI which implements the JavaScript Standard Style, with added support for TypeScript and JSX.

Try it now!

npx @fallen-empire/linter ./path/to/files

Usage

The @fallen-empire/linter binary is named lint. The default globbing pattern for @fallen-empire/linter is ./src/**/{*.tsx|*.ts}. If your project is structured like this, @fallen-empire/linter is zero-config!

Recommended usage

It is recommended that you install this local to your project and simply add it to your npm test script.

npm i -D @fallen-empire/linter
// package.json
{
  "name": "foo",
  "version": "1.0.0",
  "scripts": {
    "unit-test": "your-unit-test-script",
    "test": "lint && unit-test"
  }
}

Use via terminal

Install globally

npm i -g @fallen-empire/linter

Lint your cwd with default glob

$ lint

Advanced usage

You can provide paths relative to cwd or use globbing patterns to specify non-standard lint targets.

$ lint ./foobar.js

Use --help for more detail.

FAQ

Table of Contents

  1. Why should I use @fallen-empire/linter?
  2. Who uses the JavaScript Standard Style?
  3. I disagree with rule X, can you change it?

Why should I use @fallen-empire/linter?

The beauty of @fallen-empire/linter is that it's simple. No one wants to maintain multiple hundred-line style configuration files for every module/project they work on. Enough of this madness!

This module saves you time and provides you peace of mind in three ways:

  • No Configuration. The easiest way to enforce consistent style in your project, just install and go.
  • Automatically format code. When you run @fallen-empire/linter it fixes easy issues all by itself and formats your code to meet the rules. Don't worry, if it finds something a little too dangerous to do all by itself it will instead give you a warning and ask you to solve it.
  • Unify style, catch issues and solve programmer errors early. Save precious code review time by eliminating back and forth between peers over innocent mistakes and code style indifference. @fallen-empire/linter catches many common errors and even automatically fixes many for you.

Who uses the JavaScript Standard Style?

JavaScript Standard Style is not actually a standard, it is not affiliated with any official web standards group. However, it's a highly popular defacto-standard that's been adopted by many very important influental projects and companies in the JavaScript community. It's awesome, let's join them!

| | | | |---|---|---|---|

| | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | | | |---|---|---|---|

| | | |---|---|---|

In addition to companies, many community members use the JavaScript Standard Style on packages that are too numerous to list here.

The JavaScript Standard style official lib standard is also the top-starred linter in GitHub's Clean Code Linter showcase.

I disagree with rule X, can you change it?

No. The whole point of @fallen-empire/linter is to save you time by avoiding bikeshedding about code style. There are lots of debates online about tabs vs. spaces, etc. that will never be resolved. These debates just distract from getting stuff done. At the end of the day you have to 'just pick something', and that's the whole philosophy of @fallen-empire/linter -- its a bunch of sensible 'just pick something' opinions. Hopefully, users see the value in that over defending their own opinions.

Credit to JavaScript Standard Style.