@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
- Why should I use @fallen-empire/linter?
- Who uses the JavaScript Standard Style?
- 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.