{"_id":"html-structure-linter","_rev":"34-052374b7e735db13cd8d39a94d3d1ab2","name":"html-structure-linter","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.2":{"name":"html-structure-linter","version":"0.0.2","license":"MIT","_id":"html-structure-linter@0.0.2","maintainers":[{"name":"namics","email":"ernst.ammann+npm@namics.com"}],"bin":{"html-structure-linter":"lib/bin.js"},"dist":{"shasum":"6e35e4caf7d9aef038cbf67b13a7f41fdac62199","tarball":"https://registry.npmjs.org/html-structure-linter/-/html-structure-linter-0.0.2.tgz","integrity":"sha512-UfV/9/MYSII9e67YJQvokFIxwXpAE8gQJgEAWzWTtQBNrH9+eKxSlGJ87G3L9UvHAr19WptZimVmFzMOY41WEA==","signatures":[{"sig":"MEUCIQD8luf0HR9JrEssOKvTpXN6Y1OgLwQRp8YxwAOdDh0KngIgPZDdqUnGQdG3ycCvfVoOYahrjan5TjugJY0/QQCVk+0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"jest":{"testRegex":"(\\.(test|spec))\\.ts$","transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js"]},"main":"lib/index.js","_from":".","files":["lib","src"],"_shasum":"6e35e4caf7d9aef038cbf67b13a7f41fdac62199","gitHead":"f7124a934fe1b3ad6e9e4fe7e06f193a0e3e9bb1","scripts":{"test":"jest","compile":"tsc","prepare":"npm-run-all prepare:*","prepare:test":"npm run test","prepare:build":"npm run compile"},"typings":"lib/index","_npmUser":{"name":"namics","email":"ernst.ammann+npm@namics.com"},"repository":{"url":"https://github.com/namics/html-structure-linter/","type":"git"},"_npmVersion":"4.0.5","description":"Searches through a given list of html files for css selectors","directories":{},"_nodeVersion":"4.7.2","dependencies":{"cheerio":"^0.22.0","glob-all":"^3.1.0","minimist":"^1.2.0","fs-promise":"^2.0.0","vfile-location":"^2.0.1"},"devDependencies":{"jest":"^18.1.0","tslint":"^4.4.2","ts-jest":"^18.0.3","codelyzer":"^2.0.0","typescript":"^2.1.6","@types/jest":"^18.1.1","npm-run-all":"^4.0.1","@types/cheerio":"^0.17.31","@types/minimist":"^1.2.0","@types/minimatch":"^2.0.29","@types/fs-promise":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/html-structure-linter-0.0.2.tgz_1487342682938_0.3904792726971209","host":"packages-12-west.internal.npmjs.com"}},"0.0.3":{"name":"html-structure-linter","version":"0.0.3","license":"MIT","_id":"html-structure-linter@0.0.3","maintainers":[{"name":"namics","email":"ernst.ammann+npm@namics.com"}],"bin":{"html-structure-linter":"./lib/bin.js"},"dist":{"shasum":"578741adbfca8de151c8bd2a46f0e022099a565e","tarball":"https://registry.npmjs.org/html-structure-linter/-/html-structure-linter-0.0.3.tgz","integrity":"sha512-/ef8pl3WGkz63erWmJecHP1rzTnXxuFjzITwkEgnhiv8JSYx68te1H8drar9dNdG7VWKrbNfmb6qWB2E1FnK1Q==","signatures":[{"sig":"MEYCIQCZTRJcpFh/tHDiBQidraOHvGUIBTl/HgvHuADXnb/RCwIhAOK2J8lly2f/osfgdEO0+rLKZLJih7CotUJfBh4AM2or","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"jest":{"testRegex":"(\\.(test|spec))\\.ts$","transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js"]},"main":"lib/index.js","_from":".","files":["lib","src"],"_shasum":"578741adbfca8de151c8bd2a46f0e022099a565e","gitHead":"f7124a934fe1b3ad6e9e4fe7e06f193a0e3e9bb1","scripts":{"test":"jest","compile":"tsc","prepare":"npm-run-all prepare:*","prepare:test":"npm run test","prepare:build":"npm run compile"},"typings":"lib/index","_npmUser":{"name":"namics","email":"ernst.ammann+npm@namics.com"},"repository":{"url":"https://github.com/namics/html-structure-linter/","type":"git"},"_npmVersion":"4.0.5","description":"Searches through a given list of html files for css selectors","directories":{},"_nodeVersion":"4.7.2","dependencies":{"cheerio":"^0.22.0","glob-all":"^3.1.0","minimist":"^1.2.0","fs-promise":"^2.0.0","vfile-location":"^2.0.1"},"devDependencies":{"jest":"^18.1.0","tslint":"^4.4.2","ts-jest":"^18.0.3","codelyzer":"^2.0.0","typescript":"^2.1.6","@types/jest":"^18.1.1","npm-run-all":"^4.0.1","@types/cheerio":"^0.17.31","@types/minimist":"^1.2.0","@types/minimatch":"^2.0.29","@types/fs-promise":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/html-structure-linter-0.0.3.tgz_1487343596191_0.5255299010314047","host":"packages-18-east.internal.npmjs.com"}},"0.0.4":{"name":"html-structure-linter","version":"0.0.4","license":"MIT","_id":"html-structure-linter@0.0.4","maintainers":[{"name":"ernscht","email":"ernscht@gmail.com"},{"name":"namicsorg","email":"oss@namics.com"},{"name":"jantimon","email":"j.nicklas@me.com"}],"bin":{"html-structure-linter":"./lib/bin.js"},"dist":{"shasum":"de36c6cbd1d5fc17acae560d037af3fd31606596","tarball":"https://registry.npmjs.org/html-structure-linter/-/html-structure-linter-0.0.4.tgz","integrity":"sha512-Gt5LD18o4wiSR4xE/gzAQQ94rum98D4NFqKa2uq6GH41xO6vUqOwcYirCSCzSwudywtMdmjEVbyQpnTiGWftqQ==","signatures":[{"sig":"MEQCIFbivB12U3L+Ddl6CEtbsN6+bVQTNCfTtTR4/yIHM+ZSAiBXY5b0HgCXuAqr54rNSEK51eJYaGMhHHLk+uqT8soxHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"jest":{"testRegex":"(\\.(test|spec))\\.ts$","transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js"]},"main":"lib/index.js","_from":".","files":["lib","src"],"_shasum":"de36c6cbd1d5fc17acae560d037af3fd31606596","gitHead":"49cefde2e230098124bfa25274ede7d49a9081ad","scripts":{"test":"jest","compile":"tsc","prepare":"npm-run-all prepare:*","prepare:test":"npm run test","prepare:build":"npm run compile"},"typings":"lib/index","_npmUser":{"name":"ernscht","email":"ernscht@gmail.com"},"repository":{"url":"https://github.com/namics/html-structure-linter/","type":"git"},"_npmVersion":"4.0.5","description":"Searches through a given list of html files for css selectors","directories":{},"_nodeVersion":"6.11.0","dependencies":{"cheerio":"^0.22.0","glob-all":"^3.1.0","minimist":"^1.2.0","fs-promise":"^2.0.3","vfile-location":"^2.0.1"},"devDependencies":{"jest":"^20.0.4","tslint":"^5.5.0","ts-jest":"^20.0.7","codelyzer":"^3.1.2","typescript":"^2.4.1","@types/jest":"^20.0.2","npm-run-all":"^4.0.2","@types/cheerio":"^0.22.2","@types/minimist":"^1.2.0","@types/minimatch":"^2.0.29","@types/fs-promise":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/html-structure-linter-0.0.4.tgz_1500032209310_0.9694294130895287","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"html-structure-linter","version":"0.1.0","license":"MIT","_id":"html-structure-linter@0.1.0","maintainers":[{"name":"tsailer","email":"tobias.sailer@gmail.com"},{"name":"namicsorg","email":"oss@namics.com"},{"name":"ernscht","email":"ernscht@gmail.com"},{"name":"tamara027","email":"taca027@gmail.com"},{"name":"zidizei","email":"zidizei@gmail.com"},{"name":"danielkochde","email":"daniel@danielkoch.de"},{"name":"dominic.modalek","email":"dominic.modalek@namics.com"}],"homepage":"https://github.com/merkle-open/html-structure-linter#readme","bugs":{"url":"https://github.com/merkle-open/html-structure-linter/issues"},"bin":{"html-structure-linter":"lib/bin.js"},"dist":{"shasum":"cd71d7e5d46845eb1dd1e2552c45c1c6ce674192","tarball":"https://registry.npmjs.org/html-structure-linter/-/html-structure-linter-0.1.0.tgz","fileCount":15,"integrity":"sha512-NxiMCUvbQAVwfJMZo8xIDP5T90TcQpff8XOpYanWPMKiSgOakAgz9CThUCFUijcoyR7MusbwCCvxDhdwpVt4Iw==","signatures":[{"sig":"MEYCIQChFjOyKO2leO+ayMP1SVFqvnQW8yKQsAgK3xCNlqLo4AIhAIOzeHygeXXzjeUoFfSt5ptIBIsp8LOfWErOxF1iGbhl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmhkZCRA9TVsSAnZWagAAnScQAJaNdri7sX9/HcAxkOdK\nYeO0Y2KI7D4Ieqhoxzv9E5gXytlU8vef+SepSDIKWFKkBToP234CPp5TpNrl\n5o4gEdp4MOOU0RY5T4Wq9cbLT9Z0uc/5nbkQQV30ht7iNWUsu22ab31L4r/F\nofVXnpop0s3+EHj6/ifR837mCYgVOfN2D9GKPtAFWbU2vNHaC3HqYRTxXr4U\nKKaOhBoP9by20riVaNQhDH5Qw4oCBi2cI7QaSWQq0fAQ5cLNzCZb85VvJSZw\nTI367p/zFVNJSdcuU5xSUe0aWqiO7X3X3pHqz0d3BwuOmT/bNZGfb6MW+gqt\nHFN6/zznBQzglNi8M6TJuTcfWuH2ujf5aNrAI9cr/3n1mw9g+Llxi0/VJY1p\nBA+0EWN2E0iw/bPLLpi3sfitGC+lUJIqMiYSKSscb7800oKhxYtIzu/O9Rhc\nB3DNKT0J2iMXiJtZNpmHYKnecjbp7KYMsrPaTS5USbbToSnBl0RkUpZcmVLx\nAokX2vsfgZmlAiL+4Ce0+659iCw+8tZX6o7pBBajl46zJ63kyDdneCcqQ/iI\nBCxnTiDD9t2E+Ws6eiGLv8M9bZiFN2UV11Eatfq6ieTfYx76h/yWBFRdzv2S\n9fWybXrO1PnNR6Vl3EdJnCM35xWTz4xRGBtzNHW6F8WiirwuDRCL+FXHkPME\n80+1\r\n=ftrH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testRegex":"(\\.(test|spec))\\.ts$","transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"lib/index.js","gitHead":"04cc4f519acd8a7816a3f62ca862b27a96c0b044","scripts":{"test":"jest","clean":"npx --ignore-existing --quiet rimraf package-lock.json node_modules","compile":"tsc","prepare":"npm-run-all prepare:*","prepare:test":"npm run test","prepare:build":"npm run compile","update-dependencies":"npm-check-updates -u"},"typings":"lib/index","_npmUser":{"name":"ernscht","email":"ernscht@gmail.com"},"repository":{"url":"git+https://github.com/merkle-open/html-structure-linter.git","type":"git"},"_npmVersion":"6.14.12","description":"[![npm version](https://badge.fury.io/js/html-structure-linter.svg)](https://badge.fury.io/js/html-structure-linter)\r [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\r [![Build Status](https://github.com","directories":{},"_nodeVersion":"14.16.1","dependencies":{"cheerio":"0.22.0","fs-extra":"10.0.0","glob-all":"3.2.1","minimist":"1.2.5","vfile-location":"3.2.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","ts-jest":"26.5.6","codelyzer":"6.0.2","typescript":"4.2.4","@types/jest":"26.0.23","npm-run-all":"4.1.5","@types/cheerio":"0.22.28","@types/fs-extra":"9.0.11","@types/minimist":"1.2.1","@types/minimatch":"3.0.4","npm-check-updates":"11.5.11","@types/vfile-location":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/html-structure-linter_0.1.0_1620711704771_0.13784068026793506","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-02-17T14:39:34.871Z","modified":"2026-05-28T08:08:06.517Z","0.0.1":"2017-02-17T14:39:34.871Z","0.0.2":"2017-02-17T14:44:44.674Z","0.0.3":"2017-02-17T15:00:04.310Z","0.0.4":"2017-07-14T11:36:50.221Z","0.1.0":"2021-05-11T05:41:44.920Z"},"bugs":{"url":"https://github.com/merkle-open/html-structure-linter/issues"},"license":"MIT","homepage":"https://github.com/merkle-open/html-structure-linter#readme","repository":{"url":"git+https://github.com/merkle-open/html-structure-linter.git","type":"git"},"description":"[![npm version](https://badge.fury.io/js/html-structure-linter.svg)](https://badge.fury.io/js/html-structure-linter)\r [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\r [![Build Status](https://github.com","maintainers":[{"email":"oss@namics.com","name":"namicsorg"},{"email":"ernscht@gmail.com","name":"ernscht"},{"email":"taca027@gmail.com","name":"tamara027"},{"email":"tobias.sailer@gmail.com","name":"tsailer"},{"email":"oss@emea.merkleinc.com","name":"merkleorg"}],"readme":"# html-structure-linter\r\n\r\n[![npm version](https://badge.fury.io/js/html-structure-linter.svg)](https://badge.fury.io/js/html-structure-linter)\r\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\r\n[![Build Status](https://github.com/merkle-open/html-structure-linter/workflows/ci/badge.svg?branch=master)](https://github.com/merkle-open/html-structure-linter/actions)\r\n\r\nSearches through a given list of html files for css selectors\r\n\r\n# Search \r\n\r\nOne use case is to search for specific selectors inside one or multiple files\r\n\r\n```\r\nhtml-structure-linter \"span > div\" test/fixtures/demo.html\r\nhtml-structure-linter \"span > div\" \"test/**/*.html\"\r\n```\r\n\r\nResult:\r\n\r\n```\r\ntest/fixtures/demo.html contains 2 matches:\r\n  Selector \"span > div\"\r\n    8:12\r\n```\r\n\r\n# Lint\r\n\r\nYou can pass a config to specify all selectors and messages you want to validate.\r\n\r\nSee the [example config](./test/fixtures/example.config.json) for details\r\n\r\n```\r\nhtml-structure-linter -c test/fixtures/example.config.json \r\n```\r\n\r\nResult:\r\n\r\n```\r\ntest/fixtures/demo.html contains 1 match:\r\n  Selector \"span div\" - DIV in SPAN is not allowed in xhtml strict mode - see https://www.w3.org/2010/04/xhtml10-strict.html\r\n    8:12\r\n\r\n\r\n\r\n1 file checked for 1 selector.\r\n```\r\n\r\n# Node\r\n\r\nYou can also use the library directly from node\r\n\r\n```js\r\nimport {getMatchingSelectors, fileResultToString} from 'html-structure-linter';\r\n\r\nconst exampleInput = '<div><span></span></div>';\r\nconst selectors = {\r\n  \"span div\": \"DIV in SPAN is not allowed in xhtml strict mode - see https://www.w3.org/2010/04/xhtml10-strict.html\"\r\n};\r\nconst lintResult = getMatchingSelectors(exampleInput, selectors);\r\nconst lintText = fileResultToString(lintResult, selectors);\r\nconsole.log(lintText);\r\n```\r\n\r\nYou can also use a shorthand to lint a bunch of files:\r\n\r\n```js\r\nimport {validate} from 'html-structure-linter';\r\nvalidate({\r\n  selectors: { \"span div\": \"Div in Span not allowed\" },\r\n  files: [\r\n    \"**/*.html\",\r\n    \"!node_modules/**/*.*\"\r\n  ]\r\n}).then(({ resultText, footer, hasMatches }) => {\r\n  console.log(resultText);\r\n  console.log(footer);\r\n  if (hasMatches) {\r\n     process.exit(1);\r\n  }\r\n});\r\n```\r\n\r\n\r\n## License\r\n[MIT License](./LICENSE)\r\n","readmeFilename":"README.md","users":{"namics":true}}