eslint-mdx
Advanced tools
Comparing version 1.4.0 to 1.4.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.4.2](https://github.com/rx-ts/eslint-mdx/compare/v1.4.1...v1.4.2) (2019-09-04) | ||
### Bug Fixes | ||
* **deps:** update dependency remark-mdx to ^1.4.3 ([#56](https://github.com/rx-ts/eslint-mdx/issues/56)) ([b49641a](https://github.com/rx-ts/eslint-mdx/commit/b49641a)) | ||
# [1.4.0](https://github.com/rx-ts/eslint-mdx/compare/v1.3.1...v1.4.0) (2019-08-22) | ||
@@ -8,0 +19,0 @@ |
@@ -78,3 +78,3 @@ "use strict"; | ||
var end = range[1] + offset; | ||
return tslib_1.__assign({}, node, { start: start, | ||
return tslib_1.__assign(tslib_1.__assign({}, node), { start: start, | ||
end: end, range: [start, end], loc: { | ||
@@ -81,0 +81,0 @@ start: { |
@@ -47,3 +47,3 @@ "use strict"; | ||
Object.assign(node, { | ||
data: tslib_1.__assign({}, node.data, { jsxType: 'JSXElementWithHTMLComments', comments: comments_1, | ||
data: tslib_1.__assign(tslib_1.__assign({}, node.data), { jsxType: 'JSXElementWithHTMLComments', comments: comments_1, | ||
// jsx in paragraph is considered as plain html in mdx, what means html style comments are valid | ||
@@ -95,3 +95,3 @@ // TODO: in this case, jsx style comments could be a mistake | ||
var root = exports.mdxProcessor.parse(code); | ||
this._ast = tslib_1.__assign({}, helper_1.normalizePosition(root.position), { type: 'Program', sourceType: options.sourceType || 'module', body: [], comments: [], tokens: [] }); | ||
this._ast = tslib_1.__assign(tslib_1.__assign({}, helper_1.normalizePosition(root.position)), { type: 'Program', sourceType: options.sourceType || 'module', body: [], comments: [], tokens: [] }); | ||
this._services = { | ||
@@ -98,0 +98,0 @@ JSXElementsWithHTMLComments: [], |
{ | ||
"name": "eslint-mdx", | ||
"version": "1.4.0", | ||
"version": "1.4.2", | ||
"description": "ESLint Parser for MDX", | ||
@@ -24,6 +24,6 @@ "repository": "git@github.com:rx-ts/eslint-mdx.git", | ||
"dependencies": { | ||
"remark-mdx": "^1.3.1", | ||
"remark-mdx": "^1.4.3", | ||
"remark-parse": "^7.0.1" | ||
}, | ||
"gitHead": "ad7663d7dbe26545c6348f6c1040d0b48fdb278d" | ||
"gitHead": "92a8a7c28540c55028d4c6ae4bf6f23f026f7258" | ||
} |
@@ -27,3 +27,3 @@ <p align="center"> | ||
> Work perfectly with `eslint-plugin-import`, `eslint-plugin-prettier` or any other eslint plugins. | ||
> And also can be integrated with [remark][] plugins to lint non ES syntaxes. | ||
> And also can be integrated with [remark-lint][] plugins to lint markdown syntaxes. | ||
@@ -42,2 +42,3 @@ ## TOC <!-- omit in toc --> | ||
- [mdx/remark](#mdxremark) | ||
- [Prettier Integration](#prettier-integration) | ||
- [Changelog](#changelog) | ||
@@ -77,3 +78,3 @@ - [License](#license) | ||
```json | ||
```jsonc | ||
{ | ||
@@ -83,2 +84,14 @@ "extends": ["plugin:mdx/recommended"], | ||
{ | ||
"files": ["*.md"], | ||
"rules": { | ||
"prettier/prettier": [ | ||
2, | ||
{ | ||
// unnecessary if you're not using `eslint-plugin-prettier`, but required if you are | ||
"parser": "markdown" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.mdx"], | ||
@@ -95,3 +108,2 @@ "extends": ["plugin:mdx/overrides"] | ||
const { configs } = require('eslint-plugin-mdx') | ||
const rebass = require('rebass') | ||
@@ -101,2 +113,14 @@ module.exports = { | ||
overrides: [ | ||
{ | ||
files: ['*.md'], | ||
rules: { | ||
'prettier/prettier': [ | ||
2, | ||
{ | ||
// unnecessary if you're not using `eslint-plugin-prettier`, but required if you are | ||
parser: 'markdown', | ||
}, | ||
], | ||
}, | ||
}, | ||
Object.assign( | ||
@@ -153,4 +177,19 @@ { | ||
Integration with [remark][] plugins without [remark-lint][], 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 [cosmiconfig][]. But `.remarkignore` will not be respected, you should use `.eslintignore` instead. | ||
## Prettier Integration | ||
If you're using [remark-lint][] feature with [Prettier][] both together, you can try [remark-preset-prettier][] which helps you to _turn off all rules that are unnecessary or might conflict with [Prettier]_. | ||
```json | ||
{ | ||
"plugins": [ | ||
"preset-lint-consistent", | ||
"preset-lint-recommended", | ||
"preset-lint-markdown-style-guide", | ||
"preset-prettier" | ||
] | ||
} | ||
``` | ||
## Changelog | ||
@@ -172,5 +211,6 @@ | ||
[mit]: http://opensource.org/licenses/MIT | ||
[remark]: https://github.com/remarkjs/remark | ||
[prettier]: https://prettier.io | ||
[remark-lint]: https://github.com/remarkjs/remark-lint | ||
[remark-preset-prettier]: https://github.com/JounQin/remark-preset-prettier | ||
[vscode eslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint | ||
[vscode mdx]: https://github.com/rx-ts/vscode-mdx |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66110
209
Updatedremark-mdx@^1.4.3