Socket
Socket
Sign inDemoInstall

eslint-plugin-mdx

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-mdx - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

74

lib/configs/recommended.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.recommended = void 0;
const tslib_1 = require("tslib");
const node_module_1 = require("node:module");
const node_path_1 = tslib_1.__importDefault(require("node:path"));
const base_1 = require("./base");

@@ -15,28 +18,47 @@ const overrides = [

};
try {
require.resolve('prettier');
require.resolve('eslint-plugin-prettier');
overrides.push({
files: '*.md',
rules: {
'prettier/prettier': [
'error',
{
parser: 'markdown',
},
],
},
}, {
files: '*.mdx',
rules: {
'prettier/prettier': [
'error',
{
parser: 'mdx',
},
],
},
});
}
catch (_a) { }
const getImportMetaUrl = () => {
try {
return new Function('return import.meta.url')();
}
catch (_a) {
return node_path_1.default.resolve(process.cwd(), '__test__.js');
}
};
const cjsRequire = typeof require === 'undefined' ? (0, node_module_1.createRequire)(getImportMetaUrl()) : require;
const addPrettierRules = () => {
try {
cjsRequire.resolve('prettier');
const { meta } = cjsRequire('eslint-plugin-prettier');
const version = (meta === null || meta === void 0 ? void 0 : meta.version) || '';
const [major, minor, patch] = version.split('.');
if (+major > 5 ||
(+major === 5 &&
(+minor > 1 || (+minor === 1 && Number.parseInt(patch) >= 2)))) {
return;
}
overrides.push({
files: '*.md',
rules: {
'prettier/prettier': [
'error',
{
parser: 'markdown',
},
],
},
}, {
files: '*.mdx',
rules: {
'prettier/prettier': [
'error',
{
parser: 'mdx',
},
],
},
});
}
catch (_a) { }
};
addPrettierRules();
//# sourceMappingURL=recommended.js.map
{
"name": "eslint-plugin-mdx",
"version": "2.2.1",
"version": "2.3.0",
"description": "ESLint Plugin for MDX",

@@ -34,3 +34,3 @@ "repository": "git+https://github.com/mdx-js/eslint-mdx.git",

"dependencies": {
"eslint-mdx": "^2.2.1",
"eslint-mdx": "^2.3.0",
"eslint-plugin-markdown": "^3.0.1",

@@ -37,0 +37,0 @@ "remark-mdx": "^2.3.0",

@@ -58,3 +58,3 @@ <p align="center">

This repository is a monorepo managed by [Lerna][] what means we actually publish several packages to npm from same codebase, including:
This repository is a monorepo managed by [changesets][] what means we actually publish several packages to npm from same codebase, including:

@@ -167,4 +167,8 @@ | Package | Description | Version |

<!-- mdx v2+ incompatible -->
<!-- prettier-ignore -->
```mdx
<div># Here's a text gradient short code!</div>
<div>
# Here's a text gradient short code!
</div>
```

@@ -202,3 +206,3 @@

Integration with [remark-lint][] plugins, it will read [remark's configuration](https://github.com/remarkjs/remark/tree/master/packages/remark-cli#remark-cli) automatically via [cosmiconfig][]. But `.remarkignore` will not be respected, you should use `.eslintignore` instead.
Integration with [remark-lint][] plugins, it will read [remark's configuration](https://github.com/remarkjs/remark/tree/master/packages/remark-cli#remark-cli) automatically via [unified-engine][]. But `.remarkignore` will not be respected, you should use `.eslintignore` instead.

@@ -247,2 +251,4 @@ If you want to disable or change severity of some related rules, it won't work by setting rules in eslint config like `'remark-lint-no-duplicate-headings': 0`, you should change your remark config instead like following:

[![Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)
| 1stG | RxTS | UnTS |

@@ -263,6 +269,5 @@ | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |

[1stg.me]: https://www.1stg.me
[cosmiconfig]: https://github.com/davidtheclark/cosmiconfig
[changesets]: https://github.com/changesets/changesets
[eslint]: https://eslint.org
[jounqin]: https://GitHub.com/JounQin
[lerna]: https://github.com/lerna/lerna
[jounqin]: https://github.com/JounQin
[mdx]: https://github.com/mdx-js/mdx

@@ -272,4 +277,5 @@ [mit]: http://opensource.org/licenses/MIT

[remark-lint]: https://github.com/remarkjs/remark-lint
[remark-preset-prettier]: https://github.com/JounQin/remark-preset-prettier
[remark-preset-prettier]: https://github.com/un-ts/remark-preset-prettier
[unified-engine]: https://github.com/unifiedjs/unified-engine
[vscode eslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
[vscode mdx]: https://github.com/mdx-js/vscode-mdx
[vscode mdx]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/vscode-mdx

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc