Skip to content

Extension continually restarts when running Next.js dev server #149

Open
@tommy-mitchell

Description

It seems that the longer I run the Next.js dev server, the slower the xo extension gets (when using codeActionsOnSave, at least). Eventually, the extension crashes on every save:

xo-next-crash.mp4

My configs are:

// settings.json
{
  "xo.enable": true,
  "xo.format.enable": true,
  "xo.overrideSeverity": "warn",
  "xo.debounce": 300,
  "[javascript][javascriptreact][typescript][typescriptreact]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "dprint.dprint",
    "editor.codeActionsOnSave": {
      "source.fixAll.xo": "explicit",
    },
  },
  "files.exclude": {
    "**/.next": true,
  },
}
// xo.config.js
import * as configs from "@tommy-mitchell/eslint-config-xo";

export default [
  { ignores: [".next/**", ".yarn/**"] },
  ...configs.xo,
  ...configs.react,
  ...configs.next,
  ...configs.tailwind,
  ...configs.dprint,
  {
    rules: {
      "n/prefer-global/process": "off",
    },
  },
];

I used DEBUG=* npx xo to confirm that only my files are being linted (e.g. ignores node_modules/, .next/, etc). I'm not sure how further to inspect the extension to see why it's stalling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions