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

Javascript layer: js2 and flycheck conflict on next-error-function #8078

Closed
lbonn opened this issue Dec 30, 2016 · 2 comments
Closed

Javascript layer: js2 and flycheck conflict on next-error-function #8078

lbonn opened this issue Dec 30, 2016 · 2 comments
Labels

Comments

@lbonn
Copy link

lbonn commented Dec 30, 2016

Description :octocat:

I'd like to delegate syntax checking to flycheck in javascript mode.

When the layer is enabled, js2 conflicts with flycheck and makes it hard to cycle through errors.
This happens even if js2 is configured to silence its warnings (js2-mode-show-parse-errors and js2-mode-show-strict-warnings set to nil).

Apparently, in my setup, js2 sets next-error-function after flycheck. So, this works for me (in dotspacemacs/user-config):

(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)
(add-hook 'js2-init-hook
          '(lambda ()
              (setq next-error-function 'flycheck-next-error)
              )
          )

I've been trying spacemacs (and emacs) for about a week, so I don't know if this should go into the javascript layer like this...

Reproduction guide 🪲

  • Start Emacs
  • Disable js2 errors
  • Open a javascript file with errors
  • Look at spacemacs/goto-flycheck-error-list
  • Try to cycle with ]q

Observed behaviour: 👀 💔

The error jumps do not match with the flycheck list.

Expected behaviour: ❤️ 😄

spacemacs/next-error should use flycheck-next-error.

System Info 💻

  • OS: gnu/linux
  • Emacs: 25.1.1
  • Spacemacs: 0.200.5
  • Spacemacs branch: nil (rev. 664ba6a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: hybrid
  • Completion: helm
  • Layers:
(helm auto-completion better-defaults git
      (shell :variables shell-default-height 30 shell-default-position 'bottom)
      (spell-checking :variables spell-checking-enable-by-default nil)
      syntax-checking version-control org evil-commentary evil-snipe vinegar c-c++ emacs-lisp haskell html javascript markdown python yaml)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
picandocodigo added a commit to CultivateHQ/cultivate_shared_config that referenced this issue Dec 1, 2017
picandocodigo added a commit to CultivateHQ/cultivate_shared_config that referenced this issue Mar 27, 2018
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 21, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 21, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 21, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 21, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 22, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 25, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 26, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 26, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 27, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Apr 29, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue May 1, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue May 7, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue May 13, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue May 13, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue May 28, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 8, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 13, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 24, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 24, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 24, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jun 26, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 1, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 11, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 11, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 22, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 22, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 23, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 25, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078
thanhvg added a commit to thanhvg/spacemacs that referenced this issue Jul 25, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078

Co-Authored-By: duianto <otnaiud@gmail.com>
duianto added a commit that referenced this issue Jul 26, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at #8078

Co-Authored-By: duianto <otnaiud@gmail.com>
@duianto
Copy link
Collaborator

duianto commented Jul 26, 2019

The following PR is now on the develop branch:
javascript, typescript and react layers: linter option, next-error-function fix #12207

4n86rakam1 added a commit to 4n86rakam1/dotfiles that referenced this issue Sep 16, 2019
stephanschubert pushed a commit to stephanschubert/spacemacs that referenced this issue Oct 23, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078

Co-Authored-By: duianto <otnaiud@gmail.com>
sei40kr pushed a commit to sei40kr/spacemacs that referenced this issue Nov 11, 2019
this PR does two things for js-related layers:

(i) add option to disable lsp linter
javascript-lsp-linter for javascript and react layers
typescript-lsp-linter for typescript layer
when the value is t, lsp linter will be used in the layer
when nil, let flycheck pick up the best linters available such
as eslint

(ii) when syntax-checking(flycheck) layer is installed, then set
next-error-function value in react and javascript layers to nil, so that
spacemacs next-error, previous-error work A desciption of this issue can be
found at syl20bnr#8078

Co-Authored-By: duianto <otnaiud@gmail.com>
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants