change to useful html linter

This commit is contained in:
Simon Bruder 2018-04-24 22:07:37 +00:00
parent 98acd2310f
commit c7a1762e83
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
5 changed files with 215 additions and 26 deletions

View file

@ -2,5 +2,6 @@
"indent-style": "spaces", "indent-style": "spaces",
"indent-width": 2, "indent-width": 2,
"id-class-style": "dash", "id-class-style": "dash",
"attr-name-style": "dash",
"tag-bans": ["style", "b"] "tag-bans": ["style", "b"]
} }

View file

@ -2,7 +2,8 @@ const gulp = require('gulp')
// gulp plugins // gulp plugins
const eslint = require('gulp-eslint') const eslint = require('gulp-eslint')
const htmllint = require('gulp-htmllint') const htmllint = require('gulp-html-linter')
const htmlmin = require('gulp-htmlmin')
const lesshint = require('gulp-lesshint') const lesshint = require('gulp-lesshint')
const less = require('gulp-less') const less = require('gulp-less')
const minifyCSS = require('gulp-csso') const minifyCSS = require('gulp-csso')
@ -26,7 +27,12 @@ function htmllintReporter(filepath, issues) {
gulp.task('html', () => gulp.task('html', () =>
gulp.src('src/index.html') gulp.src('src/index.html')
.pipe(htmllint({}, htmllintReporter)) .pipe(htmllint())
.pipe(htmllint.format())
.pipe(htmlmin({
'collapseWhitespace': true,
'removeComments': true
}))
.pipe(gulp.dest('build')) .pipe(gulp.dest('build'))
) )

225
package-lock.json generated
View file

@ -853,6 +853,47 @@
"integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==",
"dev": true "dev": true
}, },
"bufferstreams": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.3.tgz",
"integrity": "sha512-HaJnVuslRF4g2kSDeyl++AaVizoitCpL9PglzCYwy0uHHyvWerfvEb8jWmYbF1z4kiVFolGomnxSGl+GUQp2jg==",
"dev": true,
"requires": {
"readable-stream": "2.3.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.1",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"builtin-modules": { "builtin-modules": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
@ -937,6 +978,16 @@
"integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
"dev": true "dev": true
}, },
"camel-case": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
"integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
"dev": true,
"requires": {
"no-case": "2.3.2",
"upper-case": "1.1.3"
}
},
"camelcase": { "camelcase": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
@ -1059,6 +1110,15 @@
} }
} }
}, },
"clean-css": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz",
"integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=",
"dev": true,
"requires": {
"source-map": "0.5.7"
}
},
"cli-cursor": { "cli-cursor": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
@ -3591,19 +3651,63 @@
} }
} }
}, },
"gulp-htmllint": { "gulp-html-linter": {
"version": "0.0.15", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulp-htmllint/-/gulp-htmllint-0.0.15.tgz", "resolved": "https://registry.npmjs.org/gulp-html-linter/-/gulp-html-linter-1.0.0.tgz",
"integrity": "sha512-m5LBV6n+korK9SGqdHp7gwEIWryxMQ9Jlh7Al5BO7ogoifAHLyd7sdlACskMbTCDCP0BC9H+ewt7K9ITmeCQ8Q==", "integrity": "sha1-h4yOw/QDxQdavvpvIOwYtZMyT50=",
"dev": true, "dev": true,
"requires": { "requires": {
"ansi-colors": "1.1.0", "chalk": "1.1.3",
"fancy-log": "1.3.2", "htmllint": "0.6.0",
"htmllint": "0.7.2", "text-table": "0.2.0",
"plugin-error": "0.1.2",
"through2": "2.0.3" "through2": "2.0.3"
} }
}, },
"gulp-htmlmin": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/gulp-htmlmin/-/gulp-htmlmin-4.0.0.tgz",
"integrity": "sha512-9FX2d4QbSm+4WuXughjZ6GJn4jx0C4BmyK2e+AS6567NPAetNfB+hv2ZL/88AacdC+8OS+TzeIjfKRXPSAgOYw==",
"dev": true,
"requires": {
"bufferstreams": "1.1.3",
"html-minifier": "3.5.15",
"plugin-error": "0.1.2",
"readable-stream": "2.3.6",
"tryit": "1.0.3"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.1",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"gulp-less": { "gulp-less": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.0.tgz", "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.0.tgz",
@ -4056,6 +4160,12 @@
"sntp": "2.1.0" "sntp": "2.1.0"
} }
}, },
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"hoek": { "hoek": {
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
@ -4077,16 +4187,55 @@
"integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
"dev": true "dev": true
}, },
"html-minifier": {
"version": "3.5.15",
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.15.tgz",
"integrity": "sha512-OZa4rfb6tZOZ3Z8Xf0jKxXkiDcFWldQePGYFDcgKqES2sXeWaEv9y6QQvWUtX3ySI3feApQi5uCsHLINQ6NoAw==",
"dev": true,
"requires": {
"camel-case": "3.0.0",
"clean-css": "4.1.11",
"commander": "2.15.1",
"he": "1.1.1",
"param-case": "2.1.1",
"relateurl": "0.2.7",
"uglify-js": "3.3.22"
},
"dependencies": {
"commander": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"uglify-js": {
"version": "3.3.22",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz",
"integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==",
"dev": true,
"requires": {
"commander": "2.15.1",
"source-map": "0.6.1"
}
}
}
},
"htmllint": { "htmllint": {
"version": "0.7.2", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/htmllint/-/htmllint-0.7.2.tgz", "resolved": "https://registry.npmjs.org/htmllint/-/htmllint-0.6.0.tgz",
"integrity": "sha1-AuR0FvotvrMLXiw+1mfopUB6jzQ=", "integrity": "sha1-27AGZ23WbXZ8sba7h18IhAuRmY0=",
"dev": true, "dev": true,
"requires": { "requires": {
"bulk-require": "1.0.1", "bulk-require": "1.0.1",
"htmlparser2": "3.9.2", "htmlparser2": "3.9.2",
"lodash": "4.17.10", "lodash": "4.17.10",
"promise": "8.0.1" "promise": "7.3.1"
}, },
"dependencies": { "dependencies": {
"lodash": { "lodash": {
@ -4094,15 +4243,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"dev": true "dev": true
},
"promise": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-8.0.1.tgz",
"integrity": "sha1-5F1osAoXZHttpxG/he1u1HII9FA=",
"dev": true,
"requires": {
"asap": "2.0.6"
}
} }
} }
}, },
@ -5519,6 +5659,12 @@
"signal-exit": "3.0.2" "signal-exit": "3.0.2"
} }
}, },
"lower-case": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
"integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
"dev": true
},
"lru-cache": { "lru-cache": {
"version": "2.7.3", "version": "2.7.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
@ -5761,6 +5907,15 @@
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
"dev": true "dev": true
}, },
"no-case": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
"integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
"dev": true,
"requires": {
"lower-case": "1.1.4"
}
},
"normalize-package-data": { "normalize-package-data": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
@ -6045,6 +6200,15 @@
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
"dev": true "dev": true
}, },
"param-case": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
"integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
"dev": true,
"requires": {
"no-case": "2.3.2"
}
},
"parse-filepath": { "parse-filepath": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
@ -6451,7 +6615,6 @@
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"asap": "2.0.6" "asap": "2.0.6"
} }
@ -6654,6 +6817,12 @@
"integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==",
"dev": true "dev": true
}, },
"relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
"dev": true
},
"remove-trailing-separator": { "remove-trailing-separator": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@ -7764,6 +7933,12 @@
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
"dev": true "dev": true
}, },
"tryit": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
"integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=",
"dev": true
},
"tunnel-agent": { "tunnel-agent": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@ -7936,6 +8111,12 @@
} }
} }
}, },
"upper-case": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
"dev": true
},
"urix": { "urix": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",

View file

@ -9,7 +9,8 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-csso": "^3.0.1", "gulp-csso": "^3.0.1",
"gulp-eslint": "^4.0.2", "gulp-eslint": "^4.0.2",
"gulp-htmllint": "0.0.15", "gulp-html-linter": "^1.0.0",
"gulp-htmlmin": "^4.0.0",
"gulp-less": "^4.0.0", "gulp-less": "^4.0.0",
"gulp-lesshint": "^5.0.0", "gulp-lesshint": "^5.0.0",
"gulp-minify": "^2.1.0" "gulp-minify": "^2.1.0"

View file

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mitglied werden | FabLab Bad Windsheim</title> <title>Mitglied werden | FabLab Bad Windsheim</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.0/dist/css/bootstrap.min.css" integrity="sha256-NJWeQ+bs82iAeoT5Ktmqbi3NXwxcHlfaVejzJI2dklU=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.0/dist/css/bootstrap.min.css" integrity="sha256-NJWeQ+bs82iAeoT5Ktmqbi3NXwxcHlfaVejzJI2dklU=" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Source+Sans+Pro:300,400" rel="stylesheet"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons|Source+Sans+Pro:300,400">
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
</head> </head>
<body> <body>