Git Product home page Git Product logo

eslint-plugin-matrix-org's Introduction

eslint-plugin-matrix-org

eslint-plugin-matrix-org contains ESLint rules and configs used by Matrix.org projects. It codifies https://github.com/matrix-org/matrix-react-sdk/blob/develop/code_style.md.

This package contains several main ESLint configs for different project styles:

  • matrix-org/javascript: The style for native JavaScript projects.
  • matrix-org/babel: The style for Babel JavaScript projects. It extends matrix-org/javascript.
  • matrix-org/typescript: The style for TypeScript projects. It extends matrix-org/javascript.

There is also a mixin config that can be used together with any of the above:

  • matrix-org/react: The style for React projects.

Getting started

Add this package as a development dependency:

yarn add eslint-plugin-matrix-org --dev

You can then add any of the following to your ESLint config:

Standard native JavaScript

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/javascript",
    ]
}

Standard Babel JavaScript

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/babel",
    ]
}

Standard TypeScript

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/typescript",
    ]
}

Standard native JavaScript with React

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/javascript",
        "plugin:matrix-org/react",
    ]
}

Standard Babel JavaScript with React

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/babel",
        "plugin:matrix-org/react",
    ]
}

Standard TypeScript with React

{
    plugins: [
        "matrix-org",
    ],
    extends: [
        "plugin:matrix-org/typescript",
        "plugin:matrix-org/react",
    ]
}

This package does not hold any dependencies itself, as it causes conflicts the versions of the same dependencies downstream and also would imply installing the union of all tools. You should expect that you may need to add some of the following depending on the configs you enable:

  • @babel/core
  • @babel/eslint-parser
  • @babel/eslint-plugin
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • eslint
  • eslint-config-google
  • eslint-plugin-react
  • eslint-plugin-react-hooks
  • typescript

eslint-plugin-matrix-org's People

Contributors

dbkr avatar dependabot[bot] avatar gsouquet avatar jorikschellekens avatar jryans avatar palid avatar t3chguy 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.