eslint-plugin-cypress
Advanced tools
Comparing version 2.2.1 to 2.6.0
{ | ||
"plugins": [ | ||
"@cypress/dev" | ||
], | ||
"extends": [ | ||
"plugin:cypress-dev/general" | ||
"plugin:@cypress/dev/general" | ||
] | ||
} |
@@ -22,3 +22,3 @@ const globals = require('globals') | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
@@ -25,0 +25,0 @@ }, |
@@ -5,2 +5,5 @@ 'use strict' | ||
plugins: ['cypress'], | ||
env: { | ||
'cypress/globals': true, | ||
}, | ||
rules: { | ||
@@ -7,0 +10,0 @@ 'cypress/no-assigning-return-values': 'error', |
@@ -1,1 +0,49 @@ | ||
{"name":"eslint-plugin-cypress","version":"2.2.1","description":"An ESLint plugin for projects using Cypress","main":"index.js","author":"Chris Breiding (chris@cypress.io)","license":"MIT","keywords":["eslint","eslintplugin","cypress"],"repository":{"type":"git","url":"git+https://github.com/cypress-io/eslint-plugin-cypress.git"},"bugs":{"url":"https://github.com/cypress-io/eslint-plugin-cypress/issues"},"homepage":"https://github.com/cypress-io/eslint-plugin-cypress#readme","peerDependencies":{"eslint":">= 3.2.1"},"dependencies":{"globals":"^11.0.1"},"devDependencies":{"condition-circle":"1.5.0","eslint":"^5.7.0","eslint-plugin-cypress-dev":"1.1.2","github-post-release":"1.13.1","husky":"^0.14.3","jest":"^23.6.0","semantic-release":"8.2.0","simple-commit-message":"3.3.1"},"scripts":{"precommit":"npm run lint","lint":"eslint *.js","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post","start":"yarn run test:watch","test":"jest","test-watch":"jest --watchAll"},"release":{"verifyConditions":"condition-circle","analyzeCommits":"simple-commit-message","generateNotes":"github-post-release"},"jest":{"testMatch":["**/tests/**/*.js"]}} | ||
{ | ||
"name": "eslint-plugin-cypress", | ||
"version": "2.6.0", | ||
"description": "An ESLint plugin for projects using Cypress", | ||
"main": "index.js", | ||
"author": "Chris Breiding (chris@cypress.io)", | ||
"license": "MIT", | ||
"keywords": [ | ||
"eslint", | ||
"eslintplugin", | ||
"cypress" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/cypress-io/eslint-plugin-cypress.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/cypress-io/eslint-plugin-cypress/issues" | ||
}, | ||
"homepage": "https://github.com/cypress-io/eslint-plugin-cypress#readme", | ||
"peerDependencies": { | ||
"eslint": ">= 3.2.1" | ||
}, | ||
"dependencies": { | ||
"globals": "^11.12.0" | ||
}, | ||
"devDependencies": { | ||
"@cypress/eslint-plugin-dev": "3.2.0", | ||
"@cypress/eslint-plugin-json": "3.2.1", | ||
"condition-circle": "2.0.2", | ||
"eslint": "^5.7.0", | ||
"husky": "^3.0.0", | ||
"jest": "^24.8.0", | ||
"semantic-release": "15.13.18" | ||
}, | ||
"scripts": { | ||
"precommit": "npm run lint", | ||
"lint": "eslint *.js", | ||
"semantic-release": "semantic-release", | ||
"start": "yarn run test:watch", | ||
"test": "jest", | ||
"test-watch": "jest --watchAll" | ||
}, | ||
"jest": { | ||
"testMatch": [ | ||
"**/tests/**/*.js" | ||
] | ||
} | ||
} |
@@ -1,6 +0,6 @@ | ||
# Cypress ESLint Plugin | ||
# Cypress ESLint Plugin [![CircleCI](https://circleci.com/gh/cypress-io/eslint-plugin-cypress/tree/master.svg?style=svg)](https://circleci.com/gh/cypress-io/eslint-plugin-cypress/tree/master) | ||
An ESLint plugin for your [Cypress](https://cypress.io) tests. | ||
Specifies globals for Cypress `cy`, `Cypress`, browser and mocha globals. | ||
Note: If you installed ESLint globally then you must also install `eslint-plugin-cypress` globally. | ||
@@ -18,8 +18,25 @@ ## Installation | ||
```json | ||
// my-project/cypress/.eslintrc.json | ||
{ | ||
"plugins": [ | ||
"cypress" | ||
], | ||
] | ||
} | ||
``` | ||
You can add rules: | ||
```json | ||
{ | ||
"rules": { | ||
"no-assigning-return-values": "error", | ||
"no-unnecessary-waiting": "error", | ||
"assertion-before-screenshot": "warn", | ||
} | ||
} | ||
``` | ||
You can whitelist globals provided by Cypress: | ||
```json | ||
{ | ||
"env": { | ||
@@ -31,9 +48,7 @@ "cypress/globals": true | ||
## Rules | ||
## Recommended configuration | ||
These rules enforce some of the [best practices recommended for using Cypress](https://on.cypress.io/best-practices). Use them by adding the following to your eslint config: | ||
Use the recommended configuration and you can forego configuring _plugins_, _rules_, and _env_ individually. See below for which rules are included. | ||
```json | ||
// my-project/cypress/.eslintrc.json | ||
{ | ||
@@ -46,2 +61,6 @@ "extends": [ | ||
## Rules | ||
These rules enforce some of the [best practices recommended for using Cypress](https://on.cypress.io/best-practices). | ||
Rules with a check mark (✅) are enabled by default while using the `plugin:cypress/recommended` config. | ||
@@ -91,1 +110,3 @@ | ||
* Create a PR | ||
Use the following commit message conventions: https://github.com/semantic-release/semantic-release#commit-message-format |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16532
7
311
109
1
Updatedglobals@^11.12.0