-
Notifications
You must be signed in to change notification settings - Fork 327
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
Changes from all commits
2fee85e
e1a83ab
c7f8c59
853c1f4
0db1007
431cd8c
96a1ea3
d4d6407
9fa775a
654f654
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm run test -- --coverage | ||
|
||
style: | ||
name: Style | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Style | ||
run: npm run format:check | ||
|
||
- name: Link | ||
run: npm run lint |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||||||||||||||||
import js from "@eslint/js"; | ||||||||||||||||||||
import globals from "globals"; | ||||||||||||||||||||
import tseslint from "typescript-eslint"; | ||||||||||||||||||||
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 commentThe 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
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||
tseslint.configs.recommended, | ||||||||||||||||||||
]); | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
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.
Copilot uses AI. Check for mistakes.