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

chore: add root tsconfig #2109

Merged
merged 1 commit into from
Oct 2, 2023
Merged

chore: add root tsconfig #2109

merged 1 commit into from
Oct 2, 2023

Conversation

wemeetagain
Copy link
Member

Description

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@wemeetagain wemeetagain requested a review from a team as a code owner October 2, 2023 21:51
Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@maschad maschad merged commit c88de8e into master Oct 2, 2023
17 checks passed
@maschad maschad deleted the feat/root-tsconfig branch October 2, 2023 22:25
@achingbrain
Copy link
Member

achingbrain commented Oct 4, 2023

This is the wrong solution.

  • The VSCode eslint plugin is now loading config from the root of the repo, this means any per-package linting config is ignored (not that we should have any, but still - the vscode plugin potentially applies different rules to aegir lint which is chaos).
  • It only lints /packages/**/*.ts, this ignores the examples and the multidim tests.

The proper solution is to add "project": true to eslintConfig.parseOptions in each package.json - this will cause the eslint plugin to search for the closest tsconfig.json to the file being linted instead of using a global one in the root of the project.

Refs:

achingbrain added a commit that referenced this pull request Oct 4, 2023
The project field causes eslint to look up the closest tsconfig.json
when linting ts files instead of always going to the root of the
project to find it.

Reverts #2109
Fixes #2095
@achingbrain
Copy link
Member

See: #2122

wemeetagain pushed a commit that referenced this pull request Oct 4, 2023
The project field causes eslint to look up the closest tsconfig.json
when linting ts files instead of always going to the root of the
project to find it.

Reverts #2109
Fixes #2095
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

Successfully merging this pull request may close these issues.

Linting support in vscode
3 participants