Skip to content

Silence help you to improve code-quality, prevent possible errors and follow best practices

License

Notifications You must be signed in to change notification settings

zapolnoch/eslint-config-silence

Repository files navigation

Shh!

workflow status npm npm

Prettier does only focus on formatting rules like comma-style and does nothing to help with code-quality. eslint-config-silence does not regulate code style rules, but focuses on:

  • Prevent possible errors (e.g. no-cond-assign, no-unreachable)

  • Recommends best practices (e.g. no-eval, no-extend-native)

  • Code Smell Detection (e.g. no-duplicated-branches, no-identical-functions)

  • Forces the use of ES6+ features (e.g. no-var, prefer-const, prefer-spread)

  • Warnings you that complexity of the code is exceeded:

"complexity": ["warn", 20],
"max-depth": ["warn", 4],
"max-lines": ["warn", 300],
"max-params": ["warn", 3],

Usage

npm install -D eslint-config-silence

Add this to your .eslintrc file:

{
  "extends": ["eslint-config-silence"]
}

Note: You can also omit the eslint-config-

TypeScript

For TypeScript projects you can also use the additional config:

{
  "extends": ["silence/typescript"]
}

This config includes only extension rules. These rules have the same functionality but also support TypeScript.

Requirements

Node.js >=15. NPM >=7. ESLint >=8.

Who use it?

Badge

[![code style: silence](https://img.shields.io/badge/code_style-silence-000.svg)](https://github.com/zapolnoch/eslint-config-silence)

About

Silence help you to improve code-quality, prevent possible errors and follow best practices

Resources

License

Stars

Watchers

Forks

Packages

No packages published