{"id":18218859,"url":"https://github.com/marviq/coffee-jshint","last_synced_at":"2025-08-20T03:37:56.285Z","repository":{"id":56558020,"uuid":"11298405","full_name":"marviq/coffee-jshint","owner":"marviq","description":"Runs your CoffeeScript source through JSHint to check for errors.","archived":false,"fork":false,"pushed_at":"2021-05-15T09:28:08.000Z","size":200,"stargazers_count":42,"open_issues_count":4,"forks_count":19,"subscribers_count":36,"default_branch":"develop","last_synced_at":"2025-06-28T20:52:34.980Z","etag":null,"topics":["coffeescript","jshint"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marviq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-10T01:05:03.000Z","updated_at":"2021-05-15T09:28:10.000Z","dependencies_parsed_at":"2022-08-15T20:51:00.954Z","dependency_job_id":null,"html_url":"https://github.com/marviq/coffee-jshint","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/marviq/coffee-jshint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marviq%2Fcoffee-jshint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marviq%2Fcoffee-jshint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marviq%2Fcoffee-jshint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marviq%2Fcoffee-jshint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marviq","download_url":"https://codeload.github.com/marviq/coffee-jshint/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marviq%2Fcoffee-jshint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267890889,"owners_count":24161493,"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-07-30T02:00:09.044Z","response_time":70,"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":["coffeescript","jshint"],"created_at":"2024-11-03T18:04:47.271Z","updated_at":"2025-07-31T09:34:12.571Z","avatar_url":"https://github.com/marviq.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coffee-\u003eJSHint\n\n[![npm version](https://badge.fury.io/js/coffee-jshint.svg)](https://badge.fury.io/js/coffee-jshint)\n[![David dependency drift detection](https://david-dm.org/marviq/coffee-jshint.svg)](https://david-dm.org/marviq/coffee-jshint)\n\nRuns your [CoffeeScript](http://coffeescript.org/) source through [JSHint](http://jshint.com/) to check for errors.\n\n\n**NOTE: As of version `1.0.0`, `coffee-jshint` changed its dependencies to be on [`coffeescript`](https://www.npmjs.com/package/coffeescript) in favor of the,\nnow deprecated, [`coffee-script`](https://www.npmjs.com/package/coffee-script) name.**\n\n\n## Installation\n\n```sh\nnpm install coffeescript -g ##  See package.json for supported versions (most)\nnpm install coffee-jshint -g\n```\n\n\n## Usage\n\nTo check some files:\n\n```sh\ncoffee-jshint file1.coffee file2.coffee ...\n```\n\n\n### Options\n\nJSHint takes [a bunch of options](http://jshint.com/docs/options/) that tell it various rules to enforce or relax.  Some of these don't make much sense to\ncheck for JS generated by the CoffeeScript compiler, so by default these options are turned on:\n\n\n#### Enforcing options\n\n  - **[`undef`](http://jshint.com/docs/options/#undef):** warns about the use of explicitly undeclared variables;\n\n\n#### Relaxing options\n\n  - **[`eqnull`](http://jshint.com/docs/options/#eqnull):** suppresses warnings about `== null` comparisons, which CoffeeScript uses in its generated JS;\n  - **[`expr`](http://jshint.com/docs/options/#expr):** suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls, which can only occur in the generated JS when the CoffeeScript compiler does it on purpose;\n  - **[`loopfunc`](http://jshint.com/docs/options/#loopfunc):** suppresses warnings about functions inside of loops, which CoffeeScript produces so often that it becomes too hard to spot the legitimate reports between the false-positives (introduced with version `1.1.0`);\n  - **[`multistr`](http://jshint.com/docs/options/#multistr):** suppresses warnings about multi-line strings, since CoffeeScript takes care of them;\n  - **[`shadow`](http://jshint.com/docs/options/#shadow):** suppresses warnings about variable shadowing i.e. declaring a variable that had been already declared somewhere in the outer scope, which is fine since CoffeeScript has sane scoping rules and generates safely scoped JS that uses shadowed variables;\n  - **[`sub`](http://jshint.com/docs/options/#sub):** suppresses warnings about using `[]` notation when it can be expressed in dot notation since we're grown ups and can make our own decisions about what lookup syntax is best;\n\nTo turn on more options, you can use the `--options` or `-o` flag:\n\n    coffee-jshint -o trailing,browser,sub file1.coffee file2.coffee ...\n\n\nIf you really must turn off some of the default options, use the `--default-options-off` flag (you can always use `--options` to turn some back on):\n\n    coffee-jshint --default-options-off --options undef,eqnull ...\n\n\n#### About [`esversion`](http://jshint.com/docs/options/#esversion)\n\n Since [the CoffeeScript compiler as of version `2` will produce ES6](http://coffeescript.org/announcing-coffeescript-2/), Coffee-\u003eJSHint (as of version\n `1.0.1`) detects if your `coffeescript` has a semver version number `\u003e= 2`, in which case the JSHint `esversion: 6` option will be set, and if not\n `esversion: 5`.  This happens independent of the `--default-options-off` command line flag and currently there's no way to override this behaviour.\n\n\n### Globals\n\nYou'll probably get a lot of complaints from Coffee-\u003eJSHint about undefined global variables like `console`, `$`, or `require`.  Depending on where you're\nrunning your code, you might want to allow a few global variables.  One easy way to handle this is to use JSHint's built in\n[environment options](http://jshint.com/docs/options/#environments).\n\nFor instance, if you're running your code using Node.js, then you'll want to turn on the `node` option.  It works like any other option:\n\n```sh\ncoffee-jshint -o node ...\n```\n\nIf you have some globals that aren't covered by any of environments, well then you should probably check yo'self before you wreck yo'self.  But if you really\nwant to turn off warnings for some global variables, Coffee-\u003eJSHint supports it using the `--globals` or `-g` option.  One use case is when using\n[Mocha](http://mochajs.org/), a testing library:\n\n\n```sh\ncoffee-jshint -o node --globals describe,it ...\n```\n\n\n### Shell scripting\n\nCoffee-\u003eJSHint plays nicely with your favorite Unix utilities.  If you want to recursively search all the files in a directory, try piping in the results of a\n`find`.  Here's an example that also filters away any files under the `node_modules/` tree:\n\n```sh\nfind . -name node_modules -prune -o -type f -name \\*.coffee -print0 | xargs -0 coffee-jshint\n```\n\n\n### Git hook\n\nTo use Coffee-\u003eJSHint as a git pre-commit hook to check changed files before you commit, put something like this in `.git/hooks/pre-commit`:\n\n```bash\ngit diff --staged --name-only | xargs coffee-jshint\nif [[ $? -ne 0 ]]; then\n    echo 'WARNING: You are about to commit files with coffee-jshint warnings'\n    exit 1\nfi\n```\n\nThis will take all the files you plan to commit changes to, run them through `coffee-jshint`, and exit with status code `1` if there are any warnings (which it will also print out).  If there are warnings, the commit will be aborted, but you can always do `git commit --no-verify` to bypass the hook.\n\n\n## Contributing\n\nSee [CONTRIBUTING](./CONTRIBUTING.md).\n\n\n## Changelog\n\nSee [CHANGELOG](./CHANGELOG.md).\n\n\n## License\n\n[BSD-3-Clause](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarviq%2Fcoffee-jshint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarviq%2Fcoffee-jshint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarviq%2Fcoffee-jshint/lists"}