# resin-lint

> Resin.io coffeelint & coffeescope2 wrapper

Latest version **3.3.1** (published 2020-02-24) · Apache 2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install resin-lint
pnpm add resin-lint
yarn add resin-lint
bun add resin-lint
```

Provides the command `resin-lint`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.3.1 |
| Published | 2020-02-24 |
| First published | 2016-03-22 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 72.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Kostas Lekkas |
| Maintainers | balena.io |
| Keywords | resin, coffeescript, coffeelint |

## Links

- npm: https://www.npmjs.com/package/resin-lint
- Repository: https://github.com/resin-io/node-resin-lint
- Issues: https://github.com/resin-io/node-resin-lint/issues
- npm.io page: https://npm.io/package/resin-lint

## Dependencies (18)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [tslint](https://npm.io/package/tslint.md) ^5.20.1
- [depcheck](https://npm.io/package/depcheck.md) ^0.6.7
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [prettier](https://npm.io/package/prettier.md) ^1.19.1
- [coffeelint](https://npm.io/package/coffeelint.md) ^1.15.0
- [typescript](https://npm.io/package/typescript.md) ^3.7.5
- [@types/glob](https://npm.io/package/@types/glob.md) ^7.1.1
- [@types/node](https://npm.io/package/@types/node.md) ^8.10.59
- [coffeescope2](https://npm.io/package/coffeescope2.md) ^0.4.5
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.149
- [coffee-script](https://npm.io/package/coffee-script.md) ^1.10.0
- [@types/depcheck](https://npm.io/package/@types/depcheck.md) ^0.6.0
- [@types/optimist](https://npm.io/package/@types/optimist.md) 0.0.29
- [@types/prettier](https://npm.io/package/@types/prettier.md) ^1.18.3
- [tslint-config-prettier](https://npm.io/package/tslint-config-prettier.md) ^1.18.0
- [tslint-no-unused-expression-chai](https://npm.io/package/tslint-no-unused-expression-chai.md) ^0.1.4

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 3.3.1 (latest) — 2020-02-24
- 3.2.0-disable-ordered-imports-f01abd003b10d219e1ccc649255efda29a04500c (disable-ordered-imports-f01abd003b10d219e1ccc649255efda29a04500c) — 2020-01-27
- 3.1.2-update-deps-6cec8df410023b6e8bf02a6163f0df810270708f (update-deps-6cec8df410023b6e8bf02a6163f0df810270708f) — 2020-01-23
- 3.1.2-update-deps-84dbdd8dc17c7de352d8e7519c6cbe0035681433 (update-deps-84dbdd8dc17c7de352d8e7519c6cbe0035681433) — 2020-01-22
- 3.1.1-upgrade-prettier-2f949860f3c86b4be1959100a430ad641525c3b7 (upgrade-prettier-2f949860f3c86b4be1959100a430ad641525c3b7) — 2019-11-09
- 3.1.0-roman-add-mocha-linter-e85abc4409c642cf73c6c3e2a0df48efea75f08d (roman-add-mocha-linter-e85abc4409c642cf73c6c3e2a0df48efea75f08d) — 2019-07-04
- 3.1.0-roman-add-mocha-linter-a9f574453268a6a044c91a9e7fd9d5ea08a6d04d (roman-add-mocha-linter-a9f574453268a6a044c91a9e7fd9d5ea08a6d04d) — 2019-07-03
- 3.3.1-fix-non-prettified-exit-code-3eb7285b26fa44522a7e698eb166b495ee9bf990 — 2020-02-24
- 3.3.0 — 2020-02-10
- 3.3.0-fs-improvements-58e393d92c2b6dbb7155e0b112f11278fe7bde88 — 2020-02-10
- 3.3.0-fs-improvements-377e6f0d0b1899b5a122fc806cab72a195f3c7ce — 2020-02-10
- 3.3.0-fs-improvements-725d177808edc36234895c501b93719e877a0e4e — 2020-02-10
- 3.3.0-fs-improvements-cd25f1571c5dc567f6388d5affe167d2cb6bff60 — 2020-02-05
- 3.3.0-fs-improvements-4fca9f5d06d78f3621def03fadb387d9c3cc5421 — 2020-02-05
- 3.2.4 — 2020-02-05
- … 61 more at https://npm.io/package/resin-lint/versions

## README

resin-lint
==========

`resin-lint` is a linter based on [coffeelint](https://github.com/clutchski/coffeelint),
[coffeescope2](https://github.com/za-creature/coffeescope), [tslint](https://palantir.github.io/tslint/) and [prettier](https://github.com/prettier/prettier) to detect style errors based on Resin.io coding guidelines.

Overview
--------

`resin-lint` uses Resin's `coffeelint.json`, `tslint.json` and `.prettierrc`.
If a `coffeelint.json` or `tslint.json` is found in the to-be-linted project
directory or its parents then the rules found in it will be merged with the default `resin-lint` ones.
Another way to to override the default resin-lint rules is by specifying a configuration
file with the `-f` parameter.

## Typescript

By default, only `.coffee` files will be linted. `.ts` and `.tsx` files can be
linted by using the `--typescript` parameter.

## Prettier

You can reference the prettier configuration file to your consumer project
from `./config/.prettierrc`.
You can disable the prettier format checks by using the `--no-prettier` parameter.

Usage
-----

You can use this module as:

1. A standalone project by installing it with `npm install -g resin-lint`:

  ```
  kostas@macbook:~/resin/test$ resin-lint src/
    ✓ src/test.coffee

    ✓ Ok! » 0 errors and 0 warnings in 1 file
  ```

2. A development dependency in `package.json` with ```npm install --save-dev resin-lint```. Then
  you can use the module in your build/testing process:

  ```
  package.json
  ------------
  ...
  "scripts": {
    "lint": "resin-lint src/ && echo \"Done!\""
  },
  ...

  kostas@macbook:~/resin/test$ npm run lint

  > test@1.0.0 lint /Users/kostas/resin/test
  > resin-lint src/ && echo "Done!"

    ✓ src/test.coffee

    ✓ Ok! » 0 errors and 0 warnings in 1 file

    Done!

  ```

3. A development dependency, that will get picked up by your IDE/Editor coffeelint/tslint/prettier.

Manually create these config files in your project root:

`tslint.json`

```json
// if using prettier in your project
{
	"extends": [
		"resin-lint/config/tslint-prettier.json"
	]
}

// plain TypeScript
{
	"extends": [
		"resin-lint/config/tslint.json"
	]
}
```

For coffeelint create `coffeelint.json`

```json
{
	"extends": [
		"resin-lint/config/coffeelint.json"
	]
}
```

For prettier config create `.prettierrc.js`

```js
const fs = require('fs');

module.exports = JSON.parse(fs.readFileSync('./node_modules/resin-lint/config/.prettierrc', 'utf8'));
```

Support
-------

If you're having any problem, please [raise an issue](https://github.com/resin-io/node-resin-lint/issues/new) on GitHub and the Resin.io team will be happy to help.

Tests
-----

Run the test suite by doing:

```sh
$ npm install && npm test
```

Contribute
----------

- Issue Tracker: [github.com/resin-io/node-resin-lint/issues](https://github.com/resin-io/node-resin-lint/issues)
- Source Code: [github.com/resin-io/node-resin-lint](https://github.com/resin-io/node-resin-lint)

Before submitting a PR, please make sure that you include tests, and that `npm run lint` runs without a warning.

License
-------

The project is licensed under the Apache 2.0 license.

---
_Source: https://npm.io/package/resin-lint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
