Closed KevinGhadyani-minted closed 3 years ago
I have a bunch of ESLint plugins and want to add this MDX one to the mix. Sadly, it seems my other plugins all interfere with each other.
The other library has these plugins:
plugins: [ 'import', 'modules-newline', 'putout', 'sort-destructure-keys', ],
It appears that some like putout aren't specific to .js files; therefore, they'll run on MDX files.
putout
.js
This is the ESLint config I settled on:
module.exports = { overrides: [ { extends: [ '@company/eslint-config-core', '@company/eslint-config-react', '@company/eslint-config-jest', 'plugin:cypress/recommended', ], files: '**/*.{js,jsx,ts,tsx}', parser: '@babel/eslint-parser', plugins: [ 'cypress', ], rules: { 'react/react-in-jsx-scope': 'off', }, }, { extends: [ 'plugin:json/recommended', ], files: '**/*.{json}', }, { extends: [ 'plugin:mdx/recommended', 'plugin:mdx/overrides', 'plugin:mdx/code-blocks', ], files: '**/*.{md,mdx}', parser: 'eslint-mdx', settings: { 'mdx/code-blocks': true, }, }, ], parserOptions: { babelOptions: { configFile: ( require .resolve( '@company/babel-config-scripts-app' ) ), }, ecmaVersion: 2021, sourceType: 'module', }, rules: { 'react/react-in-jsx-scope': 'off', }, };
"eslint-plugin-mdx": "^1.14.1"
v14.17.4
1.22.5
Only eslint-mdx should be linting MD and MDX files.
All MD and MDX files are linted by other plugins which aren't eslint-mdx.
Please provide a minimal reproduction, the issue content does not help much.
I don't have time to make a reproduction. Closing the issue.
Subject of the issue
I have a bunch of ESLint plugins and want to add this MDX one to the mix. Sadly, it seems my other plugins all interfere with each other.
The other library has these plugins:
It appears that some like
putout
aren't specific to.js
files; therefore, they'll run on MDX files.This is the ESLint config I settled on:
Your environment
"eslint-plugin-mdx": "^1.14.1"
.v14.17.4
and yarn1.22.5
.Steps to reproduce
Expected behaviour
Only eslint-mdx should be linting MD and MDX files.
Actual behaviour
All MD and MDX files are linted by other plugins which aren't eslint-mdx.