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

Enable eslint for commonjs #33575

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Enable eslint for commonjs #33575

merged 3 commits into from
Feb 12, 2025

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Feb 12, 2025

  1. .eslintrc.cjs was not being linted because that file extension was missing in ESLINT_FILES, added it.
  2. Because we are using parserOptions.project for typescript-eslint, all linted files must be included in tsconfig's include list, but * globs there exclude dotfiles (see Option in TSConfig to include hidden/dot files microsoft/TypeScript#49555 for related discussion regarding dotfiles).
  3. Finally, make use of ${configDir} option to make typescript always look up those file paths relative to the configuration file, which is good practice to avoid any ambiguity when typescript resolves these paths.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 12, 2025
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 12, 2025
@silverwind silverwind added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Feb 12, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 12, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 12, 2025
@techknowlogick techknowlogick enabled auto-merge (squash) February 12, 2025 22:22
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 12, 2025
@techknowlogick techknowlogick merged commit 3e39583 into go-gitea:main Feb 12, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 12, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 12, 2025
@silverwind silverwind deleted the cjs branch February 13, 2025 01:31
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 13, 2025
* giteaofficial/main:
  Only show the latest version in the Arch index (go-gitea#33262)
  [skip ci] Updated translations via Crowdin
  Enable eslint for commonjs (go-gitea#33575)
  Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (go-gitea#33569)
  Switch to `@vitest/eslint-plugin` (go-gitea#33573)
  Avoid duplicate SetContextValue call (go-gitea#33564)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal size/S Denotes a PR that changes 10-29 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants