thefrontside / frontmacs

Package-based, web-centric, customizable, awesome-by-default, acceptance-tested Emacs distribution
MIT License
500 stars 22 forks source link

fixes a bug where flycheck was not showing some warnings for .tsx #157

Closed LionyxML closed 2 years ago

LionyxML commented 2 years ago

Full bug discussion here: https://github.com/thefrontside/frontmacs/issues/156

Motivation

When developing inside .tsx files, we had missing warnings from flycheck due from some disabling, it looked like we could only (manually) have ts-tide or javascript eslint, not both enabled.

Approach

Inside frontside-javascript--tsx-web-mode-hook function we now disable all checkers and then add both 'tsx-tide 'javascript-eslint.

Alternate Designs

I am not sure how to do it another way, but this line might be optional: (setq flycheck-disabled-checkers nil)

cowboyd commented 2 years ago

Writing a test for this proved to be exceedingly difficult because it requires a full yarn install to work, so I just went ahead and merged. Also I found that we don't have to do this in a hook, we can do it once when we initially setup.