GithubHelp home page GithubHelp logo

irfanahmadin / eslint-plugin-sonarjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sonarsource/eslint-plugin-sonarjs

0.0 0.0 0.0 259 KB

SonarJS rules for ESLint

License: GNU Lesser General Public License v3.0

TypeScript 97.70% Shell 0.32% JavaScript 1.98%

eslint-plugin-sonarjs's Introduction

eslint-plugin-sonarjs npm version Build Status Quality Gate Coverage

SonarJS rules for ESLint to detect bugs and suspicious patterns in your code.

We also have a plugin for TSLint

Rules

Bug Detection ๐Ÿ›

Rules in this category aim to find places in code which have a high chance of being bugs, i.e. don't work as intended.

Code Smell Detection ๐Ÿท

Code Smells, or maintainability issues, are raised for places of code which might be costly to change in the future. These rules also help to keep the high code quality and readability. And finally some rules report issues on different suspicious code patters.

Prerequisites

Node.js (>=6.x).

Usage

  • If you don't have ESLint yet configured for your project, follow these instructions.
  • Install eslint-plugin-sonarjs using npm (or yarn) for you project or globally:
npm install eslint-plugin-sonarjs --save-dev # install for your project
npm install eslint-plugin-sonarjs -g         # or install globally
  • Add eslint-plugin-sonarjs to the plugins option of your .eslintrc:
{
  "plugins": ["sonarjs"]
}
  • Add plugin:sonarjs/recommended to the extends option to enable all recommended rules:
{
  "extends": ["plugin:sonarjs/recommended"]
}
  • or enable only some rules manually:
{
  "rules": {
    "sonarjs/cognitive-complexity": "error",
    "sonarjs/no-identical-expressions": "error"
    // etc
  }
}

Contributing

You want to participate in the development of the project? Have a look at our contributing guide!

eslint-plugin-sonarjs's People

Contributors

andrea-guarino-sonarsource avatar vilchik-elena avatar stas-vilchik avatar ferhatelmas avatar brettz9 avatar yassin-kammoun-sonarsource avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.