@interaktiv/eslint-config-dia

1.0.0 • Public • Published

eslint-config-dia

ESLint > shareable config for most sort of projects at DIA

Commitizen friendly Conventional Commits Code of Conduct semantic-release MIT License

npm latest version npm next version

Table of Contents

Installation

npm install --save-dev @interaktiv/eslint-config-dia

Usage

Once the @interaktiv/eslint-config-dia package is installed, you can use it by specifying @interaktiv/dia in the extends section of your ESLint configuration.

{
  "extends": "@interaktiv/dia",
  "rules": {
    // Additional, per-project rules...
  }
}

Notes

Please note that most of the stylistic rules are disabled cause we are using Prettier to format our code. Therefore the eslint-config-prettier plugin is included.

Our Prettier shareable config can be found here @interaktiv/prettier-config-dia.

Provided configurations

The default config actually is composed of several configurations and you can use those individually. These are the configs it's using:

You can use each of these configs yourself. Also, the es6, import, promise, security configs each have a possible-errors.js, best-practices.js (and stylistic.js) which they are composed of as well.

But not only these, others too, checkout out the source.

Optional configurations

Other configs are exposed also. You can use them standalone:

{
  "extends": "@interaktiv/dia/<config-name>"
}

or in combination with the base config (recommended):

{
  "extends": [
    "@interaktiv/dia",
    "@interaktiv/dia/<config-name>"
  ]
}

for example

{
  "extends": [
    "@interaktiv/dia",
    "@interaktiv/dia/titanium",
    "@interaktiv/dia/jest",
  ]
}

Things to know

  • All plugins needed for rules used by these configs are dependencies of this module so you don't have to install anything on your own.

  • Almost all of the stylistic rules are disabled cause we are using prettier to format our code. To ensure this the eslint-config-prettier is included too.

    Our Prettier shareable config can be found here @interaktiv/prettier-config-dia.

  • The lwc and aura configs disable some import config rules cause there is no lwc module resolver package available at the moment of time.

ESLint Dependencies

Example Implementations

Salesforce Platform Development with LWC and Aura

{
  extends: [
    '@interaktiv/dia',
    '@interaktiv/dia/jest',
    '@interaktiv/dia/salesforce'
  ],
  // Custom rules if needed
  rules: {}
}

Node.js Package / App with Jest

{
  extends: [
    '@interaktiv/dia',
    '@interaktiv/dia/jest'
  ],
  // Custom rules if needed
  rules: {}
}

Appcelerator Titanium Mobile App

{
  extends: [
    '@interaktiv/dia',
    '@interaktiv/dia/titanium'
  ],
  // Custom rules if needed
  rules: {}
}

License

MIT Copyright © 2019-present die.interaktiven GmbH & Co. KG

Package Sidebar

Install

npm i @interaktiv/eslint-config-dia

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

78.6 kB

Total Files

73

Last publish

Collaborators

  • dia-bot
  • kbshl