CSSHint is a code review tool based on NodeJS. The current rules are based on ecomfe CSS STYLE SPEC. It also covers CSSLintrules.
After a period of code refactoring, we finally came to this version, in which CSS parser is replaced with postcss.
In addition, we changed the way of implementation which was also able to improve the performance by a large margin. Meanwhile, the following global object has three attributes as follows:
global.CSSHINT_INVALID_ALL_COUNT: it is used to count the number of warn to serve max-error.
global.CSSHINT_HEXCOLOR_CASE_FLAG: it is used to record project’s color value, whether the letters are small or capital. 0 is for small and 1 is for capital. This attribute is to serve unifying-color-case-sensitive.
global.CSSHINT_FONTFAMILY_CASE_FLAG: it is used to record whether font-family is small or capital to serve unifying-font-family-case-sensitive.
CSSHint
CSSHint is a code review tool based on NodeJS. The current rules are based on ecomfe CSS STYLE SPEC. It also covers CSSLint rules.
After a period of code refactoring, we finally came to this version, in which
CSSparser is replaced with postcss. In addition, we changed the way of implementation which was also able to improve the performance by a large margin. Meanwhile, the followingglobalobject has three attributes as follows:global.CSSHINT_INVALID_ALL_COUNT: it is used to count the number ofwarnto servemax-error.global.CSSHINT_HEXCOLOR_CASE_FLAG: it is used to record project’s color value, whether the letters are small or capital.0is for small and1is for capital. This attribute is to serveunifying-color-case-sensitive.global.CSSHINT_FONTFAMILY_CASE_FLAG: it is used to record whetherfont-familyis small or capital to serveunifying-font-family-case-sensitive.CONFIG Reference
Install & Update
CSSHint has been released on npm. It can be installed following the instructions.
Follow the following instruction if you are to update your CSSHint.
Usage
in CLI
in Node.js
TODO
/* csshint-disable ruleName */and/* csshint-enable ruleName1 */.CHANGELOG