Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/comparitiko/eslint-config-comparitiko
- Owner: Comparitiko
- Created: 2024-08-27T00:13:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-27T14:46:49.000Z (3 months ago)
- Last Synced: 2024-10-11T17:23:09.253Z (about 1 month ago)
- Topics: eslint, eslint-config, eslint-config-comparitiko, javascript, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-comparitiko
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🔥 Comparitiko's ESLint + Prettier configuration 🔥
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