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

chore(website): validate rule options in editor #6907

Merged
merged 7 commits into from Apr 16, 2023

Conversation

armano2
Copy link
Member

@armano2 armano2 commented Apr 14, 2023

PR Checklist

Overview

Enable rule schema validation in playground

rec-34925.mp4

config with errors
config without errors

{
  "rules": {
    "@typescript-eslint/naming-convention": [
      "error",
      {
        "selector": [
          "enum"
        ]
      },
      {
        "selector": [
          "enum"
        ],
        "format": null
      }
    ],
    "@typescript-eslint/consistent-generic-constructors": [
      "error",
      "type-d"
    ],
    "@typescript-eslint/explicit-member-accessibility": [
      "error",
      {
        "accessibility": ""
      }
    ],
    "id-denylist": [
      "error",
      2
    ],
    // rule schema with object in items
    "@typescript-eslint/padding-line-between-statements": [
      "error",
      {
        "blankLine": "always"
      }
    ],
    // this should error on to big array
    "no-unused-labels": [
      "error",
      false
    ],
    // rule schema with array in items
    "array-element-newline": [
      "error",
      "a"
    ],
    // rule schema that contains oneOf
    "logical-assignment-operators": [
      "error",
      "always",
      {
        "enforceForIfStatements": true
      }
    ],
    // rule schema that contains anyOf
    "eqeqeq": [
      "error",
      "always"
    ],
    // additional checks
    "@typescript-eslint/func-call-spacing": [
      "error"
    ],
    "no-restricted-globals": ["error", "test", "bar", 2],
    "@typescript-eslint/ban-ts-comment": ["warn", "w"]
  }
}

ref: #6896 #6899

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @armano2!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Apr 14, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 3a5b13a
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/643c35d5f2b88d0009ee152b
😎 Deploy Preview https://deploy-preview-6907--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@nx-cloud
Copy link

nx-cloud bot commented Apr 14, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3a5b13a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 30 targets

Sent with 💌 from NxCloud.

@armano2 armano2 marked this pull request as draft April 14, 2023 13:44
@armano2 armano2 marked this pull request as ready for review April 14, 2023 15:55
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Code seems great, except for the bug? Very into this!

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

💯 no more :. Thanks!

@armano2 armano2 merged commit 5ee6180 into v6 Apr 16, 2023
42 checks passed
@armano2 armano2 deleted the chore/playground-validate-rule-schema branch April 16, 2023 18:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants