Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rules for react and jsx #6

Open
alexander-schranz opened this issue Jun 18, 2019 · 0 comments
Open

Add rules for react and jsx #6

alexander-schranz opened this issue Jun 18, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@alexander-schranz
Copy link
Member

alexander-schranz commented Jun 18, 2019

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

@alexander-schranz alexander-schranz added the enhancement New feature or request label Jun 19, 2019
alexander-schranz added a commit to alexander-schranz/eslint-config-ma that referenced this issue Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant