bunshi icon indicating copy to clipboard operation
bunshi copied to clipboard

feat: add eslint & eslint-plugin-compat

Open andrewdoro opened this issue 11 months ago • 0 comments

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 https://github.com/amilajack/eslint-plugin-compat/issues/258#issue-485635549. 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)
  • [X] Documentation or Development tools (readme, specs, tests, code formatting)

Links

#52

Checklists

Development

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

Paperwork

  • [X] 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

andrewdoro avatar Feb 28 '24 15:02 andrewdoro