mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-25 17:13:35 +00:00
lint: Implement HTML Linting with htmlhint and fix indent.
* lint: Implement HTML Linting with htmlhint and fix indent. Implements HTML linting using htmlhint and uses indentation rules of zulip webapp - 4 spaces. Creates a separate file .htmlhintrc for the rules, most of which are defaults. Also, fixes indentation in html files and adds a missing title in about.html. * deps: Change versioning of various dependencies to exact versions. As we prefer to use exact working version for dependencies, changed the versions to exact versions. Fixes #676.
This commit is contained in:
25
.htmlhintrc
Normal file
25
.htmlhintrc
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"tagname-lowercase": true,
|
||||||
|
"attr-lowercase": true,
|
||||||
|
"attr-value-double-quotes": true,
|
||||||
|
"attr-value-not-empty": false,
|
||||||
|
"attr-no-duplication": true,
|
||||||
|
"doctype-first": true,
|
||||||
|
"tag-pair": true,
|
||||||
|
"empty-tag-not-self-closed": true,
|
||||||
|
"spec-char-escape": true,
|
||||||
|
"id-unique": true,
|
||||||
|
"src-not-empty": true,
|
||||||
|
"title-require": true,
|
||||||
|
"alt-require": false,
|
||||||
|
"doctype-html5": true,
|
||||||
|
"id-class-value": "dash",
|
||||||
|
"style-disabled": false,
|
||||||
|
"inline-style-disabled": false,
|
||||||
|
"inline-script-disabled": false,
|
||||||
|
"space-tab-mixed-disabled": "space4",
|
||||||
|
"id-class-ad-disabled": false,
|
||||||
|
"href-abs-or-rel": false,
|
||||||
|
"attr-unsafe-chars": true,
|
||||||
|
"head-script-disabled": true
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="css/about.css">
|
<link rel="stylesheet" href="css/about.css">
|
||||||
|
<title>Zulip - About</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -25,8 +25,9 @@
|
|||||||
"reinstall": "node ./tools/reinstall-node-modules.js",
|
"reinstall": "node ./tools/reinstall-node-modules.js",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"lint-css": "stylelint app/renderer/css/*.css",
|
"lint-css": "stylelint app/renderer/css/*.css",
|
||||||
|
"lint-html": "./node_modules/.bin/htmlhint \"app/renderer/*.html\" ",
|
||||||
"lint-js": "xo",
|
"lint-js": "xo",
|
||||||
"test": "npm run lint-css && npm run lint-js",
|
"test": "npm run lint-html && npm run lint-css && npm run lint-js",
|
||||||
"test-e2e": "gulp test-e2e",
|
"test-e2e": "gulp test-e2e",
|
||||||
"dev": "gulp dev & nodemon --watch app/main --watch app/renderer --exec 'npm test' -e html,css,js",
|
"dev": "gulp dev & nodemon --watch app/main --watch app/renderer --exec 'npm test' -e html,css,js",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --dir",
|
||||||
@@ -121,22 +122,23 @@
|
|||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"assert": "1.4.1",
|
"assert": "1.4.1",
|
||||||
"cp-file": "^5.0.0",
|
"cp-file": "5.0.0",
|
||||||
"devtron": "1.4.0",
|
"devtron": "1.4.0",
|
||||||
"electron": "3.0.10",
|
"electron": "3.0.10",
|
||||||
"electron-builder": "20.38.4",
|
"electron-builder": "20.38.4",
|
||||||
"electron-connect": "0.6.2",
|
"electron-connect": "0.6.2",
|
||||||
"electron-debug": "1.4.0",
|
"electron-debug": "1.4.0",
|
||||||
"google-translate-api": "2.3.0",
|
"google-translate-api": "2.3.0",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "4.0.0",
|
||||||
"gulp-tape": "0.0.9",
|
"gulp-tape": "0.0.9",
|
||||||
"is-ci": "^1.0.10",
|
"htmlhint": "0.11.0",
|
||||||
"nodemon": "^1.14.11",
|
"is-ci": "1.0.10",
|
||||||
|
"nodemon": "1.14.11",
|
||||||
"pre-commit": "1.2.2",
|
"pre-commit": "1.2.2",
|
||||||
"spectron": "^5.0.0",
|
"spectron": "5.0.0",
|
||||||
"stylelint": "^9.10.1",
|
"stylelint": "9.10.1",
|
||||||
"tap-colorize": "^1.2.0",
|
"tap-colorize": "1.2.0",
|
||||||
"tape": "^4.8.0",
|
"tape": "4.8.0",
|
||||||
"xo": "0.18.2"
|
"xo": "0.18.2"
|
||||||
},
|
},
|
||||||
"xo": {
|
"xo": {
|
||||||
|
|||||||
Reference in New Issue
Block a user