6.102
6.102 — Software Construction
Spring 2024

Problem Set 2 Erratum

You may ignore lint errors for the rule @typescript-eslint/no-base-to-string

For example, you can ignore:

error  'myRegionSet' will evaluate to '[object Object]' when stringified  @typescript-eslint/no-base-to-string

Caesar’s checkstyle feedback will not use this rule.

Disabling @typescript-eslint/no-base-to-string

If you don’t want to see this error when you npm run lint, you can apply a patch to your problem set.

Summary

Run the following command from a clean Problem Set 2 working directory:

curl https://web.mit.edu/6.102/www/sp24/psets/ps2/update-eslintrc.patch | git apply --index

Step-by-step instructions

  1. cd to your ps2 working directory.

  2. Make sure your working directory is clean:

    $ git status
    On branch main
    Your branch is up to date with 'origin/main'.
    nothing to commit, working tree clean
    
  3. Download and apply the patch:

    $ curl https://web.mit.edu/6.102/www/sp24/psets/ps2/update-eslintrc.patch | git apply --index
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   695  100   695    0     0  15161      0 --:--:-- --:--:-- --:--:-- 15444
    
  4. See that it changed the hidden ESLint configuration file:

    $ git status
    On branch main
    Your branch is up to date with 'origin/main'.
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            modified:   .eslintrc.yaml
    
  5. Commit the change:

    $ git commit -m 'Disable TS ESLint no-base-to-string rule'
    [main abc1234] Disable TS ESLint no-base-to-string rule
     1 file changed, 1 insertion(+)