-
-
Notifications
You must be signed in to change notification settings - Fork 205
Next #144
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
Merged
Merged
Next #144
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bde0674
chore: update dependencies in package.json for improved performance a…
markteekman 1363822
feat: enhance navigation responsiveness and structure
markteekman 63272be
chore: migrate ESLint configuration to v9+ and remove legacy file
markteekman 448ace5
chore: update ESLint configuration and add astro-eslint-parser depend…
markteekman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| import globals from 'globals' | ||
| import js from '@eslint/js' | ||
| import astro from 'eslint-plugin-astro' | ||
| import jsxA11y from 'eslint-plugin-jsx-a11y' | ||
| import tseslint from '@typescript-eslint/eslint-plugin' | ||
| import tsParser from '@typescript-eslint/parser' | ||
| import astroParser from 'astro-eslint-parser' | ||
|
|
||
| export default [ | ||
| // Ignore patterns | ||
| { | ||
| ignores: [ | ||
| 'dist/**', | ||
| 'node_modules/**', | ||
| '.astro/**', | ||
| '**/*.d.ts', // Ignore generated TypeScript declaration files | ||
| ], | ||
| }, | ||
|
|
||
| // Base configuration for all files | ||
| { | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.node, | ||
| ...globals.browser, | ||
| }, | ||
| ecmaVersion: 'latest', | ||
| sourceType: 'module', | ||
| }, | ||
| }, | ||
|
|
||
| // ESLint recommended rules | ||
| js.configs.recommended, | ||
|
|
||
| // JavaScript files | ||
| { | ||
| files: ['**/*.js'], | ||
| rules: { | ||
| 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], | ||
| }, | ||
| }, | ||
|
|
||
| // Astro files | ||
| { | ||
| files: ['**/*.astro'], | ||
| plugins: { | ||
| astro, | ||
| }, | ||
| languageOptions: { | ||
| parser: astroParser, | ||
| parserOptions: { | ||
| parser: '@typescript-eslint/parser', | ||
| extraFileExtensions: ['.astro'], | ||
| }, | ||
| }, | ||
| rules: { | ||
| ...astro.configs.recommended.rules, | ||
| ...astro.configs['jsx-a11y-strict'].rules, | ||
| 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], | ||
| }, | ||
| }, | ||
|
|
||
| // TypeScript files | ||
| { | ||
| files: ['**/*.ts'], | ||
| plugins: { | ||
| '@typescript-eslint': tseslint, | ||
| }, | ||
| languageOptions: { | ||
| parser: tsParser, | ||
| }, | ||
| rules: { | ||
| ...tseslint.configs.recommended.rules, | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }], | ||
| '@typescript-eslint/no-non-null-assertion': 'off', | ||
| }, | ||
| }, | ||
|
|
||
| // JSX files (React components) | ||
| { | ||
| files: ['**/*.jsx'], | ||
| plugins: { | ||
| 'jsx-a11y': jsxA11y, | ||
| }, | ||
| languageOptions: { | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| }, | ||
| rules: { | ||
| ...jsxA11y.configs.strict.rules, | ||
| }, | ||
| }, | ||
|
|
||
| // TypeScript JSX files (React components) | ||
| { | ||
| files: ['**/*.tsx'], | ||
| plugins: { | ||
| '@typescript-eslint': tseslint, | ||
| 'jsx-a11y': jsxA11y, | ||
| }, | ||
| languageOptions: { | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| }, | ||
| rules: { | ||
| ...tseslint.configs.recommended.rules, | ||
| ...jsxA11y.configs.strict.rules, | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }], | ||
| '@typescript-eslint/no-non-null-assertion': 'off', | ||
| }, | ||
| }, | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Verify Astro configuration handles TypeScript properly.
The Astro configuration already includes TypeScript parsing with
parser: '@typescript-eslint/parser'as a sub-parser. Ensure this setup properly lints TypeScript code within Astro files, making the separate TypeScript-in-Astro configuration (lines 121-129) unnecessary.Run the following script to test the ESLint configuration:
🏁 Script executed:
Length of output: 548
I’ll verify that the config file itself loads and that ESLint is actually picking up
.astrofiles when given the proper flags.🏁 Script executed:
Length of output: 1689
I need to inspect how
astroParseris being imported/defined in your config to pinpoint the missing module. Let’s dump the top ofeslint.config.jsand locateastroParser:🏁 Script executed:
Length of output: 467
Fix missing
astro-eslint-parserdependencyThe ESLint config is importing
astroParserfromastro-eslint-parserbut that package isn’t installed, sorequire('./eslint.config.js')fails with “Cannot find package 'astro-eslint-parser’.” Add or correct the parser package installation and reference:• In eslint.config.js:
import astroParser from 'astro-eslint-parser'parser: astroParser,Recommended fixes:
After this, rerun ESLint on your
.astrofiles to confirm parsing and TypeScript linting work correctly.🤖 Prompt for AI Agents