Coder Social home page Coder Social logo

elyby / eslint-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 139 KB

Shareable ESLint config for the Ely.by's projects

License: MIT License

JavaScript 4.59% TypeScript 95.41%
eslint-config eslint-plugin eslint-rules eslint eslintconfig eslint-shareable-configs eslintplugin

eslint-plugin's Introduction

Ely.by ESLint rules

Set of ESLint rules used in development of Ely.by JS projects. Contains rules for pure JS, JSX, ReactJS and TS.

Installation

First of all install Ely.by ESLint plugin and eslint peer dependency via NPM:

npm install @elyby/eslint-plugin eslint --save-dev

Or via yarn:

yarn add -D @elyby/eslint-plugin eslint

Configuration

The configuration is divided into several parts. The base provides only pure js checks. To use it, simply add the plugin:@elyby/base configuration to the extends block:

{
    "extends": [
        "plugin:@elyby/base"
    ]
}

React

The configuration for React requires additional dependencies. Install them first:

# NPM:
npm install eslint-plugin-react eslint-plugin-react-hooks --save-dev
# Yarn:
yarn add -D eslint-plugin-react eslint-plugin-react-hooks

Then add the plugin:@elyby/react configuration to the extends block:

{
    "extends": [
        "plugin:@elyby/base",
        "plugin:@elyby/react"
    ]
}

TypeScript

Configuration for TypeScript also requires additional libraries:

# NPM:
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev
# Yarn:
yarn add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin

Then add the plugin:@elyby/react configuration to the extends block:

{
    "extends": [
        "plugin:@elyby/base",
        "plugin:@elyby/typescript"
    ]
}

You may still wish to override some of our rules, as well as the rest of our eslint configuration settings. For example, you can specify the preferred env for eslint:

{
    "env": {
        "browser": true,
        "es6": true
    }
}

Using our custom fixers

First of all, you must install Ely.by's ESLint plugin as described in the installation chapter. After that you can enable our custom rules with defining our plugin in plugins section:

{
    "plugins": [
        "@elyby"
    ]
}

After that all custom rules will be available for use.

List of supported rules

License

Ely.by ESLint plugin is licensed under the MIT License.

eslint-plugin's People

Contributors

dependabot[bot] avatar erickskrauch avatar

Watchers

 avatar  avatar  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.