Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infinum/js-linters
Infinum's JS team linter rules
https://github.com/infinum/js-linters
eslint javascript lint linter open-source react rules tslint
Last synced: 10 days ago
JSON representation
Infinum's JS team linter rules
- Host: GitHub
- URL: https://github.com/infinum/js-linters
- Owner: infinum
- License: mit
- Created: 2017-10-30T12:13:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-17T12:13:13.000Z (16 days ago)
- Last Synced: 2025-01-20T00:44:27.709Z (14 days ago)
- Topics: eslint, javascript, lint, linter, open-source, react, rules, tslint
- Language: TypeScript
- Homepage:
- Size: 1.25 MB
- Stars: 7
- Watchers: 10
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# @infinum/eslint-plugin
This package provides Infinum's ESLint [plugin](https://eslint.org/docs/latest/extend/plugins).
## Installation
```bash
npm install --save-dev @infinum/eslint-plugin
```## Usage
The basic usage of this plugin is to extend the `plugin:@infinum/core` config in your ESLint configuration file.
```json
{
"extends": ["plugin:@infinum/core"]
}
```However, we can also extend `.eslintrc` with additional configs. The idea is to have modular configs and that you can choose what rules you want to have on the project. E.g., there is no need to have `TypeScript` rules on a `JavaScript` project. The entire list of configs can be found in [`src/configs/index.ts`](src/configs/index.ts).
> NOTE: some configs require additional plugins to be installed. E.g., `@infinum/react` requires `eslint-plugin-react` and `eslint-plugin-react-hooks` to be installed.
### Angular Preset
Install the following packages:
```bash
npm install --save-dev eslint-plugin-rxjs eslint-plugin-jasmine @infinum/eslint-plugin
```Add this to you `eslint` config:
```json
{
"extends": ["plugin:@infinum/core", "plugin:@infinum/typescript", "plugin:@infinum/angular"],
"parserOptions": {
"project": ["./tsconfig.json"]
}
}
```### Infinum React Stack Preset
Install the following packages:
```bash
npm install -D -E \
@infinum/eslint-plugin@2 \
eslint-plugin-react@7 \
eslint-plugin-react-hooks@4 \
eslint-plugin-jsx-a11y@6 \
@typescript-eslint/eslint-plugin@7 \
@typescript-eslint/parser@7 \
@next/eslint-plugin-next@14 \
eslint-plugin-typescript-enum@2 \
[email protected]
```Add this to you `eslint` config:
```json
{
"extends": [
"plugin:@infinum/core",
"plugin:@infinum/typescript",
"plugin:@infinum/react",
"plugin:@infinum/next-js",
"plugin:@infinum/chakra-ui"
],
"parserOptions": {
"project": ["./tsconfig.json"]
}
}
```## License
The [MIT License](./LICENSE)
## Credits
`js-linters` is maintained and sponsored by
[Infinum](https://www.infinum.com).