Skip to content

Add rules for react and jsx #6

@alexander-schranz

Description

@alexander-schranz

We should also create rules for react and jsx.

This can be simple done by creating a react/index.js

In a react project this can be used the following way:

{
    "root": true,
    "extends": [
        "eslint-config-ma",
        "eslint-config-ma/react"
    ],
    "parser": "babel-eslint",
    "plugins": [
        "react"
    ]
}

The configuration should extend from the react recommended which should be added as peerDependency, should be something like:

// react/index.js

module.exports = {
    "env": {
        "browser": true,
        "node": false,
        "es6": true
    },
    "extends": "plugin:react/recommended",
    "rules": {
         // Add rules here
    }
}

maybe orientate here by the sulu eslint rules for react and jsx https://github.com/sulu/sulu/blob/develop/.eslintrc.json#L105-L180

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions