Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-code-block-syntax

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-code-block-syntax - npm Package Compare versions

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"]
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc