1.0.8 • Published 2 years ago

@meshtastic/eslint-config v1.0.8

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
2 years ago

Meshtastic Web Config

Open in Visual Studio Code NPM Downloads CI

Overview

This package includes configurations for ESLint and Prettier used by Meshtastic for there JavaScript/TypeScript projects.

Installation & Usage

The library is available from NPM and can be installed with:

pnpm add @meshtastic/eslint-config prettier

Create ESLint and Prettier configuration files in your project root directory with the following content:

// .eslintrc.cjs

/** @type {import("eslint").Linter.Config} */
module.exports = {
  extends: '@meshtastic/eslint-config',
  parserOptions: {
    tsconfigRootDir: __dirname,
    project: ['./tsconfig.json'],
  },
};
// .prettierrc

"@meshtastic/eslint-config/prettier"

It is recommended to setup a format/linting script:

// package.json

"scripts": {
  "format": "prettier --write 'src/**/*.{ts,tsx}' && eslint src/*.{ts,tsx}"
},