New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@html-eslint/eslint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@html-eslint/eslint-plugin - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/rules/indent.js

1

lib/configs/recommended.js

@@ -11,3 +11,4 @@ module.exports = {

"@html-eslint/no-duplicate-id": "error",
"@html-eslint/indent": "error",
},
};

13

lib/rules/element-newline.js

@@ -36,3 +36,3 @@ /**

sibilings
.filter((node) => (node.type !== "text") && node.range[0])
.filter((node) => node.type !== "text" && node.range[0])
.forEach((current, index, arr) => {

@@ -45,8 +45,5 @@ const after = arr[index + 1];

messageId: MESSAGE_IDS.EXPECT_NEW_LINE_AFTER,
data: { tag: `<${current.tagName}>`},
data: { tag: `<${current.tagName}>` },
fix(fixer) {
return fixer.insertTextAfter(
current,
"\n"
);
return fixer.insertTextAfter(current, "\n");
},

@@ -70,3 +67,3 @@ });

messageId: MESSAGE_IDS.EXPECT_NEW_LINE_AFTER,
data: { tag: `<${node.tagName}>`},
data: { tag: `<${node.tagName}>` },
fix(fixer) {

@@ -83,3 +80,3 @@ return fixer.insertTextAfter(node.startTag, "\n");

messageId: MESSAGE_IDS.EXPECT_NEW_LINE_BEFORE,
data: { tag: `</${node.tagName}>`},
data: { tag: `</${node.tagName}>` },
fix(fixer) {

@@ -86,0 +83,0 @@ return fixer.insertTextBefore(node.endTag, "\n");

@@ -10,2 +10,4 @@ const requireLang = require("./require-lang");

const elementNewLine = require("./element-newline");
const noSkipHeadingLevels = require("./no-skip-heading-levels");
const indent = require("./indent");

@@ -22,2 +24,4 @@ module.exports = {

"element-newline": elementNewLine,
"no-skip-heading-levels": noSkipHeadingLevels,
indent: indent,
};

@@ -9,3 +9,3 @@ /**

const CATEGORY = require("../constants/rule-category");
const utils = require("./utils");
const { NodeUtils } = require("./utils");

@@ -37,3 +37,3 @@ const MESSAGE_IDS = {

"*"(node) {
const idAttr = utils.findAttr(node, "id");
const idAttr = NodeUtils.findAttr(node, "id");
if (idAttr) {

@@ -40,0 +40,0 @@ if (!IdNodesMap.has(idAttr.value)) {

@@ -9,3 +9,3 @@ /**

const CATEGORY = require("../constants/rule-category");
const utils = require("./utils");
const { NodeUtils } = require("./utils");

@@ -36,3 +36,3 @@ const MESSAGE_IDS = {

"*"(node) {
if (utils.hasAttr(node, "style")) {
if (NodeUtils.hasAttr(node, "style")) {
context.report({

@@ -39,0 +39,0 @@ node: node.startTag,

@@ -10,3 +10,3 @@ /**

const IOS_639_1 = require("../constants/iso_639_1");
const utils = require("./utils");
const { NodeUtils } = require("./utils");

@@ -39,3 +39,3 @@ const MESSAGE_IDS = {

Html(node) {
const langAttr = utils.findAttr(node, "lang");
const langAttr = NodeUtils.findAttr(node, "lang");
if (!langAttr) {

@@ -42,0 +42,0 @@ context.report({

@@ -1,3 +0,7 @@

const utils = require("./utils");
const NodeUtils = require("./node-utils");
const NamingUtils = require("./naming-utils");
module.exports = utils;
module.exports = {
NodeUtils,
NamingUtils,
};

@@ -7,1 +7,23 @@ export type RuleCategory = {

};
type Loc = {
end: {
line: number;
column: number;
};
start: {
line: number;
column: number;
};
};
export interface HTMLNode {
childNodes?: HTMLNode[];
range: [number, number];
startTag: Loc | null;
endTag: Loc | null;
start: number;
end: number;
loc: Loc;
type: string;
}
{
"name": "@html-eslint/eslint-plugin",
"version": "0.3.0",
"version": "0.4.0",
"description": "ESLint plugin for html",

@@ -30,5 +30,5 @@ "author": "yeonjuan",

"devDependencies": {
"@html-eslint/parser": "^0.3.0"
"@html-eslint/parser": "^0.4.0"
},
"gitHead": "229d0fa2f80eb6f34da26fe45768beea16bec53f"
"gitHead": "eef02fe80c18eead290d77b41b38b4281a2599ef"
}
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