# @mvf/eslint-config-mvf-typescript-node

> Package for MVF node typescript linting standards

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

## Install

```sh
npm install @mvf/eslint-config-mvf-typescript-node
pnpm add @mvf/eslint-config-mvf-typescript-node
yarn add @mvf/eslint-config-mvf-typescript-node
bun add @mvf/eslint-config-mvf-typescript-node
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2024-04-04 |
| First published | 2020-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gijserensteinmvf, arnicsm, russellwind-mvf, dovydas.rupsys, michaelkingmvf, john.felton, jrrsmvf |

## Links

- npm: https://www.npmjs.com/package/@mvf/eslint-config-mvf-typescript-node
- npm.io page: https://npm.io/package/@mvf/eslint-config-mvf-typescript-node

## Dependencies (11)

- [eslint](https://npm.io/package/eslint.md) ^8.57.0
- [prettier](https://npm.io/package/prettier.md) ^3.2.5
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.28.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.29.1
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^9.1.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.5.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^5.1.3
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^7.5.0
- [eslint-config-airbnb-typescript](https://npm.io/package/eslint-config-airbnb-typescript.md) ^18.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^7.5.0
- [eslint-plugin-require-extensions](https://npm.io/package/eslint-plugin-require-extensions.md) ^0.1.3

## Recent versions

- 2.0.6 (latest) — 2024-04-04
- 2.0.5 — 2024-04-04
- 2.0.4 — 2024-04-02
- 2.0.3 — 2024-04-02
- 2.0.2 — 2024-04-02
- 2.0.1 — 2024-04-02
- 2.0.0 — 2022-07-28
- 1.1.5 — 2022-03-11
- 1.1.4 — 2022-03-11
- 1.1.3 — 2022-03-11
- 1.1.2 — 2022-03-11
- 1.1.1 — 2022-03-11
- 1.1.0 — 2022-03-11
- 1.0.5 — 2020-10-08
- 1.0.4 — 2020-10-08
- … 4 more at https://npm.io/package/@mvf/eslint-config-mvf-typescript-node/versions

## README

# MVF ESLINT CONFIG FOR TYPESCRIPT

Package for MVF node typescript linting standards

# Install MVF eslint config in your application

```
npm install -D @mvf/eslint-config-mvf-typescript-node
npx install-peerdeps --dev @mvf/eslint-config-mvf-typescript-node

or

yarn add -D @mvf/eslint-config-mvf-typescript-node
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier
```

## Enable MVF linter

Create `.eslintrc.js` file in your root directory and paste the below:

```js
module.exports = {
  ...require("@mvf/eslint-config-mvf-typescript-node").eslint,
};
```

Create `.prettierrc.js` file in your root directory and paste the below:

```js
module.exports = {
  ...require("@mvf/eslint-config-mvf-typescript-node").prettier,
};
```

Install eslint vscode extension and paste the below to your vscode settings json:

```json
{
    ...,
    "eslint.autoFixOnSave": true,
    "eslint.validate":  [
      "javascript",
      "javascriptreact",
      {"language": "typescript", "autoFix": true },
      {"language": "typescriptreact", "autoFix": true }
    ],
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
    ...
}
```

You can add the below scripts in the `package.json` to run the linter:

```json
"lint": "eslint './src/**/*.ts'" // list lint issues without fixing them
"lint:fix": "npm run lint -- --fix" // fix lint errors automatically when possible and list remaining lint issues
```

You might need to restart VS Code to see the warnings and errors highlighted in your code.

You can also setup pre-commit checks if you want to:

Setup pre-commit checks, add the following to your `package.json`:

```json
{
  "dependencies": { ... },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged && tsc --noEmit && npm test"
    }
  },
  "lint-staged": {
    "*.{ts}": [
      "eslint --fix"
    ]
  }
}
```

# Publish changes

After you have merged a PR to master, you need to rebuild and publish the components.

1. Checkout master `git checkout master && git pull`
2. Use one of the following make publish commands to publish changes:
    * `make publish kind=patch` - Use this if your change is a bug fix and is backwards compatible.
    * `make publish kind=minor` - Use this if your change adds new functionality and is backwards compatible.
    * `make publish kind=major` - Use this if your change is not backwards compatible.

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