{"id":13452406,"url":"https://github.com/paulolramos/eslint-prettier-airbnb-react","last_synced_at":"2025-03-23T19:34:15.739Z","repository":{"id":45863102,"uuid":"145504563","full_name":"paulolramos/eslint-prettier-airbnb-react","owner":"paulolramos","description":"ESlint + Prettier + Airbnb Style Guide Configuration for React","archived":true,"fork":false,"pushed_at":"2021-05-12T15:29:13.000Z","size":37,"stargazers_count":1023,"open_issues_count":11,"forks_count":195,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-10-28T18:55:11.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulolramos.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-08-21T04:03:09.000Z","updated_at":"2024-10-27T13:00:27.000Z","dependencies_parsed_at":"2022-09-13T16:00:43.296Z","dependency_job_id":null,"html_url":"https://github.com/paulolramos/eslint-prettier-airbnb-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulolramos%2Feslint-prettier-airbnb-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulolramos%2Feslint-prettier-airbnb-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulolramos%2Feslint-prettier-airbnb-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulolramos%2Feslint-prettier-airbnb-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulolramos","download_url":"https://codeload.github.com/paulolramos/eslint-prettier-airbnb-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245159368,"owners_count":20570372,"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-07-31T07:01:23.304Z","updated_at":"2025-03-23T19:34:15.398Z","avatar_url":"https://github.com/paulolramos.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"## I am no longer maintaining this project.\r\n\r\n# Installation\r\n\r\n1. Navigate to your app directory where you want to include this style configuration.\r\n\r\n   ```bash\r\n   cd my-app\r\n   ```\r\n\r\n2. Run this command inside your app's root directory. Note: this command executes the `eslint-prettier-config.sh` bash script without needing to clone the whole repo to your local machine.\r\n\r\n   ```bash\r\n   exec 3\u003c\u00261;bash \u003c\u00263 \u003c(curl https://raw.githubusercontent.com/paulolramos/eslint-prettier-airbnb-react/master/eslint-prettier-config.sh 2\u003e /dev/null)\r\n   ```\r\n\r\n3. Make selections for your preference of package manager (npm or yarn), file format (.js or .json), max-line size, and trailing commas (none, es5, all).\r\n\r\n4. Look in your project's root directory and notice the two newly added/updated config files:\r\n   - `.eslintrc.js` (or `.eslintrc.json`)\r\n   - `.prettierrc.js` (or `.prettierrc.json`)\r\n\r\n# Packages\r\n\r\n### Main Packages\r\n\r\n1. [ESlint](https://eslint.org/)\r\n2. [Prettier](https://prettier.io/)\r\n\r\n### Airbnb Configuration\r\n\r\n1. [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)\r\n   - This package provides Airbnb's .eslintrc as an extensible shared config.\r\n2. [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) (Peer Dependency)\r\n   - Static AST checker for accessibility rules on JSX elements.\r\n3. [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) (Peer Dependency)\r\n   - React specific linting rules for ESLint\r\n4. [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import) (Peer Dependency)\r\n   - Support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names.\r\n5. [babel-eslint](https://github.com/babel/babel-eslint)\r\n   - A wrapper for Babel's parser used for ESLint.\r\n   - We decided to include this since [Airbnb Style Guide uses Babel](https://github.com/airbnb/javascript#airbnb-javascript-style-guide-).\r\n\r\n### ESlint, Prettier Integration\r\n\r\n1. [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)\r\n   - Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.\r\n2. [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)\r\n   - Turns off all rules that are unnecessary or might conflict with Prettier.\r\n\r\n# Created Configuration Files\r\n\r\nOnce files are created, you may edit to your liking.\r\n\r\n### eslintrc(.js/.json)\r\n\r\n- [more info](https://eslint.org/docs/user-guide/configuring)\r\n\r\n```\r\n{\r\n\"extends\": [\r\n    \"airbnb\",\r\n    \"plugin:prettier/recommended\",\r\n    \"prettier/react\"\r\n  ],\r\n  \"env\": {\r\n    \"browser\": true,\r\n    \"commonjs\": true,\r\n    \"es6\": true,\r\n    \"jest\": true,\r\n    \"node\": true\r\n  },\r\n  \"rules\": {\r\n    \"jsx-a11y/href-no-hash\": [\"off\"],\r\n    \"react/jsx-filename-extension\": [\"warn\", { \"extensions\": [\".js\", \".jsx\"] }],\r\n    \"max-len\": [\r\n      \"warn\",\r\n      {\r\n        \"code\": (SET BY USER),\r\n        \"tabWidth\": 2,\r\n        \"comments\": (SET BY USER),\r\n        \"ignoreComments\": false,\r\n        \"ignoreTrailingComments\": true,\r\n        \"ignoreUrls\": true,\r\n        \"ignoreStrings\": true,\r\n        \"ignoreTemplateLiterals\": true,\r\n        \"ignoreRegExpLiterals\": true\r\n      }\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n### prettierrc(.js/.json)\r\n\r\n- [more Info](https://prettier.io/docs/en/configuration.html)\r\n\r\n```\r\n{\r\n\"printWidth\": (SET BY USER),\r\n  \"singleQuote\": true,\r\n  \"trailingComma\": (SET BY USER)\r\n}\r\n```\r\n\r\n---\r\n\r\nThis script was inspired by Jeffrey Zhen's [tutorial](https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulolramos%2Feslint-prettier-airbnb-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulolramos%2Feslint-prettier-airbnb-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulolramos%2Feslint-prettier-airbnb-react/lists"}