Skip to content

Linting #143

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Linting #143

wants to merge 10 commits into from

Conversation

destinio
Copy link

No description provided.

* coverig
:
:

* adding badge
* coverig
:
:

* adding badge
* adding formatter to ci

* adding new job

* adding new job
@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 12:26
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 sets up linting, formatting, and testing infrastructure for the project. It adds comprehensive tooling for code quality and introduces CI/CD pipeline configuration.

  • Adds ESLint and Prettier for code linting and formatting
  • Introduces Vitest testing framework with comprehensive API key authentication tests
  • Sets up GitHub Actions workflow for automated testing and style checks

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/api/tests/auth.test.ts Comprehensive test suite for getAPIKey function with edge cases
package.json Adds dev dependencies for testing, linting, and formatting tools with new npm scripts
eslint.config.ts ESLint configuration with TypeScript support
README.md Adds CI badge and attribution
.github/workflows/ci.yml GitHub Actions workflow for tests and style checks

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended,
]);
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

The import path 'eslint/config' is incorrect. ESLint 9.x uses 'eslint' as the package name and the defineConfig function should be imported from the main 'eslint' package or removed entirely as it's not required for basic configuration.

Suggested change
]);
export default [
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended,
];

Copilot uses AI. Check for mistakes.

import { defineConfig } from "eslint/config";

export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

The configuration syntax is incorrect for ESLint 9.x flat config. The 'extends' property should be replaced with spreading the recommended config directly, and 'plugins' registration is not needed when using the recommended config.

Suggested change
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
{
...js.configs.recommended,
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
...(js.configs.recommended.languageOptions ?? {}),
globals: globals.browser,
},
},

Copilot uses AI. Check for mistakes.

- name: Style
run: npm run format:check

- name: Link
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

The step name 'Link' should be 'Lint' to match the actual linting action being performed.

Suggested change
- name: Link
- name: Lint

Copilot uses AI. Check for mistakes.

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