# eslint-plugin-ember-cleanup

> Check Ember-code for some potential issues

Latest version **2.0.1** (published 2017-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-ember-cleanup
pnpm add eslint-plugin-ember-cleanup
yarn add eslint-plugin-ember-cleanup
bun add eslint-plugin-ember-cleanup
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2017-12-05 |
| First published | 2016-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | onechiporenko |
| Maintainers | onechiporenko |
| Keywords | eslint, eslintplugin, eslint-plugin, ember |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-ember-cleanup
- Repository: https://github.com/onechiporenko/eslint-plugin-ember-cleanup
- Homepage: https://github.com/onechiporenko/eslint-plugin-ember-cleanup#readme
- Issues: https://github.com/onechiporenko/eslint-plugin-ember-cleanup/issues
- npm.io page: https://npm.io/package/eslint-plugin-ember-cleanup

## Dependencies (2)

- [object-path](https://npm.io/package/object-path.md) ^0.11.4
- [requireindex](https://npm.io/package/requireindex.md) ~1.1.0

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2017-12-05
- 2.0.0 — 2017-12-04
- 1.7.5 — 2016-12-07
- 1.7.4 — 2016-11-25
- 1.7.3 — 2016-09-14
- 1.7.2 — 2016-09-02
- 1.7.1 — 2016-06-11
- 1.7.0 — 2016-05-26
- 1.6.0 — 2016-04-04
- 1.5.0 — 2016-03-28
- 1.4.0 — 2016-03-23
- 1.3.0 — 2016-03-11
- 1.2.1 — 2016-03-04
- 1.2.0 — 2016-03-03
- 1.1.0 — 2016-02-17
- … 1 more at https://npm.io/package/eslint-plugin-ember-cleanup/versions

## README

# eslint-plugin-ember-cleanup

[![Build Status](https://travis-ci.org/onechiporenko/eslint-plugin-ember-cleanup.svg)](https://travis-ci.org/onechiporenko/eslint-plugin-ember-cleanup)
[![npm version](https://badge.fury.io/js/eslint-plugin-ember-cleanup.png)](http://badge.fury.io/js/eslint-plugin-ember-cleanup)
[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
[![Downloads](http://img.shields.io/npm/dm/eslint-plugin-ember-cleanup.svg)](https://www.npmjs.com/package/eslint-plugin-ember-cleanup)

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-ember-cleanup`:

```
$ npm install eslint-plugin-ember-cleanup --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-ember-cleanup` globally.

## Usage

Add `ember-cleanup` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": [
    "ember-cleanup"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:ember-cleanup/recommended"
  ]
}
```

## Supported Rules

| Rule | Description |
|----- | ------------|
| [max-dep-keys](./docs/rules/max-dep-keys.md)| Checks number of dependent keys |
| [no-settimeout](./docs/rules/no-settimeout.md) | Proposes to use `run`-methods instead of `setTimeout` |
| [no-throw](./docs/rules/no-throw.md) | Proposes to use `assert` from `@ember/debug` instead of throwing errors |
| [no-typeof](./docs/rules/no-typeof.md) | Proposes to use `typeOf` from `@ember/utils` instead of  built-in `typeof` for some types check |
| [cp-brace-expansion](./docs/rules/cp-brace-expansion.md) | Checks dependent keys for possibility to do brace expansion |
| [no-is-array](./docs/rules/no-is-array.md) | Checks for array detection and propose to use `isArray` from `@ember/array` |
| [no-this-in-dep-keys](./docs/rules/no-this-in-dep-keys.md) | Checks dependent keys for `this.`-prefix |
| [one-level-each](./docs/rules/one-level-each.md) | Checks `@each` usage in the dependent keys |
| [square-brackets](./docs/rules/square-brackets.md) | Checks `[]` usage in the dependent keys |
| [no-multi-dots](./docs/rules/no-multi-dots.md) | Checks dependent keys to not contain `..` |
| [no-typo-in-dep-keys](./docs/rules/no-typo-in-dep-keys.md) | Checks possible typos in the dependent keys (it doesn't check short keys) |
| [cp-macro-args-limit](./docs/rules/cp-macro-args-limit.md) | Checks dependent keys count |
| [cp-macro-not-key](./docs/rules/cp-macro-not-key.md) | Checks arguments for computed macros to not be dependent keys |
| [no-expr-in-dep-keys](./docs/rules/no-expr-in-dep-keys.md) | Checks dependent keys to not contain expressions |
| [no-empty-declaration](./docs/rules/no-empty-declaration.md) | Disallow empty `extend` for Ember Objects |
| [cp-macro-alias](./docs/rules/cp-macro-alias.md) | Looks for Computed Properties that look like `computed.alias` but are written as 'general' CP |
| [super-args](./docs/rules/super-args.md) | Checks potential invalid calls `_super` without `...` |
| [route-model-return](./docs/rules/route-model-return.md) | Checks that `model` hook returns a value |
| [no-dep-keys-loop](./docs/rules/no-dep-keys-loop.md) | Checks for loops in the dependent keys |

Deprecated and removed:

| Rule | Reason |
|------|--------|
| `no-declare-obj-components` | Use `ember/avoid-leaking-state-in-ember-objects` from [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember) |
| `no-set-in-getter` | Use `ember/no-side-effects` from [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember) |
| `no-dup-keys` | Use `ember/no-duplicate-dependent-keys` from [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember) |
| `destructuring` | It's not needed for modules API |
| `no-define-property` | `defineProperty` is private, so it must not be used at all |
| `no-console` | Proposed `Ember.Logger` is private, so rule may be replaced with `no-console` from ESLint |

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