eslint-plugin-cypress-dev
Common ESLint rules shared by Cypress packages
Last updated 2 years ago by cypress-npm-publisher .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-cypress-dev 
SYNC missed versions from official npm registry.

Cypress Developer ESLint Plugin

Common ESLint rules shared by Cypress packages.

Note that this is meant for packages that are part of Cypress and not necessarily for a project that uses Cypress.

Installation

npm install --save-dev eslint-plugin-cypress-dev

Usage

Extend one or more of the presets depending on the nature of the package:

// .eslintrc.json
{
  "extends": [
    "plugin:cypress-dev/general",
    "plugin:cypress-dev/tests",
    "plugin:cypress-dev/react"
  ]
}

You can relax rules

// .eslintrc.json
{
  "extends": [
    "plugin:cypress-dev/general"
  ],
  "rules": {
    "comma-dangle": "off",
    "no-debugger": "warn"
  },
  "env": {
    "node": true
  }
}

Presets

general

The majority of the rules concerning JavaScript. Should usually be used at the root of the package.

tests

Test-specific configuration and rules. Should be used within the test directory.

react

React and JSX-specific configuration and rules.

Dependencies

Due to a limitation in how ESLint plugins work, your package needs to install the ESLint plugins that this plugin depends on:

If using the tests preset:

npm install --save-dev eslint-plugin-mocha

If using the react preset:

npm install --save-dev babel-eslint eslint-plugin-react

Editors

VSCode

Use plugin ESLint by Dirk Baeumer to lint and auto fix JS files using ESLint. This repository includes example .vscode/settings.json file.

Atom

Install package linter-eslint (and its dependencies) to enable linting. Go into the settings for this package and enable "Fix on save" option to auto-fix white space issues and other things.

Sublime Text

Install ESLint-Formatter, then set the following settings:

{
  "format_on_save": true,
  "debug": true
}

License

This project is licensed under the terms of the MIT license.

Current Tags

  • 3.0.2                                ...           latest (2 years ago)

10 Versions

  • 3.0.2                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 0
This Week 2
This Month 5
Last Day 0
Last Week 2
Last Month 285
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |