npm.io
2.0.2 • Published 2 months ago

eslint-config-gbrachetta

Licence
MIT
Version
2.0.2
Deps
13
Size
12 kB
Vulns
0
Weekly
0

ESLint config with TypeScript support

A thorough ESLint configuration for React and TypeScript projects, based on Prettier conventions with additional autofixable sorting rules.

Installation

Install the package:

npm i -D eslint-config-gbrachetta

Configuration

This package uses ESLint's flat config format.

Create or update eslint.config.js:

const eslintConfigGbrachetta = require("eslint-config-gbrachetta");

module.exports = [
  ...eslintConfigGbrachetta,
];

If your project uses an ES module configuration (eslint.config.js with "type": "module" in package.json), use:

import eslintConfigGbrachetta from "eslint-config-gbrachetta";

export default [
  ...eslintConfigGbrachetta,
];

VS Code

If you use VS Code, install the Error Lens extension to display ESLint errors and warnings directly in the editor.

To lint and format files on save, add the following to your VS Code settings.json:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.formatOnSave": true
}

Keywords