eslint-config-digtrax

0.0.23 • Public • Published

eslint-config-digtrax

eslint-config-digtrax is a shared ESLint configuration that includes rules and settings for JavaScript/TypeScript projects. This configuration helps maintain consistent code quality across multiple projects.

Installation

To use this configuration in your project, you can install it using either npm or Yarn.

Using npm

  1. Install eslint-config-digtrax:

    npm install eslint-config-digtrax --save-dev
  2. Install the necessary peer dependencies:

    npm install @typescript-eslint/eslint-plugin@^2.23.0 @typescript-eslint/parser@^2.23.0 eslint@6.8.0 eslint-config-airbnb@^18.1.0 eslint-plugin-import@^2.29.1 eslint-config-prettier@^6.10.0 eslint-plugin-jsx-a11y@6.2.3 eslint-plugin-prefer-arrow@^1.2.3 eslint-plugin-prettier@^3.1.2 eslint-plugin-promise@^4.2.1 eslint-plugin-react@7.19.0 eslint-plugin-react-hooks@2.5.0 --save-dev

Using Yarn

  1. Install eslint-config-digtrax:

    yarn add eslint-config-digtrax --dev
  2. Install the necessary peer dependencies:

    yarn add @typescript-eslint/eslint-plugin@^2.23.0 @typescript-eslint/parser@^2.23.0 eslint@6.8.0 eslint-config-airbnb@^18.1.0 eslint-plugin-import@^2.29.1 eslint-config-prettier@^6.10.0 eslint-plugin-jsx-a11y@6.2.3 eslint-plugin-prefer-arrow@^1.2.3 eslint-plugin-prettier@^3.1.2 eslint-plugin-promise@^4.2.1 eslint-plugin-react@7.19.0 eslint-plugin-react-hooks@2.5.0 --dev

Usage

To use the eslint-config-digtrax configuration, extend it in your ESLint configuration file (e.g., .eslintrc.json, .eslintrc.js, etc.).

Example Configuration

.eslintrc.json

{
  "extends": ["eslint-config-digtrax"],
  "parser": "@typescript-eslint/parser"
}

.eslintrc.js

module.exports = {
  extends: ['eslint-config-digtrax'],
  parser: '@typescript-eslint/parser',
};

This configuration file should include "eslint-config-digtrax" in the "extends" array and set "@typescript-eslint/parser" as the parser. Make sure that "eslint-config-digtrax" is placed last in the "extends" array if you are combining it with other configurations, so it can properly override conflicting rules.

Customization

You can override specific rules in your project's ESLint configuration to suit your needs.

Example Override (Not Recommended)

.eslintrc.json

{
  "extends": ["eslint-config-digtrax"],
  "parser": "@typescript-eslint/parser",
  "rules": {
    "no-console": "off"
  }
}

In this example, the no-console rule is turned off, allowing the use of console.log and other console methods.

License

This project is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-digtrax

Weekly Downloads

290

Version

0.0.23

License

none

Unpacked Size

7.34 kB

Total Files

3

Last publish

Collaborators

  • digtxn