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

@linthtml/linthtml

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@linthtml/linthtml - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

7

CHANGELOG.MD
# Changelog
## v0.5.1
### Fix 🛠️
- Generate JSON config file with correct json object inside.
- Use `Object.defineProperty` to add `attributes` property to AST node and fix a runtime error.
## v0.5.0

@@ -4,0 +11,0 @@

2

lib/cli/commands/init.js

@@ -25,3 +25,3 @@ const yaml = require("yaml");

name: ".linthtmlrc.json",
generate_content: (content) => content
generate_content: (content) => JSON.stringify(content, null, "\t")
},

@@ -28,0 +28,0 @@ YAML: {

@@ -111,3 +111,3 @@ /* eslint-disable no-console */

try {
files_linters = linthtml.create_linters_for_files(input, config_path);
files_linters = await linthtml.create_linters_for_files(input, config_path);
searchSpinner.succeed(`Found ${files_linters.length} files`); // deal with 0

@@ -114,0 +114,0 @@ } catch (error) {

@@ -57,6 +57,6 @@ const { config_from_path, find_local_config } = require("./read-config");

function get_files_from_glob(glob_pattern, ignore_config) {
const use_default_ignore = ignore_config === undefined;
return globby.sync(glob_pattern, {
const use_default_ignore = ignore_config === undefined && path.isAbsolute(glob_pattern) === false;
return globby.sync([glob_pattern, ...DEFAULT_EXCLUDED_FOLDERS], {
gitignore: use_default_ignore,
ignore: use_default_ignore ? DEFAULT_EXCLUDED_FOLDERS : [],
expandDirectories: {

@@ -86,2 +86,5 @@ files: ["**/*.html"],

function should_ignore_file(file_path, ignore_pattern) {
if (ignore_pattern === undefined) {
return false;
}
const ignorer = ignore().add(ignore_pattern);

@@ -88,0 +91,0 @@ return ignorer.ignores(file_path);

@@ -106,3 +106,6 @@ const { DomHandler } = require("htmlparser2");

};
node.attributes = this.attributes;
Object.defineProperty(node, "attributes", {
value: this.attributes,
writable: false
});
delete node.attribs;

@@ -109,0 +112,0 @@ this.attributes = [];

{
"name": "@linthtml/linthtml",
"version": "0.5.0",
"version": "0.5.1",
"description": "The html5 linter and validator.",

@@ -22,4 +22,5 @@ "repository": {

"test": "gulp tests",
"lint": "gulp lint",
"coverage": "npx nyc --reporter=lcovonly --reporter=text npm test",
"coverage:report": "npm run coverage && npx nyc report --reporter=text-lcov | coveralls",
"coverage:report": "npm run coverage && npx nyc report --reporter=text-lcov > /dev/null",
"commit": "npx git-cz",

@@ -32,9 +33,8 @@ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r -a",

"@arkweid/lefthook": "^0.7.0",
"@commitlint/cli": "8.3.5",
"@commitlint/config-angular": "8.3.4",
"@commitlint/config-conventional": "8.3.4",
"@commitlint/cli": "11.0.0",
"@commitlint/config-angular": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"chai": "4.2.0",
"commitizen": "4.1.2",
"conventional-changelog-cli": "2.0.34",
"coveralls": "3.1.0",
"commitizen": "4.2.1",
"conventional-changelog-cli": "2.1.0",
"cz-conventional-changelog": "^3.2.0",

@@ -50,9 +50,9 @@ "eslint-config-standard": "^14.1.0",

"lodash.template": ">=4.5.0",
"mocha": "7.1.2"
"mocha": "8.1.3"
},
"dependencies": {
"bulk-require": "1.0.1",
"chalk": "3.0.0",
"chalk": "4.1.0",
"cosmiconfig": "6.0.0",
"globby": "10.0.1",
"globby": "11.0.1",
"htmlparser2": "^4.1.0",

@@ -63,4 +63,4 @@ "ignore": "^5.1.4",

"lodash.pull": "4.1.0",
"meow": "7.0.1",
"ora": "4.0.4",
"meow": "7.1.1",
"ora": "5.1.0",
"table-layout": "1.0.1",

@@ -67,0 +67,0 @@ "yaml": "^1.7.2"

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