You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
-[VSCode Extension](#vscode-extension)
33
33
-[Packages](#packages)
34
34
-[Install](#install)
35
+
-[Notice](#notice)
35
36
-[Usage](#usage)
36
37
-[Parser Options](#parser-options)
37
38
-[Rules](#rules)
@@ -67,6 +68,12 @@ yarn add -D eslint-plugin-mdx
67
68
npm i -D eslint-plugin-mdx
68
69
```
69
70
71
+
## Notice
72
+
73
+
If you're using multi languages, `js/jsx/ts/tsx/vue`, etc for example, you'd better to always use [`overrides`](https://eslint.org/docs/user-guide/configuring/configuration-files#how-do-overrides-work) feature of ESLint, because configs may be overridden by following configs.
74
+
75
+
See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-736139224) for more details.
76
+
70
77
## Usage
71
78
72
79
1. In your ESLint config file:
@@ -78,7 +85,10 @@ npm i -D eslint-plugin-mdx
78
85
"extends": ["plugin:mdx/recommended"],
79
86
// optional, if you want to lint code blocks at the same time
80
87
"settings": {
81
-
"mdx/code-blocks":true
88
+
"mdx/code-blocks":true,
89
+
// optional, if you want to disable language mapper, set it to `false`
90
+
// if you want to override the default language mapper inside, you can provide your own
91
+
"mdx/language-mapper": {}
82
92
}
83
93
}
84
94
```
@@ -90,7 +100,10 @@ npm i -D eslint-plugin-mdx
90
100
"extends": ["plugin:mdx/recommended"],
91
101
// optional, if you want to lint code blocks at the same time
92
102
"settings": {
93
-
"mdx/code-blocks": true
103
+
"mdx/code-blocks": true,
104
+
// optional, if you want to disable language mapper, set it to `false`
105
+
// if you want to override the default language mapper inside, you can provide your own
106
+
"mdx/language-mapper": {}
94
107
},
95
108
"overrides": [
96
109
{
@@ -127,6 +140,9 @@ npm i -D eslint-plugin-mdx
127
140
// optional, if you want to lint code blocks at the same time
128
141
settings: {
129
142
'mdx/code-blocks': true,
143
+
// optional, if you want to disable language mapper, set it to `false`
144
+
// if you want to override the default language mapper inside, you can provide your own
Copy file name to clipboardExpand all lines: packages/eslint-mdx/README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
-[VSCode Extension](#vscode-extension)
33
33
-[Packages](#packages)
34
34
-[Install](#install)
35
+
-[Notice](#notice)
35
36
-[Usage](#usage)
36
37
-[Parser Options](#parser-options)
37
38
-[Rules](#rules)
@@ -67,6 +68,12 @@ yarn add -D eslint-plugin-mdx
67
68
npm i -D eslint-plugin-mdx
68
69
```
69
70
71
+
## Notice
72
+
73
+
If you're using multi languages, `js/jsx/ts/tsx/vue`, etc for example, you'd better to always use [`overrides`](https://eslint.org/docs/user-guide/configuring/configuration-files#how-do-overrides-work) feature of ESLint, because configs may be overridden by following configs.
74
+
75
+
See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-736139224) for more details.
76
+
70
77
## Usage
71
78
72
79
1. In your ESLint config file:
@@ -78,7 +85,10 @@ npm i -D eslint-plugin-mdx
78
85
"extends": ["plugin:mdx/recommended"],
79
86
// optional, if you want to lint code blocks at the same time
80
87
"settings": {
81
-
"mdx/code-blocks":true
88
+
"mdx/code-blocks":true,
89
+
// optional, if you want to disable language mapper, set it to `false`
90
+
// if you want to override the default language mapper inside, you can provide your own
91
+
"mdx/language-mapper": {}
82
92
}
83
93
}
84
94
```
@@ -90,7 +100,10 @@ npm i -D eslint-plugin-mdx
90
100
"extends": ["plugin:mdx/recommended"],
91
101
// optional, if you want to lint code blocks at the same time
92
102
"settings": {
93
-
"mdx/code-blocks": true
103
+
"mdx/code-blocks": true,
104
+
// optional, if you want to disable language mapper, set it to `false`
105
+
// if you want to override the default language mapper inside, you can provide your own
106
+
"mdx/language-mapper": {}
94
107
},
95
108
"overrides": [
96
109
{
@@ -127,6 +140,9 @@ npm i -D eslint-plugin-mdx
127
140
// optional, if you want to lint code blocks at the same time
128
141
settings: {
129
142
'mdx/code-blocks': true,
143
+
// optional, if you want to disable language mapper, set it to `false`
144
+
// if you want to override the default language mapper inside, you can provide your own
Copy file name to clipboardExpand all lines: packages/eslint-plugin-mdx/README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
-[VSCode Extension](#vscode-extension)
33
33
-[Packages](#packages)
34
34
-[Install](#install)
35
+
-[Notice](#notice)
35
36
-[Usage](#usage)
36
37
-[Parser Options](#parser-options)
37
38
-[Rules](#rules)
@@ -67,6 +68,12 @@ yarn add -D eslint-plugin-mdx
67
68
npm i -D eslint-plugin-mdx
68
69
```
69
70
71
+
## Notice
72
+
73
+
If you're using multi languages, `js/jsx/ts/tsx/vue`, etc for example, you'd better to always use [`overrides`](https://eslint.org/docs/user-guide/configuring/configuration-files#how-do-overrides-work) feature of ESLint, because configs may be overridden by following configs.
74
+
75
+
See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-736139224) for more details.
76
+
70
77
## Usage
71
78
72
79
1. In your ESLint config file:
@@ -78,7 +85,10 @@ npm i -D eslint-plugin-mdx
78
85
"extends": ["plugin:mdx/recommended"],
79
86
// optional, if you want to lint code blocks at the same time
80
87
"settings": {
81
-
"mdx/code-blocks":true
88
+
"mdx/code-blocks":true,
89
+
// optional, if you want to disable language mapper, set it to `false`
90
+
// if you want to override the default language mapper inside, you can provide your own
91
+
"mdx/language-mapper": {}
82
92
}
83
93
}
84
94
```
@@ -90,7 +100,10 @@ npm i -D eslint-plugin-mdx
90
100
"extends": ["plugin:mdx/recommended"],
91
101
// optional, if you want to lint code blocks at the same time
92
102
"settings": {
93
-
"mdx/code-blocks": true
103
+
"mdx/code-blocks": true,
104
+
// optional, if you want to disable language mapper, set it to `false`
105
+
// if you want to override the default language mapper inside, you can provide your own
106
+
"mdx/language-mapper": {}
94
107
},
95
108
"overrides": [
96
109
{
@@ -127,6 +140,9 @@ npm i -D eslint-plugin-mdx
127
140
// optional, if you want to lint code blocks at the same time
128
141
settings: {
129
142
'mdx/code-blocks': true,
143
+
// optional, if you want to disable language mapper, set it to `false`
144
+
// if you want to override the default language mapper inside, you can provide your own
0 commit comments