Giter VIP home page Giter VIP logo

Comments (11)

JounQin avatar JounQin commented on July 26, 2024

@cdfa The parser inside should only affect .mdx files, that why we need to use overrides, and overrides in npm in not extendable: eslint/eslint#12032.

So, overrides at top level is needed, and it does work on my side.

See https://github.com/JounQin/Slides/blob/master/package.json#L42-L69 for demo.

from eslint-mdx.

cdfa avatar cdfa commented on July 26, 2024

Hmm, I'm not sure if I completely understand, but that seems to be an issue specifically with usage from the package.json, while the instructions specifically say to put it in the eslint config file. Anyway, adding it to the main extends list seems to work fine for me (except for the parsing issue #4)

from eslint-mdx.

JounQin avatar JounQin commented on July 26, 2024

@cdfa My demo is using package.json, and I tried .eslintrc, it also works.
Did you upgrade to latest eslint? Your linked issue had been marked as resolved as far as I know.

from eslint-mdx.

JounQin avatar JounQin commented on July 26, 2024

@cdfa I tried "eslint": "^5.0.0", I have the following error like your description:

Error: ESLint configuration in /Users/JounQin/Workspaces/GitHub/eslint-plugin-mdx/.eslintrc.js is invalid:
        - Unexpected top-level property "overrides[1].extends".

So I should upgrade the peerDependency eslint version to >= 6.0.0

from eslint-mdx.

cdfa avatar cdfa commented on July 26, 2024

My demo is using package.json, and I tried .eslintrc, it also works.

I think eslint won't complain about it when running it for some reason, but the JSON schema for the .eslintrc simply doesn't allow it and my editors are warning me about it. Thinking about it, it may be that that schema is different than what eslint uses internally. I'll go ask if it can be updated.

from eslint-mdx.

JounQin avatar JounQin commented on July 26, 2024

Just PR to update it. :)

from eslint-mdx.

cdfa avatar cdfa commented on July 26, 2024

Well, I couldn't find the current version of the schema in their repo, so just gonna make an issue about it.

from eslint-mdx.

JounQin avatar JounQin commented on July 26, 2024

FYI, https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/eslintrc.json

from eslint-mdx.

cdfa avatar cdfa commented on July 26, 2024

Yeah that's current version on schemastore, but apparently eslint is using a different version internally and that one should be copied to schemastore.

from eslint-mdx.

lolmaus avatar lolmaus commented on July 26, 2024

Had this problem because eslint was an implicit dependency, and apparently an old version got installed.

Doing yarn add -D eslint (or npm i -D eslint) resolves the issue.

from eslint-mdx.

JounQin avatar JounQin commented on July 26, 2024

@lolmaus IMO eslint should always be one of peerDependencies. 🤣
Glad that you've resolved your problem.

from eslint-mdx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.