{"id":29926556,"url":"https://github.com/ecomfe/node-csshint","last_synced_at":"2025-08-02T12:42:07.758Z","repository":{"id":20861186,"uuid":"24148009","full_name":"ecomfe/node-csshint","owner":"ecomfe","description":"Csshint your css code","archived":false,"fork":false,"pushed_at":"2018-12-18T06:27:06.000Z","size":558,"stargazers_count":27,"open_issues_count":1,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-22T10:32:34.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecomfe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-17T14:26:26.000Z","updated_at":"2022-03-10T02:19:34.000Z","dependencies_parsed_at":"2022-07-26T12:46:59.160Z","dependency_job_id":null,"html_url":"https://github.com/ecomfe/node-csshint","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/ecomfe/node-csshint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fnode-csshint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fnode-csshint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fnode-csshint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fnode-csshint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecomfe","download_url":"https://codeload.github.com/ecomfe/node-csshint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fnode-csshint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268392098,"owners_count":24243297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-02T12:41:59.505Z","updated_at":"2025-08-02T12:42:07.721Z","avatar_url":"https://github.com/ecomfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"CSSHint\n===\n[![csshint](https://travis-ci.org/ecomfe/node-csshint.svg?branch=master)](https://travis-ci.org/ecomfe/node-csshint)\n[![npm version](https://badge.fury.io/js/csshint.svg)](http://badge.fury.io/js/csshint)\n[![Coverage Status](https://img.shields.io/coveralls/ecomfe/node-csshint.svg?style=flat)](https://coveralls.io/r/ecomfe/node-csshint)\n[![Dependency Status](https://david-dm.org/ecomfe/node-csshint.png)](https://david-dm.org/ecomfe/node-csshint)\n[![devDependency Status](https://david-dm.org/ecomfe/node-csshint/dev-status.png)](https://david-dm.org/ecomfe/node-csshint#info=devDependencies)\n\nCSSHint is a code review tool based on NodeJS. The current rules are based on ecomfe [CSS STYLE SPEC](https://github.com/ecomfe/spec/blob/master/css-style-guide.md). It also covers [CSSLint](https://github.com/CSSLint/csslint) [rules](https://github.com/CSSLint/csslint/wiki/Rules).\n\nAfter a period of code refactoring, we finally came to this version, in which `CSS` parser is replaced with [postcss](https://github.com/postcss/postcss).\nIn 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:\n\n- `global.CSSHINT_INVALID_ALL_COUNT`: it is used to count the number of `warn` to serve `max-error`.\n- `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`.\n- `global.CSSHINT_FONTFAMILY_CASE_FLAG`: it is used to record whether `font-family` is small or capital to serve `unifying-font-family-case-sensitive`.\n\n[CONFIG Reference](https://github.com/ecomfe/node-csshint/blob/master/lib/config.js)\n\n\nInstall \u0026 Update\n-------\n\nCSSHint has been released on npm. It can be installed following the instructions.\n\n    $ [sudo] npm install csshint [-g]\n\nFollow the following instruction if you are to update your CSSHint.\n\n    $ [sudo] npm update csshint [-g]\n    \n\nUsage\n------\n\n- in CLI\n\t\n\t\t$ csshint -v   // show version\n\t\t$ csshint [filePath|dirPath]   // run csshint on file or dir\n\n- in Node.js\n        \n    \t/**\n\t     * detect css file content\n\t     *\n\t     * @param {string} fileContent file content\n\t     * @param {Object=} config config of rule, optional\n\t     *\n\t     * @return {Promise} Promise Object\n\t     * reject and resolve arguments:\n\t     * {\n\t     * \t\tpath: {string} file path\n\t     * \t\tmessages: {Array.\u003cObject\u003e} warning messages, [{ruleName, line, col, errorChar, message, colorMessage}]\n\t     * }\n\t     */\n\t    exports.checkString(fileContent, config);\n    \n    \n\t    /**\n\t     * detect file\n\t     *\n\t     * @param {Object} file the object has path and content key\n\t     * @param {Array} errors warning messages\n\t     * @param {Function} done detect callback\n\t     */\n\t    check(file, errors, done);\n \n\nTODO\n------\n\n- [x] Complete coverage [csslint](https://github.com/CSSLint/csslint) [rule](https://github.com/CSSLint/csslint/wiki/Rules)。\n- [ ] support `/* csshint-disable ruleName */` and `/* csshint-enable ruleName1 */`.\n\n### [CHANGELOG](https://github.com/ecomfe/node-csshint/blob/master/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fnode-csshint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomfe%2Fnode-csshint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fnode-csshint/lists"}