https://github.com/opencollective/eslint-config-opencollective
https://www.npmjs.com/package/eslint-config-opencollective
https://github.com/opencollective/eslint-config-opencollective
Last synced: about 1 month ago
JSON representation
https://www.npmjs.com/package/eslint-config-opencollective
- Host: GitHub
- URL: https://github.com/opencollective/eslint-config-opencollective
- Owner: opencollective
- License: mit
- Created: 2016-02-09T15:49:45.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-04-27T04:18:06.000Z (about 2 months ago)
- Last Synced: 2025-04-27T05:19:07.615Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - opencollective/eslint-config-opencollective - https://www.npmjs.com/package/eslint-config-opencollective (JavaScript)
README
# eslint-config-opencollective
[](https://www.npmjs.com/package/eslint-config-opencollective)
[](https://github.com/opencollective/eslint-config-opencollective/blob/main/LICENSE)Shared ESLint configuration used across Open Collective projects.
## Installation
First, add the ESLint scripts to your `package.json`:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"lint:quiet": "npm run lint -- --quiet"
}
}
```Then choose your project type:
### Node.js Projects
1. Install dependencies:
```bash
npm install --save-dev eslint @typescript-eslint/parser eslint-plugin-import eslint-plugin-n eslint-plugin-simple-import-sort eslint-config-opencollective
```2. Create `.eslintrc.cjs` in your project root:
```js
import openCollectiveConfig from 'eslint-config-opencollective/eslint-node.config.cjs';module.exports = {
...openCollectiveConfig,
// Add your custom rules here
};
```### React Projects
1. Install dependencies:
```bash
npm install --save-dev eslint @typescript-eslint/parser eslint-plugin-import eslint-plugin-n eslint-plugin-react eslint-plugin-simple-import-sort eslint-config-opencollective
```2. Create `.eslintrc.cjs` in your project root:
```js
import openCollectiveConfig from 'eslint-config-opencollective/eslint-react.config.cjs';module.exports = {
...openCollectiveConfig,
// Add your custom rules here
};
```## Publishing
To publish a new version:
1. Update the version in `package.json`:
```bash
npm version patch # for bug fixes
npm version minor # for new features
npm version major # for breaking changes
```2. Push the changes and the new tag:
```bash
git push --follow-tags
```3. Publish to npm:
```bash
npm publish
```