Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alexey-koran/eslint-config

Shared eslint flat config
https://github.com/alexey-koran/eslint-config

eslint eslint-config eslint-flat-config

Last synced: 30 days ago
JSON representation

Shared eslint flat config

Awesome Lists containing this project

README

        

# `@alexey-koran/eslint-config`

ESLint [shareable config](https://eslint.org/docs/latest/extend/shareable-configs)

### Installation

```bash
pnpm i -D @alexey-koran/eslint-config
```

### Usage [example](https://github.com/alexey-koran/react-template/blob/main/eslint.config.js)

# Scripts

> [!NOTE]
>
> `allJsTsExtensions` = js, cjs, mjs, jsx, cjsx, mjsx, ts, cts, mts, tsx, ctsx, mtsx
>
> For the more details check [scripts section in package.json](./package.json#L9)

Scripts table

| Command | Description | Path |
| ------------------------- | ------------------------------------------------------ | ------------------------------- |
| | | |
| | `Code linting & formatting` | |
| `pnpm prettier` | code format check | `**/*.{allJsTsExtensions,pcss}` |
| `pnpm prettier:fix` | code format autofix | `**/*.{allJsTsExtensions,pcss}` |
| `pnpm lint` | eslint check | `**/*.{allJsTsExtensions}` |
| `pnpm lint:fix` | eslint autofix | `**/*.{allJsTsExtensions}` |
| | | |
| | `Analyzation & config check` | |
| `pnpm test:eslint-config` | eslint config inspector, displays flat configs & rules | |
| | | |

# Dependencies

> [!NOTE]
>
> For the more details check [dev & prod dependencies in package.json](./package.json#L27)

Dependencies table

| Package name | Description | Version |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| | | |
| eslint | configurable JavaScript linter | [v9.12.\*](https://eslint.org/) |
| typescript-eslint | enables ESLint and Prettier to support [TypeScript](https://www.typescriptlang.org/) | [v8.8.\*](https://typescript-eslint.io/) |
| | `Configs` | |
| eslint-config-prettier | turns off all rules that are unnecessary or might conflict with [Prettier](https://github.com/prettier/prettier) | [v9.1.\*](https://github.com/prettier/eslint-config-prettier) |
| | `Plugins` | |
| @eslint/js | ESLint JavaScript plugin Separating out JavaScript-specific functionality from ESLint | [v9.12.\*](https://www.npmjs.com/package/@eslint/js) |
| eslint-plugin-import | intends to support linting of ES2015+ (ES6+) import/export syntax, prevent issues with misspelling of file paths and import names | [v2.31.\*](https://github.com/import-js/eslint-plugin-import) |
| eslint-import-resolver-typescript | adds [TypeScript](https://www.typescriptlang.org/) support to [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | [v3.6.\*](https://github.com/import-js/eslint-import-resolver-typescript) |
| eslint-import-resolver-webpack | webpack-literate module resolution plugin for [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import) | [v0.13.\*](https://www.npmjs.com/package/eslint-import-resolver-webpack) |
| eslint-plugin-jsx-a11y | static AST checker for accessibility rules on JSX elements | [v6.10.\*](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) |
| eslint-plugin-prettier | runs [Prettier](https://github.com/prettier/prettier) as an ESLint rule and reports differences as individual ESLint issues | [v5.2.\*](https://github.com/prettier/eslint-plugin-prettier) |
| eslint-plugin-react | React specific linting rules for ESLint | [v7.37.\*](https://github.com/jsx-eslint/eslint-plugin-react) |
| eslint-plugin-react-hooks | enforces the [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks) | [v5.1.\*-rc](https://www.npmjs.com/package/eslint-plugin-react-hooks) |
| @stylistic/eslint-plugin-js | JavaScript stylistic rules for ESLint | [v2.9.\*](https://www.npmjs.com/package/@stylistic/eslint-plugin-js) |
| @stylistic/eslint-plugin-jsx | [JSX](https://react.dev/learn/writing-markup-with-jsx) stylistic rules for ESLint | [v2.9.\*](https://www.npmjs.com/package/@stylistic/eslint-plugin-jsx) |
| @stylistic/eslint-plugin-ts | [TypeScript](https://www.typescriptlang.org/) stylistic rules for ESLint | [v2.9.\*](https://www.npmjs.com/package/@stylistic/eslint-plugin-ts) |
| | | |
| | `Other` | |
| globals | global identifiers from different JavaScript environments | [v15.10.\*](https://github.com/sindresorhus/globals) |
| | | |

| Package name | Description | Version |
| ----------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| | | |
| | `For local development` | |
| @eslint/config-inspector | ESLint config inspector | [v0.5.\*](https://github.com/eslint/config-inspector) |
| @alexey-koran/prettier-config | Prettier [sharing configuration](https://prettier.io/docs/en/configuration.html#sharing-configurations) | [v0.1\*](https://npmjs.com/@alexey-koran/prettier-config) |
| | | |