Update linter configuration

Description

Linter configuration should be updated to avoid common issues found during code reviews.

Extend ESLinter configuration with:

  • "eslint:recommended", "plugin:jest/recommended", "plugin:cypress/recommended"

Add the following ESLint rules:

  • "eol-last": ["error", "always"]

  • "object-curly-spacing": [2, "always"]

  • "object-shorthand": ["error", "always"]

Refactor existing files to make sure all rules are followed and there are no linter errors.

Activity

Rafał Stencel 
August 2, 2022 at 10:49 AM

I have created MR with proposed changes. In the first commit I added the rules mentioned in the ticket description. In the second commit I extended ESLint configuration with eslint:recommended - we can skip this commit if you find these changes dangerous. In the last commit I made ESLint ignore translations, __tests__ and cypress directories.

Nyoman Ribeka 
July 13, 2022 at 2:48 PM

I like adding the rules. We just need to make sure that this changes happen fast to prevent a lot of conflicts

Rafał Stencel 
June 14, 2022 at 8:02 AM
(edited)

feel free to discuss other useful rules in the comments below. Please note that the recommended ESLint configuration for a Next.js project is already used due to eslint-plugin-next being the Catalog’s dependency.

Unresolved

Details

Assignee

Reporter

Original estimate

Time tracking

4h logged

Sprint

Priority

Created June 14, 2022 at 8:00 AM
Updated April 30, 2024 at 5:53 PM