Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/comparitiko/eslint-config-comparitiko

Opinionated linting configuration. Valid for your JavaScript or TypeScript projects
https://github.com/comparitiko/eslint-config-comparitiko

eslint eslint-config eslint-config-comparitiko javascript typescript

Last synced: about 1 month ago
JSON representation

Opinionated linting configuration. Valid for your JavaScript or TypeScript projects

Awesome Lists containing this project

README

        


🔥 Comparitiko's ESLint + Prettier configuration 🔥


Comparitiko


Opinionated linting configuration. Valid for your JavaScript or TypeScript projects 🤟




Stars are free 😊

# 👀 How to use

1. Install the dependency
```bash
npm install --save-dev eslint-config-comparitiko
```
2. Add it to your `eslint.config.mjs` file:

```js
{
import eslintConfigComparitiko from "eslint-config-comparitiko";

export default [...eslintConfigComparitiko];
}
```

3. If you are using TypeScript, just import the TypeScript configuration instead:

```js
import eslintConfigComparitiko from "eslint-config-comparitiko/typescript";

export default [...eslintConfigComparitiko];
```

- You need also configure your `tsconfig.json` file in the root of your project to use the `typescript` configuration same way as the `eslint.config.mjs` file.

## 🤔 What it does

- Lints JavaScript using [`eslint:recommended`](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-eslintrecommended) and [Prettier](https://prettier.io/)
- Additionally, lints TypeScript using [`@typescript-eslint/recommended`](https://typescript-eslint.io/docs/linting/configs)
- Uses the following [JavaScript rules](https://github.com/Comparitiko/eslint-config-comparitiko/blob/main/eslint.config.mjs) and [TypeScript rules](https://github.com/Comparitiko/eslint-config-comparitiko/blob/main/typescript.js)
- Uses the following plugins:

- [`import`](https://github.com/import-js/eslint-plugin-import/): helps validate proper imports

- [`simple-import-sort`](https://github.com/lydell/eslint-plugin-simple-import-sort/): sorts imports

- [`unused-imports`](https://github.com/sweepline/eslint-plugin-unused-imports): checks for unused imports