Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: eslint plugin playwright #433

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

Merged
cexbrayat merged 2 commits into vuejs:main from georgi-mateev:feat-eslint-plugin-playwright
Feb 5, 2024

Conversation

Copy link
Contributor

@georgi-mateev georgi-mateev commented Jan 26, 2024

Re #422

  • Add eslint-plugin-playwright in /template/eslint/package.json
  • Update index.ts > pass playwright option to renderEslint function
  • Add logic for extending eslint with eslint-plugin-playwright plugin
    "extends": ["plugin:playwright/recommended"]

Copy link
Contributor

Nice one @georgi-mateev
Could you guys provide us with feedback @sodatea @cexbrayat

@@ -35,6 +35,11 @@ export default function renderEslint(
additionalDependencies['eslint-plugin-cypress'] = eslintDeps['eslint-plugin-cypress']
}

if (needsPlaywright) {
additionalConfig.extends = ['plugin:playwright/recommended']
Copy link
Member

@cexbrayat cexbrayat Jan 27, 2024

Choose a reason for hiding this comment

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

shouldn't the plugin apply only the Playwright files (as done for Cypress above)?

Copy link
Contributor

@Yordan-Ramchev Yordan-Ramchev Jan 27, 2024

Choose a reason for hiding this comment

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

Yes, ESLint will apply the rules defined in the root of your configuration to all files in your project (which is not ideal).
@georgi-mateev Can you target e2e folder - something like files: ['e2e/**/*.{js,ts,jsx,tsx}']?

Copy link
Contributor Author

@cexbrayat, @Yordan-Ramchev Thanks for the feedback and the help, appreciate it!

Changes

Plugin now only applies to specified files -
eslint-plugin

Regarding files we think its versatile enough to target files having either .test. or .spec. signature both in the the main folder and its subfolders, if any.

Copy link
Contributor

@Yordan-Ramchev Yordan-Ramchev left a comment

Choose a reason for hiding this comment

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

Looking good

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

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

LGTM thanks @georgi-mateev 👍

@cexbrayat cexbrayat merged commit 54964cd into vuejs:main Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cexbrayat cexbrayat cexbrayat approved these changes

+1 more reviewer

@Yordan-Ramchev Yordan-Ramchev Yordan-Ramchev approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /