Open FuDesign2008 opened 2 years ago
Using an absolute path for parserOptions.project
in .eslintrc.js
seems to be a workaround?
const path = require('path')
module.exports = {
extends: 'standard-with-typescript',
parserOptions: {
project: path.join(__dirname, '/tsconfig.json')
}
}
Information
VIM version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 24 2021 06:02:32) macOS version - arm64 Included patches: 1-3455 Compiled by Homebrew
Operating System: macOS version - arm64
What went wrong
When using ale + eslint (installed by pnpm), ale will report error
Reproducing the bug
Sample Project
git clone https://github.com/FuDesign2008/ale-eslint-bug-sample.git
cd ale-eslint-bug-sample/src
gvim ./test.tsx
:ALEInfoToFile temp.txt
Those steps can not reproduce the bug, but can reproduce command like https://github.com/FuDesign2008/ale-eslint-bug-sample/blob/main/temp.txt#L80
:ALEInfo in the project that will cause error
Not Good Solution
I made a fix (see https://github.com/FuDesign2008/ale/pull/1/files ) in my forked ale.
It works, but I think it is not a good solution:
./node_modules/.pnpm/eslint@8.17.0
is not listed ins:executables
(https://github.com/dense-analysis/ale/blob/f10349b48b173d50b523ce009934bb4bfba04f7f/autoload/ale/handlers/eslint.vim#L4 ), How it comes ?Look forward to a good solution.