@weex-project/eslint-config-weex

1.0.0 • Public • Published

Weex eslint configs

Eslint configs for weex file. Both .we and .js file can be linted.

Usage

First, setup ESLint in your project, and install weex specified configs.

npm install eslint-config-weex --save-dev

Then add extends property in your .eslintrc file.

{
  "extends": [ "weex" ]
}

Rules

Weex specified

  • no-timer-module: prevent the usage of timer module.

Limits

  • Danger language features
    • no-alert
    • no-debugger
    • no-caller
    • no-void
    • no-with
    • no-labels
    • no-new-func
    • no-implied-eval
    • no-multi-str
  • No global variable
    • no-global-assign
    • no-implicit-globals
    • no-restricted-globals
  • Don't change internal objects
    • no-extend-native
    • no-prototype-builtins
    • no-iterator
    • no-proto
    • no-new-wrappers
    • no-obj-calls
    • use-isnan
  • Unsave scope
    • no-shadow
    • no-use-before-define
    • block-scoped-var
    • no-redeclare
    • no-shadow-restricted-names
    • no-inner-declarations
    • no-loop-func
    • no-unsafe-negation
    • no-return-assign
    • no-cond-assign

Advice

  • no-console
  • no-empty
  • no-unused-vars
  • no-sparse-arrays
  • no-template-curly-in-string
  • no-unreachable
  • no-constant-condition
  • no-dupe-args
  • no-dupe-keys
  • no-ex-assign
  • no-func-assign
  • no-duplicate-case
  • no-self-compare
  • no-self-assign
  • no-extra-bind
  • no-useless-call
  • array-callback-return

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i @weex-project/eslint-config-weex

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • erha19
  • hanks
  • yuanyan
  • jack_pu
  • sospartan
  • fkysly
  • mr.raindrop
  • exolution
  • songsiqi
  • tancy
  • iskenhuang