keymanapp / keymanapp/keyman

bug(developer): eslint fails

Open
#8,832 5 comments 0 reactions 1 assignee Claimed by @srl295 View on GitHub
bug developer/ epic-ldml
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

Symptom:

- eslint failure in many files:

```
Parsing error: Cannot read file 'KEYMAN_ROOT/tsconfig.json'.
```

- `npx eslint` by itself doesnt work

```
~/src/keymanapp/keyman$ npx eslint /Users/srl295/src/keymanapp/keyman/developer/src/kmc-ldml/src/compiler/vars.ts

/Users/srl295/src/keymanapp/keyman/developer/src/kmc-ldml/src/compiler/vars.ts
0:0 error Parsing error: Cannot read file '/users/srl295/src/keymanapp/keyman/tsconfig.json'

✖ 1 problem (1 error, 0 warnings)
```

- `developer/src/kmc-ldml/.eslintrc.cjs` has:

```js
module.exports = {
parserOptions: {
project: ["./tsconfig.json", "./test/tsconfig.json"],
},
```

For some reason, eslint thinks that those project entries are relative to the top level dir.

Changing it to `project: ["tsconfig.json", "test/tsconfig.json"],` _seems_ to improve things for the command line or for `tsc -b` but not for eslint within vscode.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.