Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

switch to eslint #90

Merged
merged 3 commits into from
Sep 2, 2020
Merged

switch to eslint #90

merged 3 commits into from
Sep 2, 2020

Conversation

Josh-Schifter
Copy link
Contributor

@Josh-Schifter Josh-Schifter commented Aug 31, 2020

Enable eslint for frontend-sample-showcase

For the most part, changes to conform code to the default eslint rules from @bentley/build-tools were simple and make this code better. The following notes point out situations where I made some compromises:

  • I disabled the rule deprecation/deprecation
  • I fixed lots of unbound statics based on the @typescript-eslint/unbound-method rule
    • Ex. setup: HeatmapDecoratorApp.setup.bind(HeatmapDecoratorApp),
    • In hindsight, I think this is not an improvement. Readability seems worse.
    • Also seems unintended since since ignoreStatic is set in @bentley/build-tools
  • I expanded allowed function naming via @typescript-eslint/naming-convention
    • this is only for tsx file
    • the default rule conflicts with the usual convention for react function components
    • hoping to hear back from UI devs about a better approach
  • I setup ignore for all .d.ts files.
    • If I don't ignore I get this error
      • Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
    • Seems ok since these are generated

@Josh-Schifter Josh-Schifter changed the title switch to eslint and fix the majority of new issues. switch to eslint Aug 31, 2020
@Josh-Schifter Josh-Schifter marked this pull request as ready for review August 31, 2020 18:27
@Josh-Schifter Josh-Schifter merged commit 2e6a3c6 into master Sep 2, 2020
@Josh-Schifter Josh-Schifter deleted the eslint branch September 2, 2020 12:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants