Skip to content

chore: Upgrade to eslint9 #733

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

Closed
wants to merge 7 commits into from
Closed

Conversation

bingenito
Copy link
Member

  • Introduced ESLint9 configuration file with rules and license header enforcement.
  • Added license header to missing files via lint:fix
  • Configured ESLint to ignore specific directories and files, including build artifacts and configuration files.

@Copilot Copilot AI review requested due to automatic review settings May 2, 2025 13:25
@bingenito bingenito requested a review from a team as a code owner May 2, 2025 13:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the ESLint configuration to ESLint9, enforces license headers across the codebase, and configures ESLint to ignore build artifacts and non-essential files. Key changes include the introduction of a new ESLint configuration file (eslint.config.mjs), the addition of license headers to several source and test files, and minor refactoring for improved clarity.

Reviewed Changes

Copilot reviewed 10 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/desktopjs/vite.config.ts Added license header to the Vite configuration file
packages/desktopjs/tests/setup.ts Added license header to the test setup file
packages/desktopjs-openfin/vite.config.ts Added license header to the OpenFin Vite configuration file
packages/desktopjs-openfin/tests/openfin.spec.ts Minor type refinements in event listener parameter definitions
packages/desktopjs-openfin/src/openfin.ts Refactored getState to use an explicit if/else block
packages/desktopjs-electron/vite.config.ts Added license header to the Electron Vite configuration file
packages/desktopjs-electron/tests/setup.ts Added license header to the Electron test setup file
eslint.config.mjs New ESLint configuration with license header enforcement
README.md Updated documentation with linting instructions
Files not reviewed (3)
  • .eslintrc.json: Language not supported
  • package.json: Language not supported
  • tsconfig.test.json: Language not supported
Comments suppressed due to low confidence (1)

eslint.config.mjs:17

  • Confirm that the LICENSE_HEADER array accurately reflects the required Apache License 2.0 header; consider referencing an external license file if the header text might evolve over time.
const LICENSE_HEADER = [

@@ -166,7 +166,12 @@ export class OpenFinContainerWindow extends ContainerWindow {

public getState(): Promise<any> {
return new Promise<any>(resolve => {
(this.nativeWindow && (<any>this.nativeWindow).getState) ? resolve((<any>this.nativeWindow).getState()) : resolve(undefined);
// Use explicit if/else instead of ternary for side-effect
if (this.nativeWindow && (<any>this.nativeWindow).getState) {
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

[nitpick] The explicit if/else block improves clarity compared to the condensed ternary operator; ensure this change aligns with the project's coding style and consider adding an inline comment to explain its purpose if necessary.

Copilot uses AI. Check for mistakes.

@bingenito bingenito closed this May 2, 2025
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.

1 participant