eBay / eslint-config-ebay

MIT License
13 stars 11 forks source link

Deprecate this package in favor of eslint:recommended #18

Open austingardner opened 2 years ago

austingardner commented 2 years ago

It seems this repo hasn't had many updates for a long time. Should we keep it or should we just use a different set of rules?

At least we should upgrade the eslint version and set

"parserOptions": {
        "ecmaVersion": "latest"
}

So we can use the latest ecmascript versions.

giovannipds commented 5 months ago

Your question makes sense, I have seen this kind of configuration in viewitem_nodestar, which does some useful stuff, like extending and overwriting:

{
    "extends": [
        "ebay",
        "plugin:testing-library/recommended",
        "plugin:jest/recommended"
    ],
    "parserOptions": {
        "ecmaVersion": 2020, // eslint-config-ebay uses 2017 which has this issue - https://github.com/eBay/eslint-config-ebay/issues/13
        "sourceType": "module" // To accommodate ES module imports
    },
    "overrides": [
        {
            "files": "**/test/**/*.browser.js",
            "extends": ["plugin:jest-dom/recommended"] // We want jest-dom recommended styles only for browser tests as some of the jest-dom helpers are not available in server tests.
        },
        {
            "files": "**/test/mock-data/**/*.js", // Disable few rules for mock data
            "rules" : {
                "max-len": "off"
            }
        }
    ],
    "globals": {
        "GH": "readonly"
    }
}

IMHO we should apply on top of this project community recommendations.