{"id":14978313,"url":"https://github.com/marcelmokos/eslint-config-with-prettier","last_synced_at":"2025-10-28T08:32:14.434Z","repository":{"id":57229524,"uuid":"104436369","full_name":"marcelmokos/eslint-config-with-prettier","owner":"marcelmokos","description":"Eslint config with prettier","archived":false,"fork":false,"pushed_at":"2019-01-28T19:25:19.000Z","size":540,"stargazers_count":40,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-28T01:20:58.818Z","etag":null,"topics":["airbnb","editorconfig","enzyme","eslint","eslint-config","eslintrc","flowtype","gitignore","jest","npm","npm-scripts","react","testing","yarn"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/marcelmokos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-22T05:47:29.000Z","updated_at":"2023-10-17T09:35:32.000Z","dependencies_parsed_at":"2022-09-14T14:50:24.757Z","dependency_job_id":null,"html_url":"https://github.com/marcelmokos/eslint-config-with-prettier","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmokos%2Feslint-config-with-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmokos%2Feslint-config-with-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmokos%2Feslint-config-with-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmokos%2Feslint-config-with-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelmokos","download_url":"https://codeload.github.com/marcelmokos/eslint-config-with-prettier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859906,"owners_count":16556031,"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":["airbnb","editorconfig","enzyme","eslint","eslint-config","eslintrc","flowtype","gitignore","jest","npm","npm-scripts","react","testing","yarn"],"created_at":"2024-09-24T13:57:21.975Z","updated_at":"2025-10-28T08:32:14.030Z","avatar_url":"https://github.com/marcelmokos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config-with-prettier\n\n[![npm version](https://img.shields.io/npm/v/eslint-config-with-prettier.svg?style=flat)](https://www.npmjs.com/package/eslint-config-with-prettier) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![Build Status](https://travis-ci.org/marcelmokos/eslint-config-with-prettier.svg?branch=master)](https://travis-ci.org/marcelmokos/eslint-config-with-prettier) [![dependency](https://david-dm.org/marcelmokos/eslint-config-with-prettier/status.svg)](https://david-dm.org/marcelmokos/eslint-config-with-prettier) [![devDep](https://david-dm.org/marcelmokos/eslint-config-with-prettier/dev-status.svg)](https://david-dm.org/marcelmokos/eslint-config-with-prettier?type=dev)\n[![Known Vulnerabilities](https://snyk.io/test/github/marcelmokos/eslint-config-with-prettier/badge.svg)](https://snyk.io/test/github/marcelmokos/eslint-config-with-prettier)\n\nThis package provides Airbnb's [.eslintrc.yml](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.eslintrc.yml) with prettier as an extensible shared config.\n\n- If you do not want to install and setup eslint with all configs and plugins.\n- Install and extend eslint-config-with-prettier it works as [create-react-app](https://github.com/facebookincubator/create-react-app) but for eslint, linting with prettier.\n\n# Usage\n\n## 1. install config\n\n```bash\nyarn add --dev eslint-config-with-prettier\n```\n\nor\n\n```bash\nnpm install --dev eslint-config-with-prettier\n```\n\n## 2. extend config\n\n- .eslintrc.yml\n\n```yaml\nextends:\n  - eslint-config-with-prettier\n```\n\n- .eslintrc.js\n\n```js\nmodule.exports = {\n  extends: [\"eslint-config-with-prettier\"],\n};\n```\n\n- .eslintrc.json\n\n```json\n{\n  \"extends\": [\"eslint-config-with-prettier\"]\n}\n```\n\n# You can expect\n\n- linting using eslint\n- extended Airbnb config\n- pretty printing using [prettier](https://www.npmjs.com/package/prettier) on `eslint --fix`\n- bash script for additional setup\n\nTools:\n\n- [prettier](https://www.npmjs.com/package/prettier)\n\nConfigs:\n\n- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)\n- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier)\n\nPlugins:\n\n- [eslint-plugin-flowtype](https://www.npmjs.com/package/eslint-plugin-flowtype)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest)\n- [eslint-plugin-jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y)\n- [eslint-plugin-prettier](https://www.npmjs.com/package/eslint-plugin-prettier)\n- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react)\n\n### adding support to [eslint-plugin-dollar-sign](https://www.npmjs.com/package/eslint-plugin-dollar-sign)\n\n- helpful for ES6 code that uses jQuery\n\n```yaml\nextends:\n  - eslint-config-with-prettier\nplugins:\n  # https://github.com/erikdesjardins/eslint-plugin-dollar-sign\n  - dollar-sign\nrules:\n  # Require dollar sign for some variables that holds jQuery objects\n  dollar-sign/dollar-sign:\n    - error\n    - ignoreProperties\n```\n\n- .eslintrc.js\n\n```js\nmodule.exports = {\n  extends: [\"eslint-config-with-prettier\"],\n  plugins: [\"dollar-sign\"],\n  rules: {\n    \"dollar-sign/dollar-sign\": [\"error\", \"ignoreProperties\"],\n  },\n};\n```\n\n- .eslintrc.json\n\n```json\n{\n  \"extends\": [\"eslint-config-with-prettier\"],\n  \"plugins\": [\"dollar-sign\"],\n  \"rules\": {\n    \"dollar-sign/dollar-sign\": [\"error\", \"ignoreProperties\"]\n  }\n}\n```\n\n# running setup script\n\n###### ✋!!!on your own risk!!!✋, commit before running the script and control the output using diff in version control.\n\n[setup.sh](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/setup.sh) that run [gist](https://gist.github.com/marcelmokos/8cb21782167f66847eb739790f2f0a06)\n[example](https://github.com/marcelmokos/eslint-config-with-prettier/tree/master/example)\n\n```bash\nbash ./node_modules/eslint-config-with-prettier/setup.sh\n```\n\nIf you do not want to run the bash script you can simply copy files into your project.\n\nThis script adds useful files into your project.\n\n- [.editorconfig](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.editorconfig)\n  - http://EditorConfig.org\n- [.babelrc](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.babelrc)\n  - babel-preset-react-app: https://www.npmjs.com/package/babel-preset-react-app\n  - babel-plugin-styled-components: https://github.com/styled-components/babel-plugin-styled-components\n- [.eslintignore](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.eslintignore)\n- [.prettierrc](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.prettierrc)\n- [.gitignore](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.gitignore)\n  - using gitignore.io: https://www.gitignore.io/api/archive,macos,linux,windows,node,jetbrains,sublimetext,eclipse,netbeans,visualstudiocode\n- npm lint and test scripts (scripts will merge into package.json)\n  - lint and pretty print\n  - test\n  - precommit -\u003e lint-staged for\n    - javascript:`*.js`, `*.jsx`\n    - html, styles and other files: `html,md,mdx,yaml,json,css,scss,less`\n    - images: `png`,`jpeg`,`jpg`,`gif`,`svg`\n  - prepush -\u003e test:coverage and flow:errors\n\n```json\n\"scripts\": {\n  \"test\": \"jest\",\n  \"test:changed\": \"yarn test --onlyChanged --passWithNoTests --silent --runInBand\",\n  \"test:watch\": \"yarn test --watch\",\n  \"test:update\": \"yarn test --update\",\n  \"test:coverage\": \"yarn test --coverage --verbose --silent --runInBand --passWithNoTests\",\n  \"lint\": \"eslint . --cache\",\n  \"lint:fix\": \"yarn lint --fix\",\n  \"lint:staged\": \"eslint --fix --max-warnings=0\",\n  \"precommit\": \"lint-staged \u0026\u0026 yarn test:changed\",\n  \"prepush\": \"yarn test:coverage\",\n  \"prettier\": \"prettier --write *.{js,jsx,html,md,mdx,yaml,json,css,scss,less}\",\n},\n\"husky\": {\n  \"hooks\": {\n    \"pre-commit\": \"yarn precommit\",\n    \"pre-push\": \"yarn prepush\"\n  }\n},\n\"lint-staged\": {\n  \"linters\": {\n    \"*.{js,jsx}\": [\n      \"yarn run lint:staged\",\n      \"git add\"\n    ],\n    \"*.{json,css,scss,less}\": [\n      \"prettier --write\",\n      \"git add\"\n    ],\n    \"*.{png,jpeg,jpg,gif,svg}\": [\n      \"imagemin-lint-staged\",\n      \"git add\"\n    ]\n  }\n}\n```\n\n- [enzyme](https://www.npmjs.com/package/enzyme) component testing with settings for [jest-serializer-enzyme](https://www.npmjs.com/package/jest-serializer-enzyme)\n- [.flowconfig](https://github.com/marcelmokos/eslint-config-with-prettier/blob/master/.flowconfig)\n- npm flow scripts (scripts will be merged into package.json)\n\n```json\n\"scripts\": {\n  \"flow:setup\": \"yarn \u0026\u0026 flow-typed install\",\n  \"flow:update\": \"flow-typed update\",\n  \"flow\": \"flow\",\n  \"flow:errors\": \"flow --show-all-errors\",\n  \"flow:coverage\": \"flow coverage ./src/index.js --color \u0026\u0026 flow-coverage-report -i src/**/*.js -x src/**/*.test.js -x src/**/*.spec.js -t html\",\n  \"prepush\": \"yarn test:coverage \u0026\u0026 yarn run flow:errors\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelmokos%2Feslint-config-with-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelmokos%2Feslint-config-with-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelmokos%2Feslint-config-with-prettier/lists"}