Comments (11)
@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.
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.
@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.
@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.
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.
Just PR to update it. :)
from eslint-mdx.
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.
FYI, https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/eslintrc.json
from eslint-mdx.
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.
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.
@lolmaus IMO eslint
should always be one of peerDependencies
. 🤣
Glad that you've resolved your problem.
from eslint-mdx.
Related Issues (20)
- Parsing error mdx: Missing semicolon HOT 3
- Parsing error with Latex HOT 2
- Document usage in flat config HOT 1
- Parsing error: Expected value to be truthy HOT 4
- How can you type check React props with this plugin? HOT 4
- Please document how to make the linter fixable HOT 3
- Does not check nested code blocks (only lints top-level code blocks) HOT 6
- Research Spike: ESLint 9 compatibility HOT 7
- Incompatible w/ MDX v3? HOT 2
- There are serious issues when used with the `react/self-closing-comp` / `react/jsx-sort-props` rules. HOT 6
- `prettier/prettier` reports, but cannot be fixed automatically
- feat: use `worker.mts` for pure ESM
- feat: respect `.remarkignore`?
- Add more mdast specified nodes into estree AST
- on npm eslint-plugin-mdx v2.3.2 is tagged as latest while v3.1.3 should be HOT 2
- TypeError: Cannot use 'in' operator to search for 'start' in undefined
- maintenance: enable `strictNullChecks` option
- meta: how can we support `eslint-define-config` better? HOT 6
- mdx/code-blocks doesn't respect eslint-disable from outside of the block HOT 3
- bump up eslint-plugin-markdown to support eslint V9 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-mdx.