html - Grunt w3c validation plugin usage -


i trying validate simple html file using w3c validator plugin in grunt. giving me unexpected identifier error on line 33. not understand wrong.
figured out how use grunt-html-validation plugin, can not grunt-w3c-validation plugin work.

html trying validate:

<!doctype html> <html>   <head>       <title> see </title>   </head>    <body>     <p>ok</p>     <div>whatever</div>     <span>why</span>     <p>why </p>   </body> </html> 

gruntfile.js

module.exports = function (grunt) {     grunt.initconfig({         jade: {             compile: {                 files: {                     "html/calculator.html" : "jade/calculator.jade"                 }             }         },          sass: {             compile: {                 files: {                      "css/calculator.css": "sass/calculator.sass"                 }             }         },          jasmine: {             compile: {                 src: 'javascript/calculator.js',                  options: {                        vendor: 'node-modules/jasmine-jquery/jquery.js',                     specs: 'specs/calculatorspec.js'                  }             }         },          jshint: {              all: ['gruntfile.js', 'javascript/calculator.js']         },          html-validation: {             options: {                 reset: grunt.option('reset') || false,                 stoponerror: false,                 remotepath: "http://decodize.com/",                 remotefiles: ["html/moving-from-wordpress-to-octopress/",                                 "css/site-preloading-methods/"], //or                  remotefiles: "validation-files.json", // json file contains array of page paths.                  relaxerror: ["bad value x-ua-compatible attribute http-equiv on element meta."] //ignores these errors              },             files: {                 src: ['html/example.html']             }         }  });      grunt.loadnpmtasks('grunt-contrib-jade');     grunt.loadnpmtasks('grunt-contrib-sass');     grunt.loadnpmtasks('grunt-contrib-jasmine');     grunt.loadnpmtasks('grunt-contrib-jshint');     grunt.loadnpmtasks('grunt-w3c-validation');      grunt.registertask('default', ['jade','sass','jasmine','jshint']);     grunt.registertask("default", ["html-validation"]);     grunt.registertask("default", ["css-validation"]); }; 

in grunt.initconfig sections hyphens (-) should in quotes. this:

'html-validation': {             options: {                 reset: grunt.option('reset') || false,                 stoponerror: false,                 remotepath: "http://decodize.com/",                 remotefiles: ["html/moving-from-wordpress-to-octopress/",                                 "css/site-preloading-methods/"], //or                  remotefiles: "validation-files.json", // json file contains array of page paths.                  relaxerror: ["bad value x-ua-compatible attribute http-equiv on element meta."] //ignores these errors              },             files: {                 src: ['html/example.html']             }         } 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -