2.0.0 • Published 3 months ago

eslint-config-espri-back v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

Install

Run

npm install -D  eslint-config-espri-back@2.0.0

eslint.config.js

import eslintESPRIBack from "eslint-config-espri-back";

export default [
	eslintESPRIBack,
];

Rules explanations

Base

  • @typescript-eslint/recommended

Added rules

Each rules can be disable with // eslint-disable-next-line but must be justified

@typescript-eslint/interface-name-prefix

off because we do not want this rules from base

Link

@typescript-eslint/explicit-function-return-type

off because we do not want this rules from base

Link

@typescript-eslint/explicit-module-boundary-types

off because we do not want this rules from base

Link

@typescript-eslint/no-explicit-any

off because we do not want this rules from base

Link

@typescript-eslint/no-empty-function

off because we do not want this rules from base

Link

@typescript-eslint/comma-dangle

error, always-multiline because only the lines you are modifying must be touched

Link

@typescript-eslint/semi

error, always because we always want a semicolon at the end of each lines

Link

@typescript-eslint/indent

error, 2 because we want to have an indentation of 2

Link

@typescript-eslint/no-floating-promises

error because a "floating" Promise is one that is created without any code set up to handle any errors it might throw. Floating Promises can cause several issues, such as improperly sequenced operations, ignored Promise rejections, and more.

Link

no-async-promise-executor

error because it allows to detect potential problems related to the use of asynchronous functions in promise constructors.

Link

no-await-in-loop

error because the program is not taking full advantage of the parallelization benefits of async/await.

Link

no-promise-executor-return

error because returning a value from an executor function is a possible error because the returned value cannot be used and it doesn’t affect the promise in any way

link

no-return-await

error prevent a likely common performance hazard due to a lack of understanding of the semantics

Link

@typescript-eslint/await-thenable

error because using await on an object that is not a promise can lead to unexpected behavior and runtime errors.

Link

@typescript-eslint/no-misused-promises

error because improper use of promises can lead to problems such as memory leaks, runtime errors, and unexpected behavior.

Link

@typescript-eslint/promise-function-async

error because require any function or method that returns a Promise to be marked async

Link

2.0.0-beta.2

3 months ago

2.0.0-beta.1

3 months ago

2.0.0-beta.4

3 months ago

2.0.0

3 months ago

2.0.0-beta.3

3 months ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.0

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago