{"id":19522141,"url":"https://github.com/chrisco/snippets","last_synced_at":"2026-03-02T12:45:46.069Z","repository":{"id":227972024,"uuid":"69764836","full_name":"chrisco/snippets","owner":"chrisco","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-21T04:14:09.000Z","size":397,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T14:15:24.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/chrisco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-10-01T21:28:11.000Z","updated_at":"2016-10-24T11:53:09.000Z","dependencies_parsed_at":"2024-03-22T10:50:02.752Z","dependency_job_id":null,"html_url":"https://github.com/chrisco/snippets","commit_stats":null,"previous_names":["chrisco/snippets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2Fsnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2Fsnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2Fsnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2Fsnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisco","download_url":"https://codeload.github.com/chrisco/snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240771906,"owners_count":19854982,"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","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":"2024-11-11T00:37:21.320Z","updated_at":"2026-03-02T12:45:45.999Z","avatar_url":"https://github.com/chrisco.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snippets\n\nA repo for little random snippets (small katas, functions, etc.)\n\n## ESLint With the Airbnb JavaScript Style Guide and JSDoc\n\nI decided to try to use the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) with the Atom text editor I'm using (for now?).\n\nI wound up installing things piecemeal, though it looks like there are easier ways, such as, perhaps, like [this for Atom](http://www.acuriousanimal.com/2016/08/14/configuring-atom-with-eslint.html) and [this for WebStorm](https://www.themarketingtechnologist.co/eslint-with-airbnb-javascript-style-guide-in-webstorm/). Probably even easier/\"better\" ways, but I din't want to spend my time down that rabbit hole today:\n\n#### ESLint With the Airbnb JavaScript Style Guide\n\n```\n$ npm install eslint --save-dev\n$ npm install babel-eslint --save-dev\n$ npm install eslint-config-airbnb --save-dev\n$ npm install eslint-plugin-jsx-a11y --save-dev\n$ npm install eslint-plugin-react --save-dev\n$ npm install eslint-plugin-import --save-dev // Didn't work\n$ npm install eslint-plugin-import@^1.16.0 --save-dev // Worked\n```\n\nNOTE: I could have done all the above commands in one line, but I was following the error messages that were popping up in Atom. Next time.\n\nThen I created the ```.eslintrc``` file and pasted in the code from the above linked \"Atom\" blog post, but modifying the rule about [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars) from \"error\" to \"warn.\" Continuing to modify rules as I go.\n\nThat seemed to work except that I had trouble configuring Atom Beautify indentation, so I wound up creating a ```.jsbeautifyrc``` file and pasting in, then editing, the configurations I found I found it that file in the Atom config directory: ```./atom/packages/atom-beautify/src/.jsbeautifyrc```\n\n#### JSDoc\n\nFor the JSDoc, I did this:\n\n```\n$ npm install jsdoc --save-dev\n$ ./node_modules/jsdoc/jsdoc.js snippets/reverseInPlace.js // Generate JSDoc for single file\n$ ./node_modules/jsdoc/jsdoc.js snippets -r  // Generate JSDoc for all files in the directory\n```\n\nThe generated JSDocs: [./out/index.html](out/index.html) (open file in browser).\n\nCommand-line arguments to JSDoc: http://usejsdoc.org/about-commandline.html\n\n### TODOs\n\nPut all .js files in their own directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco%2Fsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisco%2Fsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco%2Fsnippets/lists"}