Update eslint prettier configuration

Created on 5 June 2024, 22 days ago
Updated 17 June 2024, 11 days ago

Problem/Motivation

The Eslint configuration is set up with only a few rules at the moment. This means it's not catching things like:

  • Comments well over 80 chars
  • Inconsistency in single vs double quotes
  • Inconsistency in lines ending with semi colons
  • Inconsistency in trailing commas

Obviously none of these things are bad and we're still in rapid iteration mode, but to save us pain in the future I think it's worth setting up some rules now.

Steps to reproduce

Review the codebase

Proposed resolution

Add the following to eslintrc

In extends, add "plugin:prettier/recommended". We already have this installed

Add some basic prettier rules

"prettier/prettier": ["error", {
      "singleQuote": true,
      "trailingComma": "all",
      "arrowParens": "avoid",
    }],

Set max line length and brace-style

"max-len": "error",
    "brace-style": ["error", "stroustrup"]

Alternatively, if we wanted to go even further we could embrace cores eslint, which is even more strict

Remaining tasks

Add changes to MR (Incoming)
Agree on approach
Fix the lint issues introduced as part of this MR
Merge

User interface changes

N/A

API changes

N/A

Data model changes

N/A

๐Ÿ“Œ Task
Status

Needs work

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand DanielVeza Brisbane, AU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024