@ocavue/eslint-config 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/markdown.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/markdown.js +13 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,kGAuDC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"packageManager": "pnpm@9.7.1",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "ocavue <ocavue@gmail.com>",
|
|
@@ -34,15 +34,14 @@
|
|
|
34
34
|
"@eslint-types/unicorn": "^52.0.0",
|
|
35
35
|
"@eslint/compat": "^1.1.1",
|
|
36
36
|
"@eslint/js": "^9.9.0",
|
|
37
|
+
"@eslint/markdown": "^6.0.0",
|
|
37
38
|
"@types/eslint": "^9.6.0",
|
|
38
|
-
"@types/eslint-plugin-markdown": "^2.0.2",
|
|
39
39
|
"eslint-config-flat-gitignore": "^0.1.8",
|
|
40
40
|
"eslint-config-prettier": "^9.1.0",
|
|
41
41
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
42
42
|
"eslint-plugin-antfu": "^2.3.5",
|
|
43
43
|
"eslint-plugin-import-x": "^3.1.0",
|
|
44
44
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
45
|
-
"eslint-plugin-markdown": "^5.1.0",
|
|
46
45
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
47
46
|
"eslint-plugin-react": "^7.35.0",
|
|
48
47
|
"eslint-plugin-react-hooks": "^4.6.2",
|
package/src/markdown.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
import markdownPlugin from 'eslint
|
|
3
|
+
import markdownPlugin from '@eslint/markdown'
|
|
4
4
|
|
|
5
5
|
import { GLOB_MARKDOWN, GLOB_SRC, GLOB_VUE } from './shared.js'
|
|
6
6
|
|
|
7
7
|
export function markdown() {
|
|
8
|
+
const recommended = markdownPlugin.configs?.processor
|
|
9
|
+
|
|
10
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
11
|
+
const recommendedConfig = Array.isArray(recommended)
|
|
12
|
+
? recommended
|
|
13
|
+
: (() => {
|
|
14
|
+
throw new Error(
|
|
15
|
+
'[@ocavue/eslint-config] markdown recommended is not an array',
|
|
16
|
+
)
|
|
17
|
+
})()
|
|
18
|
+
|
|
8
19
|
/** @type {import('eslint').Linter.Config[]} */
|
|
9
20
|
const config = [
|
|
10
|
-
|
|
11
|
-
...markdownPlugin.configs.recommended,
|
|
21
|
+
...recommendedConfig,
|
|
12
22
|
|
|
13
23
|
{
|
|
14
24
|
files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, `${GLOB_MARKDOWN}/${GLOB_VUE}`],
|