Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix .eslintrc.json syntax in eslint-plugin-dev readme #29343

Merged

Conversation

MikeMcC399
Copy link
Contributor

Additional details

In npm/eslint-plugin-dev/README.md the instructions for creating .eslintrc.json included a syntax error due to an extra comma. The documentation is corrected to remove the comma.

The error message shown by ESLint contained the following text:

Error: Unexpected token ']', ..."neral",
  ]
}
" is not valid JSON

Steps to test

On Ubuntu 22.04.4 LTS with Node.js 20.12.2, execute the following:

mkdir eslint-plugin-dev-test
cd eslint-plugin-dev-test
git init
npm init -y
npm install eslint@7 @cypress/eslint-plugin-dev eslint-plugin-json-format @typescript-eslint/parser@6 @typescript-eslint/eslint-plugin@6 eslint-plugin-mocha -D

Add the file .eslintrc.json with the following contents to the root of the above project:

{
  "plugins": [
    "@cypress/dev"
  ],
  "extends": [
    "plugin:@cypress/dev/general"
  ]
}
touch index.js
npx eslint .

How has the user experience changed?

There is no change to the end-user experience. This is a documentation-only change which affects Cypress developers only.

PR Tasks

@cypress-app-bot
Copy link
Collaborator

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcC399 Indeed. Thanks for fixing!

@jennifer-shehane jennifer-shehane merged commit c137bec into cypress-io:develop Apr 17, 2024
29 of 31 checks passed
@MikeMcC399 MikeMcC399 deleted the eslint-plugin-dev-rc-syntax branch April 17, 2024 14:48
jj497 pushed a commit to jj497/cypress that referenced this pull request May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants