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

bug: Issues with using ESLint. #612

Open
2 tasks done
alex-belost opened this issue Dec 30, 2024 · 2 comments
Open
2 tasks done

bug: Issues with using ESLint. #612

alex-belost opened this issue Dec 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alex-belost
Copy link

Neovim version (nvim -v)

NVIM v0.10.2 Build type: Release LuaJIT 2.1.1731601260

Operating system/version

macOS Sequoia 15.1.1 (24B91)

Read debugging tips

Add the debug logs

  • I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.

Log file

Log file: /Users/user_name.local/state/LazyVim/conform.log
2024-12-30 10:36:25[WARN] Formatters unavailable for /Users/user_name/Projects/application/core/web/src/app/modules/billing/subscription/details/details.component.ts
2024-12-30 10:36:27[WARN] Formatters unavailable for /Users/user_name/Projects/application/core/web/src/app/modules/billing/subscription/details/details.component.ts
2024-12-30 10:36:27[WARN] Formatters unavailable for /Users/user_name/Projects/application/core/web/src/app/modules/billing/subscription/details/details.component.ts
2024-12-30 10:40:24[WARN] Formatters unavailable for /Users/user_name/.config/LazyVim/lua/plugins/conform.lua
2024-12-30 10:45:47[WARN] Formatters unavailable for /Users/user_name/Projects/application/core/web/src/app/modules/billing/subscription/details/details.component.ts
2024-12-30 10:45:47[WARN] Formatters unavailable for /Users/user_name/Projects/application/core/web/src/app/modules/billing/subscription/details/details.component.ts

Formatters for this buffer:
LSP: eslint, vtsls, null-ls
eslint error: Unknown formatter. Formatter config missing or incomplete
prettier ready (html, typescript) /Users/user_name/Projects/application/core/node_modules/.bin/prettier

Other formatters:
fish_indent unavailable: Command not found
shfmt ready (sh) /Users/user_name/.local/share/LazyVim/mason/bin/shfmt
stylua ready (lua) /Users/user_name/.local/share/LazyVim/mason/bin/stylua

Describe the bug

There is an issue with Conform and ESLint. The language server works correctly, validating errors, etc., but when I add it to Conform as a formatter, it doesn’t work and throws an error.

ESLint is installed both locally and globally.
I checked its presence in node_modules.
It was installed via LazyExtras.
Installed the latest, clean LazyVim package

What is the severity of this bug?

breaking (some functionality is broken)

Steps To Reproduce

  1. Install a clean LazyVim package
  2. Install a clean Angular project
  3. Install all necessary dependency
  4. Setup eslint as a formatter in conform config

Expected Behavior

You can use ESLint for formatting with Conform

Minimal example file

No response

Minimal init.lua

-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

Additional context

No response

@alex-belost alex-belost added the bug Something isn't working label Dec 30, 2024
@ro0gr
Copy link
Contributor

ro0gr commented Dec 30, 2024

eslint error: Unknown formatter. Formatter config missing or incomplete

This is supposed to happen when a formatter fails to initialize for some reason.

Setup eslint as a formatter in conform config

Can you share your whole eslint formatter setup please?

@alex-belost
Copy link
Author

Completely clean installation of the LazyVim package with LazyExtras linting.eslint enabled.
I want to confirm that ESLint linting works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants