# eslint-config-noftalint

> Noftaly's eslint configuration

Latest version **2.21.1** (published 2024-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-noftalint
pnpm add eslint-config-noftalint
yarn add eslint-config-noftalint
bun add eslint-config-noftalint
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.21.1 |
| Published | 2024-04-27 |
| First published | 2019-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.18.0 |
| Dependencies | 0 |
| Unpacked size | 88.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | noftaly |
| Maintainers | noftaly |
| Keywords | eslint, eslintconfig, noftalint, eslint-config, eslint-config-noftalint, noftaly |

## Links

- npm: https://www.npmjs.com/package/eslint-config-noftalint
- Repository: https://github.com/noftaly/eslint-config-noftalint
- Homepage: https://github.com/noftaly/eslint-config-noftalint#readme
- Issues: https://github.com/noftaly/eslint-config-noftalint/issues
- npm.io page: https://npm.io/package/eslint-config-noftalint

## 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

- 2.21.1 (latest) — 2024-04-27
- 1.13.0-beta.1 (beta) — 2020-10-26
- 2.21.0 — 2024-04-04
- 2.20.1 — 2024-02-10
- 2.20.0 — 2024-02-10
- 2.19.5 — 2023-11-11
- 2.19.4 — 2023-11-11
- 2.19.3 — 2023-11-11
- 2.19.1 — 2023-09-23
- 2.19.0 — 2023-08-03
- 2.18.0 — 2023-07-19
- 2.17.0 — 2023-06-14
- 2.16.0 — 2023-03-28
- 2.15.1 — 2023-02-28
- 2.15.0 — 2023-02-28
- … 65 more at https://npm.io/package/eslint-config-noftalint/versions

## README

# eslint-config-noftalint

![npm version](https://img.shields.io/npm/v/eslint-config-noftalint?label=version)
![downloads](https://img.shields.io/npm/dt/eslint-config-noftalint)
![size](https://img.shields.io/bundlephobia/min/eslint-config-noftalint?label=package%20size)

This package provides noftaly's .eslintrc as an extensible shared config.\
[See the comparison with airbnb, google and standard's config here](https://github.com/noftaly/eslint-config-noftalint/blob/master/docs/comparison.md)

## Table of Content

- [Usage](#usage)
- [Use with TypeScript](#use-with-typescript)
- [Links](#links)
- [Credits](#credits)

## Usage

- Install this package, with

```shell
$ npm i -D eslint           \
    eslint-config-noftalint \
    eslint-plugin-import    \
    eslint-plugin-node      \
    eslint-plugin-unicorn
```

- Add `noftalint` to your `.eslintrc.js`: `extends: ['noftalint']`

## Use with TypeScript

`noftalint` also contains TypeScript rules, from `@typescript-eslint/eslint-plugin`! They are not included by default, so you need to configure some things first.

1. Run the following command to install the required dependencies

```shell
$ npm i -D typescript         \
    @typescript-eslint/parser \
    @typescript-eslint/eslint-plugin
```

2. Update your `.eslintrc.js` configuration with the following values:

```js
module.exports = {
  extends: ['noftalint/typescript'],
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint'],
  ...
};
```

3. Create a file named `tsconfig.eslint.json`, at the same level as your `tsconfig.json`.
4. Add this inside your `tsconfig.eslint.json`. The `includes` property must be all the files you want to lint, including JS files.

```json
{
  "extends": "./tsconfig.json",
  "include": [
    "src/**/*.ts",
    ".eslintrc.js"
  ]
}
```

If you want to use custom TypeScript's path aliases, you will have to follow these steps:

```shell
$ npm install --save-dev eslint-import-resolver-typescript
```

Update your `.eslintrc.js` by disabling `node/no-missing-import` as it does not support TypeScript's path aliases; and by updating the settings for `import/resolver`.

```js
module.exports = {
  ...
  rules: {
    ...
    // It cannot resolve TypeScript's path aliases. See https://github.com/mysticatea/eslint-plugin-node/issues/233
    'node/no-missing-import': 'off',
  },
  settings: {
    ...
    'import/resolver': {
      typescript: {
        alwaysTryTypes: true,
      },
    },
  },
};
```

If you use the shebang notation inside your project, you will need to modify the `node/shebang` rule in your `.eslintrc.js`:

```js
module.exports = {
  ...
  rules: {
    ...
    'node/shebang': ['error', {
      convertPath: {
        // Change your main file and your destination file to what you want
        'src/main.ts': ['^src/main.ts$', 'build/main.js'],
      },
    }],
  }
}
```

## Links

GitHub repository: [eslint-config-noftalint](https://github.com/noftaly/eslint-config-noftalint)\
npm package: [eslint-config-noftalint](https://www.npmjs.com/package/eslint-config-noftalint)

## Credits

Inspired by the [Airbnb's config](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base)\
Generator adapted from [Canonical's generator](https://github.com/gajus/eslint-config-canonical/)

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