# @kitstigator/eslint-config-functional

> Strict & opinionated ESLint config for FP-oriented ES6 React & Typescript projects.

Latest version **1.13.1** (published 2023-10-20) · gpl-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @kitstigator/eslint-config-functional
pnpm add @kitstigator/eslint-config-functional
yarn add @kitstigator/eslint-config-functional
bun add @kitstigator/eslint-config-functional
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.13.1 |
| Published | 2023-10-20 |
| First published | 2023-10-20 |
| Weekly downloads | 0 |
| License | gpl-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 12 |
| Unpacked size | 41.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chris N |
| Maintainers | kitstigator |
| Keywords | alphabetic, config, eslint, eslintconfig, functional, linter |

## Links

- npm: https://www.npmjs.com/package/@kitstigator/eslint-config-functional
- Repository: https://github.com/kitstigator/eslint-config-functional
- Homepage: https://github.com/kitstigator/eslint-config-functional#README
- Issues: https://github.com/kitstigator/eslint-config-functional/issues
- npm.io page: https://npm.io/package/@kitstigator/eslint-config-functional

## Dependencies (12)

- [eslint-plugin-json](https://npm.io/package/eslint-plugin-json.md) 3.1.0
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) 7.33.2
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) 2.28.1
- [eslint-plugin-unicorn](https://npm.io/package/eslint-plugin-unicorn.md) 48.0.1
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) 6.7.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) 6.8.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) 4.6.0
- [eslint-plugin-prefer-arrow](https://npm.io/package/eslint-plugin-prefer-arrow.md) 1.2.3
- [eslint-plugin-sort-keys-fix](https://npm.io/package/eslint-plugin-sort-keys-fix.md) 1.1.2
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) 6.8.0
- [eslint-import-resolver-typescript](https://npm.io/package/eslint-import-resolver-typescript.md) 3.6.1
- [eslint-plugin-sort-destructure-keys](https://npm.io/package/eslint-plugin-sort-destructure-keys.md) 1.5.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.13.1 (latest) — 2023-10-20

## README

# eslint-config-functional

An [ESLint](https://eslint.org/) configuration library for projects based on React 18+ with Typescript 5+.

## Disclaimer

This is an exhaustive and **opinionated** ESLint config that enforces consistent usage of ES6 & [strict](https://typescript-eslint.io/linting/configs/#strict) Typescript non-OOP paradigms. It encourages adherence to best practices and restricts certain language features that are prone to anti-patterns.

Notable linting rules include:

- `class` declarations are disallowed (encouraging the use of pure functions)
- `default` exports are disallowed (named exports keep imports consistent)
- `interface` declarations are disallowed (avoids [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces) - use `type` instead)
- `enum` declarations are disallowed (use string [unions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) instead)
- Object keys, union types, imports and component props are sorted alphabetically

## Installation

First, install this package alongside `eslint`:

```sh
npm install -D @kitstigator/eslint-config-functional eslint
```

Next, create the `.eslintrc.json` configuration file at the root of your project:

```json
{
  "extends": "@kitstigator/eslint-config-functional",
}
```

Remember to [set](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code) here any `ignorePatterns` if you require them beyond the standard `build` and `dist` folders, along with any other config overrides.

## Usage

Once installed, you can run any `eslint` command.

You may also define scripts that will lint, fix and format your files to help automate your workflow.

For example, in your `package.json`, add the following under `scripts`:

```json
"scripts": {
  "lint-code": "eslint --fix --ext .ts,.tsx .",
}
```

## IDE setup

### VS Code

If you use Microsoft VS Code, you can add the following snippet at the top of your `.vscode/settings.json` to automatically run `eslint` and fix all issues whenever a file is saved.

```json
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}
```

## License

This work is licensed under the [GNU General Public License version 3](https://www.gnu.org/licenses/gpl-3.0.en.html).

---
_Source: https://npm.io/package/@kitstigator/eslint-config-functional · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
