Skip to content

coc-eslint and workspace  #150

@kalloc

Description

@kalloc

Hi!

Help me to figure out next problem.
I use coc-eslint with configuration (CocLocalConfig):

{
 "eslint.packageManager": "pnpm",
 "eslint.autoFixOnSave": true,
 "eslint.options": {
   "overrideConfigFile": "eslint.config.mjs"
 },
 "eslint.workingDirectories": [
   { "mode": "auto" }
 ],
 "eslint.debug": true,
 "eslint.experimental.useFlatConfig": true
}

and the project structure ~/work/tld/project/{apps,packages}/src/*
where in each apps and packages there is eslint.config.mjs.
The contents of eslint.config.mjs:

import { config } from '@tld/eslint-config';

export default [
  ...config,
  {
    files: ['**/*.ts'],
    languageOptions: {
      parserOptions: {
        project: './tsconfig.json',
      },
    },
  },
];

eslint looks for it in ~/ (have an error Error: Cannot read file '/home/USER/tsconfig.json'.)

Only works if I'm doing cd ~/work/tld/packages/NAME && vim src/to/file.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions