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

coc-eslint and workspace #150

Open
kalloc opened this issue Jan 9, 2025 · 0 comments
Open

coc-eslint and workspace #150

kalloc opened this issue Jan 9, 2025 · 0 comments

Comments

@kalloc
Copy link

kalloc commented Jan 9, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant