Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Analysis for CSS, HTML and javascript

Can anybody point me in the direction of software similar to StyleCop for C# which can analyse CSS, HTML and javascript against sets of predefined rules / custom rules.

For Example,

  • css - to ensure camel case is used for class names
  • html - to ensure inline sytles are not used
  • javascript - not sure yet :P

Ideally, tools which can be run as-part of msbuild would be benefical so they can be included as part of a quality build. Tools runnable by developers would also be desirable.

like image 600
Adam Jenkin Avatar asked Feb 25 '26 13:02

Adam Jenkin


2 Answers

For javascript check out JSLint:

http://www.jslint.com/

like image 66
kemiller2002 Avatar answered Feb 27 '26 02:02

kemiller2002


For CSS you can use csslint tool.

http://csslint.net/

It can be execute from command line also.

https://github.com/stubbornella/csslint/wiki/Command-line-interface

like image 31
Sumit Gupta Avatar answered Feb 27 '26 04:02

Sumit Gupta