Skip to content
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

feat: add eslint & eslint-plugin-compat #54

Merged
merged 3 commits into from
May 15, 2024

Conversation

andrewdoro
Copy link
Contributor

Description of the change

This PR adds eslint configuration for fixing browser compatibility errors.
However this doesn't detect array methods such as toSorted #53 amilajack/eslint-plugin-compat#258 (comment). I've also tried to add https://github.com/azu/eslint-plugin-typescript-compat for detecting the methods. But no luck. 😩

  • Add eslint config for the project
  • Add eslint-plugin-compat for browser compatibilities
  • Add to package.json
 "browserslist": [
    "chrome 64",
    "edge 79",
    "firefox 67",
    "opera 51",
    "safari 12"
  ]

I've disabled the recommended rules as there quite a lot of error and we can tackle them in another PR.
Screenshot 2024-02-28 at 17 09 56

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

#52

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

package.json Outdated Show resolved Hide resolved
Copy link
Member

@loganvolkers loganvolkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure this is run with other tests and GitHub actions (see note on package.json)

Co-authored-by: Logan Volkers <[email protected]>
Copy link
Member

@loganvolkers loganvolkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@loganvolkers loganvolkers merged commit 4bd5fce into saasquatch:main May 15, 2024
1 check passed
@andrewdoro andrewdoro deleted the browser-compatibility-eslint branch May 15, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants