eslint-mdx
eslint-mdx copied to clipboard
Invalid reporting of `no-unused-expressions` for `_.{keys(mainnets).length}`
trafficstars
Initial checklist
- [x] I read the support docs
- [x] I read the contributing guide
- [x] I agree to follow the code of conduct
- [x] I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
eslint-plugin-mdx
Steps to reproduce
See the use of _.keys here:
---
id: chains
title: Supported Chains
sidebar_position: 7
---
import Link from "@docusaurus/Link";
import Chains from "@site/src/components/organisms/Chains";
import { Links } from "@site/src/constants";
import _ from "lodash";
import { mainnets, testnets } from "sablier";
Sablier Protocol is live on {_.keys(mainnets).length} mainnets and {_.keys(testnets).length} testnets, although not all of these chains are supported by the
[Sablier Interface](https://app.sablier.com/). If you're interested in having your chain listed in the Interface, fill out <Link href={Links.Forms.CALL}>this form</Link>.
Actual behavior
13:30 error Expected an assignment or function call and instead saw an expression no-unused-expressions
Expected behavior
There should be no error because that is perfectly legitimate MDX code. It compiles.
Runtime
No response
Package manager
bun
Operating system
Build and bundle tools
Docusaurus