{"id":15512956,"url":"https://github.com/appfolio/eslint-rails","last_synced_at":"2025-10-12T09:32:04.638Z","repository":{"id":28814838,"uuid":"32338039","full_name":"appfolio/eslint-rails","owner":"appfolio","description":null,"archived":true,"fork":false,"pushed_at":"2018-08-27T01:46:01.000Z","size":1284,"stargazers_count":39,"open_issues_count":17,"forks_count":22,"subscribers_count":139,"default_branch":"master","last_synced_at":"2025-01-03T05:40:49.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appfolio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-16T16:27:55.000Z","updated_at":"2023-07-27T06:02:31.000Z","dependencies_parsed_at":"2022-09-09T21:11:03.853Z","dependency_job_id":null,"html_url":"https://github.com/appfolio/eslint-rails","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfolio%2Feslint-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfolio%2Feslint-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfolio%2Feslint-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfolio%2Feslint-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appfolio","download_url":"https://codeload.github.com/appfolio/eslint-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236196734,"owners_count":19110767,"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-10-02T09:53:57.103Z","updated_at":"2025-10-12T09:31:59.221Z","avatar_url":"https://github.com/appfolio.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# eslint-rails\n\nRun [ESLint][] against your Rails repo. The supported javascript file extensions are the following:\n\n- _.js_\n- _.jsx_\n- _.es6_\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'eslint-rails'\n```\n\n## Configuration\n\nTo customize configuration, place an eslint config file in your app's\n`config/eslint.json`.\n\nYou can print the configuration thusly:\n\n```sh\n# Print the configuration that we're using. If there's a custom configuration\n# present, print that; if not, print the default configuration.\nrake eslint:print_config\n\n# Or print the default configuration even if a custom one exists.\nrake eslint:print_config[true]\n```\n\nYou can also retrieve the current eslint.json by visiting `/eslint/eslint.json`\nin your browser. To force retrieval of the default conguration, use\n`/eslint/eslint.json?force_default=true`.\n\n## Usage\n\n### CLI\n\n![rake-eslint-rails-run][]\n\nThis will analyze all of the javascript files in the project:\n\n```sh\nrake eslint:run_all\n```\n\nOr you can run it on a single file. This will analyze `application.js`:\n\n```sh\nrake eslint:run\n```\n\nOr, you can supply a filename to the task, using several different formats, and it will lint just that file. For example, to analyze `app/assets/javascripts/components/utilities.js`, you can run any of the following:\n\n```sh\nrake eslint:run[components/utilities]\nrake eslint:run[components/utilities.js]\nrake eslint:run[app/assets/javascripts/components/utilities]\nrake eslint:run[app/assets/javascripts/components/utilities.js]\n```\n\n### Web interface\n\nOn non-production environments, visit these URLs on your application:\n\nPath                                  | Description\n------------------------------------- | -------------------------------------------------\n`/eslint`                             | Optionally supply a filename parameter to analyze a file other than `application.js`, e.g.  `/eslint?filename=foo` to analyze foo.js.\n`/eslint/source?filename=application` | Optionally replace `application` with the name of another JavaScript file, e.g.  `eslint/source?filename=button_stuff` can show you `button_stuff.js`, and `eslint/source?filename=components/buttons/icon_button` can show you `components/buttons/icon_button.js.coffee.erb`.\n\n![eslint-rails-web][]\n\n![eslint-rails-web-source][]\n\n# Contributing\n\nIt's easiest to contribute by forking the repo and creating a pull request. For\nhelp with this, see this [helpful article][fork a repo].\n\nFor all of the example shell commands below, I'm going to assume that you've set\nthese two variables, so go ahead and customize these and set them before you\nstart.\n\n```sh\nESLINT=~/src/eslint\nESLINT_RAILS=~/src/eslint-rails\n```\n\n## Cloning the repository\n\n```sh\ngit clone https://github.com/appfolio/eslint-rails $ESLINT_RAILS\n```\n\n## Updating ESLint version\n\n### Summary\n\n1. [Clone the ESLint repository](#clone-the-eslint-repository)\n2. [Install dependencies](#install-dependencies)\n3. [Render `eslint.js`](#render-eslintjs)\n4. [Copy `eslint.js` into `eslint-rails`](#copy-eslintjs-into-eslint-rails)\n5. [Update the file in git](#update-the-file-in-git)\n6. [Commit, push, and create a pull request](#commit-push-and-create-a-pull-request)\n\n### Step-by-step instructions\n\nFirst, make sure you set the environment variables [as suggested above](#contributing).\n\n#### Clone the [ESLint repository][]\n\nI would recommend only trying this with a released version unless you have a\ngood reason to. In this example, I'm going to check out v1.10.1 and work with\nthat.\n\n```sh\ngit clone https://github.com/eslint/eslint $ESLINT\ncd $ESLINT\ngit checkout v1.10.1\n```\n\n#### Install dependencies\n\n```sh\ncd $ESLINT\nnpm install\n```\n\n#### Render `eslint.js`\n\n```sh\ncd $ESLINT\nshjs Makefile.js browserify\n```\n\n#### Copy `eslint.js` into `eslint-rails`\n\n```sh\n# Assuming you cloned eslint into a repository next to eslint-rails\ncp $ESLINT/build/eslint.js $ESLINT_RAILS/vendor/assets/javascripts/eslint.js\n```\n\n#### Update the file in git\n\n```sh\ncd $ESLINT_RAILS\ngit add vendor/assets/javascripts/eslint.js\n```\n\n#### Commit, push, and create a pull request\n\nThe details of how to create your own branch, commit, push, and create a pull\nrequest are outside the scope of this README. If you need help with this part,\nhere's a [helpful article][fork a repo]. This is the gist.\n\n```sh\ncd $ESLINT_RAILS\n# Make your changes\ngit add :/\ngit commit\ngit push origin master\n# Open a pull request\n```\n\n# Authors\n\n- Jon Kessler \u0026lt;[jon.kessler@appfolio.com][]\u0026gt;\n- Justin Force \u0026lt;[justin.force@appfolio.com][]\u0026gt;\n\n# License\n\n[MIT License][].\n\n[ESLint]: http://eslint.org/\n[fork a repo]: https://help.github.com/articles/fork-a-repo/\n[ESLint repository]: https://github.com/eslint/eslint\n[justin.force@appfolio.com]: mailto:justin.force@appfolio.com\n[jon.kessler@appfolio.com]: mailto:jon.kessler@appfolio.com\n[MIT License]: http://www.opensource.org/licenses/MIT)\n\n[rake-eslint-rails-run]: https://cloud.githubusercontent.com/assets/324632/6672146/9d1f278e-cbc7-11e4-9f56-5a4511d35921.png\n[eslint-rails-web-source]: https://cloud.githubusercontent.com/assets/324632/6671965/33d6819c-cbc6-11e4-9a64-30be84f20b96.png\n[eslint-rails-web]: https://cloud.githubusercontent.com/assets/324632/6671966/33d8cc86-cbc6-11e4-904d-3379907c429d.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfolio%2Feslint-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappfolio%2Feslint-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfolio%2Feslint-rails/lists"}