remark-lint-code-block-syntax
Advanced tools
Comparing version 0.2.1 to 0.3.0
13
index.js
@@ -1,10 +0,9 @@ | ||
"use strict"; | ||
import { lintRule } from "unified-lint-rule"; | ||
import { visit } from "unist-util-visit"; | ||
import { default as esprima } from "esprima"; | ||
import { default as yaml } from "js-yaml"; | ||
const rule = require("unified-lint-rule"); | ||
const visit = require("unist-util-visit"); | ||
const esprima = require("esprima"); | ||
const yaml = require("js-yaml"); | ||
const remarkLintCodeBlockSyntax = lintRule("remark-lint:code-block-syntax", codeSyntax); | ||
export default remarkLintCodeBlockSyntax; | ||
module.exports = rule("remark-lint:code-block-syntax", codeSyntax); | ||
function codeSyntax(tree, file) { | ||
@@ -11,0 +10,0 @@ const supportedLangs = ["js", "json", "yaml"]; |
{ | ||
"name": "remark-lint-code-block-syntax", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "A remark-lint rule to check language syntax in a code block.", | ||
@@ -16,8 +16,20 @@ "author": "Masafumi Koba", | ||
"repository": "ybiquitous/remark-lint-code-block-syntax", | ||
"main": "index.js", | ||
"files": [], | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
"test": "jest", | ||
"lint": "npx eslint . && npx prettier --check .", | ||
"format": "npx prettier --write ." | ||
"test": "NODE_OPTIONS=--experimental-vm-modules jest", | ||
"lint": "npm run eslint && npm run prettier:check", | ||
"lint:fix": "npm run eslint:fix && npm run prettier:write", | ||
"eslint": "npx eslint --ignore-path=.gitignore .", | ||
"eslint:fix": "npm run eslint -- --fix", | ||
"prettier": "npx prettier --ignore-path=.gitignore .", | ||
"prettier:check": "npm run prettier -- --check", | ||
"prettier:write": "npm run prettier -- --write", | ||
"prepublishOnly": "npm test" | ||
}, | ||
@@ -27,9 +39,21 @@ "dependencies": { | ||
"js-yaml": "^4.0.0", | ||
"unified-lint-rule": "^1.0.5", | ||
"unist-util-visit": "^2.0.2" | ||
"unified-lint-rule": "^2.0.0", | ||
"unist-util-visit": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"jest": "^26.0.1", | ||
"remark": "^13.0.0" | ||
"jest": "^27.0.3", | ||
"remark": "^14.0.1" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es2017": true, | ||
"node": true, | ||
"jest": true | ||
} | ||
} | ||
} |
@@ -21,6 +21,16 @@ [![npm](https://img.shields.io/npm/v/remark-lint-code-block-syntax?style=flat-square)](https://www.npmjs.com/package/remark-lint-code-block-syntax) | ||
Via a command-line argument: | ||
```console | ||
$ npx remark -u remark-lint-code-block-syntax | ||
$ remark --use remark-lint-code-block-syntax | ||
docs/config.md | ||
32:1-32:4 warning Invalid JSON: Unexpected token a in JSON at position 128 code-block-syntax remark-lint | ||
``` | ||
Via a configuration file: | ||
```json | ||
{ | ||
"plugins": ["remark-lint-code-block-syntax"] | ||
} | ||
``` |
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
4783
36
Yes
+ Addedbail@2.0.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedis-plain-obj@4.1.0(transitive)
+ Addedtrough@2.2.0(transitive)
+ Addedunified@10.1.2(transitive)
+ Addedunified-lint-rule@2.1.2(transitive)
+ Addedunist-util-is@5.2.1(transitive)
+ Addedunist-util-stringify-position@3.0.3(transitive)
+ Addedunist-util-visit@4.1.2(transitive)
+ Addedunist-util-visit-parents@5.1.3(transitive)
+ Addedvfile@5.3.7(transitive)
+ Addedvfile-message@3.1.4(transitive)
- Removedco@3.1.0(transitive)
- Removedsliced@1.0.1(transitive)
- Removedunified-lint-rule@1.0.6(transitive)
- Removedunist-util-is@4.1.0(transitive)
- Removedunist-util-visit@2.0.3(transitive)
- Removedunist-util-visit-parents@3.1.1(transitive)
- Removedwrapped@1.0.1(transitive)
Updatedunified-lint-rule@^2.0.0
Updatedunist-util-visit@^4.0.0