@linthtml/linthtml
Advanced tools
Comparing version 0.5.0 to 0.5.1
# 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 @@ |
@@ -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" |
457423
18
12190
+ Addedchalk@4.1.0(transitive)
+ Addedglobby@11.0.1(transitive)
+ Addedis-unicode-supported@0.1.0(transitive)
+ Addedlog-symbols@4.1.0(transitive)
+ Addedmeow@7.1.1(transitive)
+ Addedora@5.1.0(transitive)
- Removed@types/glob@7.2.0(transitive)
- Removed@types/minimatch@5.1.2(transitive)
- Removed@types/node@22.13.10(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedarrify@2.0.1(transitive)
- Removedcamelcase@6.3.0(transitive)
- Removedchalk@2.4.23.0.04.1.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedglobby@10.0.1(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedlog-symbols@3.0.0(transitive)
- Removedmeow@7.0.1(transitive)
- Removedora@4.0.4(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedundici-types@6.20.0(transitive)
Updatedchalk@4.1.0
Updatedglobby@11.0.1
Updatedmeow@7.1.1
Updatedora@5.1.0