{"id":18426144,"url":"https://github.com/wework/eslint-config-wework","last_synced_at":"2025-10-28T21:15:42.401Z","repository":{"id":57229509,"uuid":"75558491","full_name":"wework/eslint-config-wework","owner":"wework","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-09T05:54:50.000Z","size":87,"stargazers_count":2,"open_issues_count":4,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-22T21:25:08.702Z","etag":null,"topics":["es2015","eslint","eslint-config","react","wework"],"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/wework.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":"2016-12-04T19:17:54.000Z","updated_at":"2018-08-08T11:53:13.000Z","dependencies_parsed_at":"2022-09-14T14:52:06.734Z","dependency_job_id":null,"html_url":"https://github.com/wework/eslint-config-wework","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Feslint-config-wework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Feslint-config-wework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Feslint-config-wework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Feslint-config-wework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wework","download_url":"https://codeload.github.com/wework/eslint-config-wework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247688095,"owners_count":20979604,"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":["es2015","eslint","eslint-config","react","wework"],"created_at":"2024-11-06T05:07:01.319Z","updated_at":"2025-10-28T21:15:42.318Z","avatar_url":"https://github.com/wework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"eslint-config-wework\n================\n\n[![Libraries.io for GitHub][librariesio-image]][librariesio-url]\n[![NPM version][npm-version-image]][npm-url]\n[![NPM downloads][npm-downloads-image]][npm-url]\n[![MIT License][license-image]][license-url]\n\n\n\u003eShared ESLint configuration for WeWork projects\n\n# Introduction\n\nESLint config for WeWork projects. This is an extension of `eslint-config-airbnb` and also provides `react`, `imports`, `lodash`, `mocha`, and `node` presets.\n\n\n# Usage\n\n### Install:\n\n```\nnpm install eslint-config-wework --save\n```\n\nIf you're using `npm` \u003c v3 you'll need to install each of this packages `peerDependencies` explicitly.\n\n```\nnpm install eslint-config-airbnb eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y --save\n```\n\nNote: make sure the versions of the above packages that are installed satisfy this package's `peerDependencies`, otherwise you might see inconsistent behavior.\n\n### Configure:\n\nFirst, `touch .eslintrc` if you don't already have one.\n\nThen update it to look like the following:\n\n```\n{\n  \"root\": true,\n  \"extends\": [\n    \"wework\"\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\n### React:\nTo enable React-specific rules, extend `wework/react`:\n\n```\n{\n  \"root\": true,\n  \"extends\": [\n    \"wework\",\n    \"wework/react\"\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\n### Imports:\nTo enable linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names, extend `wework/imports`:\n\n```\n{\n  \"root\": true,\n  \"extends\": [\n    \"wework\",\n    \"wework/react\",\n    \"wework/imports\"\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\n### Lodash:\nTo enable React-specific rules, extend `wework/lodash`:\n\n```\n{\n  \"root\": true,\n  \"extends\": [\n    \"wework\",\n    \"wework/lodash\"\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\n### Mocha:\nTo enable linting of Mocha/Chai/Sinon tests add a eslintrc file to your test folder:\n\n```\n{\n  \"extends\": [\n    \"wework/mocha\",\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\n### Node:\nFor Node specific config, including identification of security hotspots, add a eslintrc file to your node src folder:\n\n```\n{\n  \"extends\": [\n    \"wework/node\",\n  ],\n  \"rules\": {\n    # Override preset rules here\n  },\n}\n```\n\nNote: the security plugin is slow, finds a lot of false positives which need triage by a human, and isn't geared towards client-side. Use sparingly!\nSee https://github.com/nodesecurity/eslint-plugin-security for more info.\n\n# Development\n\n1. Checkout this repo\n2. Make changes in a feature branch and open a PR to `master`\n\nThe purpose of this package is to define and enforce code style in JavaScript code. With that in mind please be mindful when proposing changes, explain your reasoning and consider other users.\n\n# npm scripts\n\nTarget | Behavior\n------------ | -------------\n**`npm run lint`** | (*Run as a git pre-commit hook*) Lint the config with itself\n**`npm run security-scan`** | (*Run as a git pre-push hook*) Checks npm dependencies for security vulnerabilities\n**`npm run release \u003cversion\u003e`** | Generates a changelog, updates package version, tags and pushes via [`np`](https://www.npmjs.com/package/np). This should only be run on an up-to-date `master` by a maintainer of this package. \u003cbr /\u003e\u003cbr /\u003eVersion can be a semver level: `patch | minor | major | prepatch | preminor | premajor | prerelease`, or a valid semver version: `1.2.3`.\n\n**`npm run` will list all npm scripts**\n\n\n[npm-url]: https://npmjs.org/package/eslint-config-wework\n[npm-version-image]: http://img.shields.io/npm/v/eslint-config-wework.svg?style=flat-square\n[npm-downloads-image]: http://img.shields.io/npm/dm/eslint-config-wework.svg?style=flat-square\n\n[license-url]: LICENSE\n[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square\n\n[librariesio-url]: https://libraries.io/npm/eslint-config-wework\n[librariesio-image]: https://img.shields.io/librariesio/github/wework/eslint-config-wework.svg?maxAge=2592000\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwework%2Feslint-config-wework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwework%2Feslint-config-wework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwework%2Feslint-config-wework/lists"}