2.0.1 • Published 6 years ago

eslint-plugin-ember-cleanup v2.0.1

Weekly downloads
11,373
License
MIT
Repository
github
Last release
6 years ago

eslint-plugin-ember-cleanup

Build Status npm version License Downloads

Installation

You'll first need to install ESLint:

$ 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:

{
  "plugins": [
    "ember-cleanup"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:ember-cleanup/recommended"
  ]
}

Supported Rules

RuleDescription
max-dep-keysChecks number of dependent keys
no-settimeoutProposes to use run-methods instead of setTimeout
no-throwProposes to use assert from @ember/debug instead of throwing errors
no-typeofProposes to use typeOf from @ember/utils instead of built-in typeof for some types check
cp-brace-expansionChecks dependent keys for possibility to do brace expansion
no-is-arrayChecks for array detection and propose to use isArray from @ember/array
no-this-in-dep-keysChecks dependent keys for this.-prefix
one-level-eachChecks @each usage in the dependent keys
square-bracketsChecks [] usage in the dependent keys
no-multi-dotsChecks dependent keys to not contain ..
no-typo-in-dep-keysChecks possible typos in the dependent keys (it doesn't check short keys)
cp-macro-args-limitChecks dependent keys count
cp-macro-not-keyChecks arguments for computed macros to not be dependent keys
no-expr-in-dep-keysChecks dependent keys to not contain expressions
no-empty-declarationDisallow empty extend for Ember Objects
cp-macro-aliasLooks for Computed Properties that look like computed.alias but are written as 'general' CP
super-argsChecks potential invalid calls _super without ...
route-model-returnChecks that model hook returns a value
no-dep-keys-loopChecks for loops in the dependent keys

Deprecated and removed:

RuleReason
no-declare-obj-componentsUse ember/avoid-leaking-state-in-ember-objects from eslint-plugin-ember
no-set-in-getterUse ember/no-side-effects from eslint-plugin-ember
no-dup-keysUse ember/no-duplicate-dependent-keys from eslint-plugin-ember
destructuringIt's not needed for modules API
no-define-propertydefineProperty is private, so it must not be used at all
no-consoleProposed Ember.Logger is private, so rule may be replaced with no-console from ESLint
2.0.1

6 years ago

2.0.0

6 years ago

1.7.5

7 years ago

1.7.4

7 years ago

1.7.3

8 years ago

1.7.2

8 years ago

1.7.1

8 years ago

1.7.0

8 years ago

1.6.0

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago