-
Notifications
You must be signed in to change notification settings - Fork 0
add preview option #24
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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e24ae26
add preview option
naheel0 9640d93
Initial plan
Copilot 8900d55
Merge pull request #25 from BeyteFlow/copilot/sub-pr-24
naheel0 5651eed
Initial plan
Copilot f949eed
Fix setState in useEffect warning by removing mounted state
Copilot ebcd52f
Merge pull request #26 from BeyteFlow/copilot/sub-pr-24-again
naheel0 67b9f1e
Initial plan
Copilot 0611bab
Add rehype-sanitize and error handling to MarkdownPreview
Copilot 2f7dd53
Merge pull request #27 from BeyteFlow/copilot/sub-pr-24-another-one
naheel0 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 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,33 @@ | ||
| name: autofix.ci | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [ "main" ] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| autofix: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 'lts/*' | ||
| cache: 'npm' | ||
|
|
||
| - run: npm ci | ||
|
|
||
| - name: Run fixes | ||
| run: | | ||
| # --ignore-unknown stops it from crashing on things like favicon.svg | ||
| npx prettier --write "src/**/*.{ts,tsx,js,jsx,json,css,md}" "public/**/*" "*.{js,ts,json,md}" --ignore-unknown | ||
|
|
||
| # ESLint targets your source code logic | ||
| npx eslint src --ext .ts,.tsx --fix | ||
|
|
||
| - uses: autofix-ci/action@v1 | ||
| if: always() | ||
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,5 @@ | ||
| .github/ | ||
| node_modules/ | ||
| dist/ | ||
| build/ | ||
| *.lock |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
🧩 Analysis chain
🌐 Web query:
ESLint v9 --ext flag removed migration guide💡 Result:
Why
--ext“disappeared” in ESLint v9With flat config (
eslint.config.js, default in v9), ESLint originally rejected--ext(you’d see “Invalid option '--ext' … you’re using eslint.config.js”). (github.com)The intended replacement was to use
filesglobs in your flat config. (npmjs.com)Migration (recommended): replace
--extwithfilesineslint.config.jsIf you previously had something like:
npx eslint --ext .ts,.tsx .Remove
--extand add a “selector” object near the top ofeslint.config.js:Then run:
npx eslint .This is the approach documented by the ESLint config migrator (
@eslint/migrate-config). (npmjs.com)If you must use
--extfrom the CLI (no config file)ESLint v9.21.0 reintroduced
--extspecifically to support linting arbitrary extensions without a config file, shown together with--no-config-lookup. (eslint.org)Example:
(eslint.org)
Citations:
🏁 Script executed:
Repository: BeyteFlow/ReadmeGenAI
Length of output: 99
🏁 Script executed:
Repository: BeyteFlow/ReadmeGenAI
Length of output: 84
🏁 Script executed:
Repository: BeyteFlow/ReadmeGenAI
Length of output: 341
🏁 Script executed:
Repository: BeyteFlow/ReadmeGenAI
Length of output: 529
Use glob pattern instead of deprecated
--extflag.ESLint v9 initially removed the
--extflag with flat config support. While the flag was reintroduced in v9.21.0, since the version is unpinned (^9), using an explicit glob pattern ensures compatibility across all v9 versions and is the recommended approach with flat config.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents