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): [playground] parse eslint module config on paste and improve visual editor #5112

Merged
merged 8 commits into from
Jun 10, 2022

Conversation

armano2
Copy link
Member

@armano2 armano2 commented May 30, 2022

PR Checklist

Overview

  • additional properties will no longer be removed when editing config in visual editor
  • pasting config that starts with module.exports is going to try to parse it to json
  • applied fixers are correctly added to undo stack now
  • when changing to/from jsx tab editor is not going to be forcefully displaying code tab

test case: try pasting, in eslintrc,

module.exports = {
  parser: '@typescript-eslint/parser',
  parserOptions: {
    project: './tsconfig.json'
  },
  plugins: ['@typescript-eslint'],
  rules: {
    "@typescript-eslint/no-non-null-asserted-optional-chain": "error"
  }
}

and in visual editor try to modify any options


this should ease creating repro with actual configs (eg. #2521 (comment))

@armano2 armano2 added enhancement New feature or request package: website Issues related to the @typescript-eslint website labels May 30, 2022
@nx-cloud
Copy link

nx-cloud bot commented May 30, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c699453. 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 47 targets

Sent with 💌 from NxCloud.

@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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented May 30, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit c699453
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/629ce84585a2280008aa2c1a
😎 Deploy Preview https://deploy-preview-5112--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.

@armano2

This comment was marked as resolved.

@armano2 armano2 changed the title chore(website): parse eslint module config on parse and improve visual editor chore(website): [playground] parse eslint module config on parse and improve visual editor May 31, 2022
@codecov
Copy link

codecov bot commented Jun 5, 2022

Codecov Report

Merging #5112 (c699453) into main (8698e80) will decrease coverage by 2.50%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #5112      +/-   ##
==========================================
- Coverage   93.83%   91.32%   -2.51%     
==========================================
  Files         286      132     -154     
  Lines        9839     1487    -8352     
  Branches     2940      224    -2716     
==========================================
- Hits         9232     1358    -7874     
+ Misses        328       65     -263     
+ Partials      279       64     -215     
Flag Coverage Δ
unittest 91.32% <ø> (-2.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...es/eslint-plugin/src/configs/eslint-recommended.ts
...plugin/src/rules/no-redundant-type-constituents.ts
packages/eslint-plugin/src/rules/require-await.ts
...-plugin/src/rules/naming-convention-utils/index.ts
...int-plugin/src/rules/consistent-type-assertions.ts
...es/eslint-plugin/src/rules/no-array-constructor.ts
...plugin/src/rules/no-unnecessary-type-constraint.ts
...gin/src/rules/naming-convention-utils/validator.ts
.../eslint-plugin/src/rules/method-signature-style.ts
...es/eslint-plugin/src/rules/no-loss-of-precision.ts
... and 144 more

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

LGTM!

@bradzacher bradzacher merged commit 53d74b6 into main Jun 10, 2022
@bradzacher bradzacher deleted the fix/visaul-editor-and-paste branch June 10, 2022 00:59
@armano2 armano2 changed the title chore(website): [playground] parse eslint module config on parse and improve visual editor chore(website): [playground] parse eslint module config on paste and improve visual editor Jun 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request package: website Issues related to the @typescript-eslint website
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants