-
Notifications
You must be signed in to change notification settings - Fork 323
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
base: main
Are you sure you want to change the base?
Linting #143
Conversation
adding ci
* adding formatter to ci * adding new job * adding new job
There was a problem hiding this 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, | ||
]); |
There was a problem hiding this comment.
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.
]); | |
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 } }, |
There was a problem hiding this comment.
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.
{ 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 |
There was a problem hiding this comment.
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.
- name: Link | |
- name: Lint |
Copilot uses AI. Check for mistakes.
No description provided.