remark-lint-code-block-syntax
Advanced tools
Comparing version 0.3.0 to 0.4.0
import { lintRule } from "unified-lint-rule"; | ||
import { visit } from "unist-util-visit"; | ||
import { default as esprima } from "esprima"; | ||
import { default as swc } from "@swc/core"; | ||
import { default as yaml } from "js-yaml"; | ||
@@ -46,3 +46,6 @@ | ||
try { | ||
esprima.parseScript(code); | ||
swc.parseSync(code, { | ||
syntax: "ecmascript", | ||
target: "es2022", | ||
}); | ||
return null; | ||
@@ -49,0 +52,0 @@ } catch (e) { |
{ | ||
"name": "remark-lint-code-block-syntax", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "A remark-lint rule to check language syntax in a code block.", | ||
@@ -36,3 +36,3 @@ "author": "Masafumi Koba", | ||
"dependencies": { | ||
"esprima": "^4.0.1", | ||
"@swc/core": "^1.2.171", | ||
"js-yaml": "^4.0.0", | ||
@@ -56,4 +56,10 @@ "unified-lint-rule": "^2.0.0", | ||
"jest": true | ||
} | ||
}, | ||
"ignorePatterns": [ | ||
"coverage", | ||
"dist", | ||
"tmp" | ||
], | ||
"reportUnusedDisableDirectives": true | ||
} | ||
} |
4964
66
+ Added@swc/core@^1.2.171
+ Added@swc/core@1.10.11(transitive)
+ Added@swc/core-darwin-arm64@1.10.11(transitive)
+ Added@swc/core-darwin-x64@1.10.11(transitive)
+ Added@swc/core-linux-arm-gnueabihf@1.10.11(transitive)
+ Added@swc/core-linux-arm64-gnu@1.10.11(transitive)
+ Added@swc/core-linux-arm64-musl@1.10.11(transitive)
+ Added@swc/core-linux-x64-gnu@1.10.11(transitive)
+ Added@swc/core-linux-x64-musl@1.10.11(transitive)
+ Added@swc/core-win32-arm64-msvc@1.10.11(transitive)
+ Added@swc/core-win32-ia32-msvc@1.10.11(transitive)
+ Added@swc/core-win32-x64-msvc@1.10.11(transitive)
+ Added@swc/counter@0.1.3(transitive)
+ Added@swc/types@0.1.17(transitive)
- Removedesprima@^4.0.1
- Removedesprima@4.0.1(transitive)