0.1.6 • Published 4 years ago

cyf-lint v0.1.6

Weekly downloads
21
License
-
Repository
-
Last release
4 years ago

CYF Lint

A simple tool to quickly lint your JavaScript code.

Its main goal is to highlight those practices that, while technically correct, are generally discouraged:

  • Potential syntax and logic errors
  • Sloppy and unconventional coding style

Usage

$ npx cyf-lint [--fix] <path> [<path> ...]

You can find the details of any failing rule at https://eslint.org/docs/rules/

--fix fixes some of the failing rules automatically. While safe, it's a good idea to use it on a repo without uncommitted changes.

Example

$ cd my-project
$ npx cyf-lint .

FAQ

  • How can I automatically run it every time I make a change in the code?

    $ npx onchange -i '**/*.js' -- npx cyf-lint .
  • It takes a long time to run!

    That's probably npx (re)installing cyf-lint every time it's executed. The only way to speed it up that I'm aware of is to manually install cyf-lint:

    $ npm install -g cyf-lint

    Note in this case you won't be using the latest version automatically. To ensure you are up to date, remember to update the package periodically:

    $ npm install -g cyf-lint@latest
  • I get warnings on a piece of code I consider legitimate. What can I do?

    It may very well be a bug or that the rules are unfairly restrictive. In that case, please file an issue.

    If it's more of an edge case and you would like to ignore that case especifically, you can do that by commenting your code.

Development

To apply the rules to the project itself:

$ npm run dev

To apply the rules to other projects:

$ cd sample-project
$ npx onchange -i '**/*.js' '<cyf-lint-dir>/**' -- <cyf-lint-dir>/bin/cyf-lint .

TODO

  • tsc + checkJs
  • Errors to link to the rules
  • Integrated watch mode
  • Expose ESLint config
0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago