https://github.com/netcentric/eslint-config
Cognizant Netcentric's coding and style rules for ESLint
https://github.com/netcentric/eslint-config
eslint eslint-config
Last synced: 12 months ago
JSON representation
Cognizant Netcentric's coding and style rules for ESLint
- Host: GitHub
- URL: https://github.com/netcentric/eslint-config
- Owner: Netcentric
- License: apache-2.0
- Created: 2023-03-28T11:50:37.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-15T12:36:42.000Z (over 2 years ago)
- Last Synced: 2025-01-12T16:12:40.211Z (about 1 year ago)
- Topics: eslint, eslint-config
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @netcentric/eslint-config
[](https://npmjs.org/package/@netcentric/eslint-config)
[](https://github.com/netcentric/eslint-config/actions)
[](https://github.com/netcentric/eslint-config/actions)
[](https://github.com/semantic-release/semantic-release)
[](https://opensource.org/licenses/Apache-2.0)
This package provides Cognizant Netcentric's [ESLint](https://eslint.org) configuration as an extensible shared config.
If ESLint is new to you, you might want to check out [what it does](https://eslint.org/) and [how to configure it](https://eslint.org/docs/latest/use/getting-started).
## Install
```bash
npm i @netcentric/eslint-config
```
## Setup
### .eslintrc
Create or update your `.eslintrc` file:
```json
{
"extends": "@netcentric/eslint-config"
}
```
## IDE integration
Most IDEs should have an [integration for ESLint](https://eslint.org/docs/latest/use/integrations).
## Build system integration
If you are using https://github.com/Netcentric/fe-build, ESLint is integrated by default.
For custom lint task, update `package.json`
```json
"scripts": {
"lint:js": "eslint path/to/source-js-files"
}
```
Make sure you do not accidently lint files you are not interested that are out of scope for your build; e.g. files within the `node_modules` folder.
## Overwriting rules
Please stick to the Netcentric rules as they are battle tested and were created to form a company wide basis for JS code quality. If there's a very specific case you want to deactivate a rule for consider using [Eslint inline comments](https://eslint.org/docs/latest/use/configure/rules#disabling-rules) instead.
If there's a rule you consider as outdated or simply wrong please contact the package's maintainer or file an issue in JIRA (`bugs` in `package.json`) or create a PR on the package's repository (`repository` in `package.json`).
If you have a very project specific case where adding or deactivating a rule makes perfectly sense, you can overwrite any rule using the `rules` property.
## I don't understand why I violated rule X
You can find a description of all rules on the [Eslint Homepage](https://eslint.org/docs/latest/rules/).