Skip to content

Set up ESLint #879

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

Closed
tobyzerner opened this issue Mar 20, 2016 · 7 comments
Closed

Set up ESLint #879

tobyzerner opened this issue Mar 20, 2016 · 7 comments

Comments

@tobyzerner
Copy link
Contributor

http://eslint.org/

Need to discuss style rules we want to use.

@tobyzerner
Copy link
Contributor Author

@franzliedke and I discussed and have decided to use the Airbnb preset with as little modification as possible.

@sijad
Copy link
Contributor

sijad commented Oct 16, 2016

isn't https://github.com/airbnb/javascript/blob/master/linters/.eslintrc?
if you still have plan to use airbnb. a few dev dependencies should be added to flarum-gulp tough.

@dav-is
Copy link

dav-is commented Oct 16, 2016

I found this config works well with Flarum:

{
    "extends": "eslint-config-airbnb",
    "rules": {
        "import/no-unresolved": "off",
        "import/no-extraneous-dependencies": "off",
        "import/extensions": ["error", "never"],
        "react/jsx-filename-extension": ["error", { "extensions": [".js"] }],
        "react/react-in-jsx-scope": "off",
        "react/prop-types": "off",
        "react/sort-comp": ["error", {
          order: [
            "/^constructor$/",
            "/^init$/",
            "/^initProps$/",
            "static-methods",
            "/^content$/",
            "/^view$/",
            "/^config$/",
            "everything-else",
            "/^onsubmit$/",
            "/^onerror$/"
          ]
        }]
    },
    "env": {
            "jquery": true,
        "browser": true
        },
    "globals": [
            "app",
            "m"
        ]
}

(Edited)

@sijad
Copy link
Contributor

sijad commented Oct 16, 2016

here's mine: https://github.com/sijad/flarum-ext-links/blob/master/.eslintrc
probably out of date

@sijad
Copy link
Contributor

sijad commented Oct 16, 2016

jsx-filename-extension.md consider #1030

@tobyzerner tobyzerner removed this from the 0.1.0 milestone Jul 22, 2017
@tobyzerner tobyzerner mentioned this issue Apr 13, 2018
20 tasks
@stale
Copy link

stale bot commented Jan 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

@stale stale bot added the stale Issues that have had over 90 days of inactivity label Jan 19, 2020
@franzliedke franzliedke added this to the 0.1 milestone Jan 19, 2020
@stale stale bot removed the stale Issues that have had over 90 days of inactivity label Jan 19, 2020
@franzliedke
Copy link
Contributor

We have decided we want to adopt prettier instead of eslint and will do so as part of (?) the frontend rewrite.

@franzliedke franzliedke removed this from the 0.1 milestone Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants