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

eslint-mdx support #121

Closed
JounQin opened this issue Jul 31, 2022 · 4 comments · Fixed by #124
Closed

eslint-mdx support #121

JounQin opened this issue Jul 31, 2022 · 4 comments · Fixed by #124

Comments

@JounQin
Copy link

JounQin commented Jul 31, 2022

https://github.com/mdx-js/eslint-mdx

I'd like to raise a PR if it's accepted.

@Shinigami92
Copy link
Collaborator

Have a look into https://github.com/Shinigami92/eslint-define-config/blob/main/scripts/generate-rule-files.ts
and you need to add some additional files manually for initiating a new plugin
Orientate yourself on some other rules/plugins

@JounQin
Copy link
Author

JounQin commented Jul 31, 2022

Sure.

@JounQin
Copy link
Author

JounQin commented Jul 31, 2022

@Shinigami92

I got a lot of errors without any modification when running pnpm generate:rules (I'm using pnpm@7.7.1) like:

SyntaxError: ';' expected. (5:48)
  3 | /**
  4 |  * This interface was referenced by `undefined`'s JSON-Schema definition
> 5 |  * via the `patternProperty` "^(?:\S+|/.*/[a-z]*)$".
    |                                                ^
  6 |  */
  7 | [k: string]: string[]
  8 | }
    at null.Ve (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/parser-typescript.js:1:15607)
    at null.vz (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/parser-typescript.js:280:5919)
    at Object.yz (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/parser-typescript.js:280:6242)
    at Object.parse (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/index.js:7334:23)
    at null.coreFormat (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/index.js:8645:18)
    at null.formatWithCursor2 (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/index.js:8837:18)
    at null.<anonymous> (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/index.js:37229:12)
    at null.format (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/prettier@2.7.1/node_modules/prettier/index.js:37243:12)
    at null.format (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/json-schema-to-typescript@11.0.1/node_modules/json-schema-to-typescript/dist/src/formatter.js:20:27)
    at null.<anonymous> (/Users/JounQin/Workspaces/GitHub/eslint-define-config/node_modules/.pnpm/json-schema-to-typescript@11.0.1/node_modules/json-schema-to-typescript/dist/src/index.js:163:49)

image

image

@Shinigami92
Copy link
Collaborator

Yes, I know and this is sadly normal
But the script still works and all these are try-catched
So just ignore the errors and revert all non related files

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 a pull request may close this issue.

2 participants