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

Add ESLint Checks for the Repository #50

Merged
merged 7 commits into from
Mar 28, 2024
Merged

Add ESLint Checks for the Repository #50

merged 7 commits into from
Mar 28, 2024

Conversation

asekawa
Copy link
Contributor

@asekawa asekawa commented Mar 27, 2024

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.
Add ESLint Checks for the Repository

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email [email protected] to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

.eslintrc.js Outdated
@@ -27,7 +27,9 @@ module.exports = {
extends: [
"plugin:cypress/recommended",
"eslint:recommended",
"plugin:import/typescript"
"plugin:import/typescript",
Copy link
Member

@brionmario brionmario Mar 27, 2024

Choose a reason for hiding this comment

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

Is this working when you run the lint command? @asekawa

plugins: ['@wso2'], // plugin should be added like this
  extends: [
    'plugin:@wso2/typescript',
    'plugin:@wso2/strict',
    'plugin:@wso2/internal',
    'plugin:@wso2/jest',
    'plugin:@wso2/prettier'
  ],

And once you extend the configs, most of the existing overrides will not be needed.

Copy link
Member

Choose a reason for hiding this comment

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

Also install, eslint, prettier & jest as dev dependencies

Copy link
Member

Choose a reason for hiding this comment

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

Test the lint command once you do all the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These plugins were installed and tested

"plugin:@wso2/typescript",
"plugin:@wso2/strict",
"plugin:@wso2/internal",
"plugin:@wso2/prettier",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"plugin:@wso2/prettier",
"plugin:@wso2/prettier",
"plugin:cypress/recommended"

Copy link
Member

Choose a reason for hiding this comment

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

Create an issue in https://github.com/brionmario/wso2-ui-configs/issues repo to add a @wso2/cypress sharable config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@asekawa asekawa merged commit e4f3e4d into main Mar 28, 2024
2 checks passed
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.

2 participants