Skip to content
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

chore(docs): use shared linter config #1458

Merged
merged 1 commit into from
Jan 17, 2025
Merged

chore(docs): use shared linter config #1458

merged 1 commit into from
Jan 17, 2025

Conversation

steebchen
Copy link
Owner

@steebchen steebchen commented Jan 17, 2025

Updated various files in the docs folder to correct inconsistent indentation, formatting, and quotes. This includes changes to vercel.json, _meta.ts, introduction.md, tsconfig.json, analytics.tsx, and pnpm-lock.yaml to ensure consistent coding standards and improved readability.

Summary by CodeRabbit

  • Chores

    • Updated code formatting and consistency across multiple documentation files
    • Added ESLint and Prettier configurations for code quality
    • Standardized import statements and code style
  • Documentation

    • Minor improvements to documentation formatting
    • Updated code block and documentation text escaping
  • Dependencies

    • Added new development dependencies for linting and formatting
    • Updated package scripts for code quality checks

These changes focus on improving code quality and maintaining consistent documentation formatting without introducing new features or functional modifications.

Copy link

coderabbitai bot commented Jan 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request is a comprehensive code formatting and consistency update across the documentation project. The changes primarily involve standardizing code style, such as converting quotes from single to double, adding semicolons, adjusting indentation, and updating import statements. The modifications span multiple files including TypeScript, MDX, configuration files, and CSS, focusing on improving code readability and maintaining a uniform coding style without altering the underlying functionality.

Changes

File/Path Change Summary
docs/app/* Formatting updates: quote conversion, import reordering, semicolon additions
docs/content/**/_meta.ts Consistent object export formatting, semicolon additions
docs/content/docs/*.mdx Quote and formatting adjustments in import and component declarations
docs/eslint.config.js New ESLint configuration export
docs/package.json Added linting and formatting scripts, new dependencies
Configuration files Formatting and quote style consistency updates
docs/index.mdx Formatting adjustments in import statements and JSX structure
docs/content/index.module.css Indentation adjustments for improved readability
docs/content/overrides.css Indentation and line break adjustments for clarity
docs/next-sitemap.config.js Formatting adjustments in string quotes
docs/next.config.mjs Indentation adjustments in nextra configuration
docs/tsconfig.json Whitespace removal and alignment of array elements
docs/vercel.json Reformatting of JSON structure
.editorconfig Updated file patterns to include .yaml files

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af83e17 and 932feaa.

⛔ Files ignored due to path filters (1)
  • docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (26)
  • .editorconfig (1 hunks)
  • docs/app/[[...mdxPath]]/page.tsx (1 hunks)
  • docs/app/analytics.tsx (1 hunks)
  • docs/app/layout.tsx (1 hunks)
  • docs/content/_meta.ts (1 hunks)
  • docs/content/docs/_meta.ts (1 hunks)
  • docs/content/docs/community.mdx (2 hunks)
  • docs/content/docs/getting-started/_meta.ts (1 hunks)
  • docs/content/docs/help.mdx (2 hunks)
  • docs/content/docs/index.mdx (2 hunks)
  • docs/content/docs/reference/_meta.ts (1 hunks)
  • docs/content/docs/reference/deploy/_meta.ts (1 hunks)
  • docs/content/docs/reference/features/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/fields.md (1 hunks)
  • docs/content/docs/walkthrough/introduction.md (1 hunks)
  • docs/content/index.mdx (1 hunks)
  • docs/content/index.module.css (1 hunks)
  • docs/content/overrides.css (1 hunks)
  • docs/eslint.config.js (1 hunks)
  • docs/mdx-components.tsx (1 hunks)
  • docs/next-sitemap.config.js (1 hunks)
  • docs/next.config.mjs (1 hunks)
  • docs/package.json (1 hunks)
  • docs/tsconfig.json (1 hunks)
  • docs/vercel.json (1 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 90061c5 and c61ce4b.

⛔ Files ignored due to path filters (1)
  • docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • docs/app/[[...mdxPath]]/page.tsx (1 hunks)
  • docs/app/analytics.tsx (1 hunks)
  • docs/app/layout.tsx (1 hunks)
  • docs/content/_meta.ts (1 hunks)
  • docs/content/docs/_meta.ts (1 hunks)
  • docs/content/docs/community.mdx (2 hunks)
  • docs/content/docs/getting-started/_meta.ts (1 hunks)
  • docs/content/docs/help.mdx (2 hunks)
  • docs/content/docs/index.mdx (2 hunks)
  • docs/content/docs/reference/_meta.ts (1 hunks)
  • docs/content/docs/reference/deploy/_meta.ts (1 hunks)
  • docs/content/docs/reference/features/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/fields.md (1 hunks)
  • docs/content/docs/walkthrough/introduction.md (1 hunks)
  • docs/content/index.mdx (1 hunks)
  • docs/content/index.module.css (1 hunks)
  • docs/content/overrides.css (1 hunks)
  • docs/eslint.config.js (1 hunks)
  • docs/mdx-components.tsx (1 hunks)
  • docs/next-sitemap.config.js (1 hunks)
  • docs/next.config.mjs (1 hunks)
  • docs/package.json (1 hunks)
  • docs/tsconfig.json (1 hunks)
  • docs/vercel.json (1 hunks)
✅ Files skipped from review due to trivial changes (24)
  • docs/eslint.config.js
  • docs/content/docs/walkthrough/fields.md
  • docs/tsconfig.json
  • docs/content/index.mdx
  • docs/content/docs/getting-started/_meta.ts
  • docs/content/docs/index.mdx
  • docs/next-sitemap.config.js
  • docs/vercel.json
  • docs/content/docs/reference/deploy/_meta.ts
  • docs/next.config.mjs
  • docs/content/docs/community.mdx
  • docs/content/_meta.ts
  • docs/content/docs/reference/features/_meta.ts
  • docs/mdx-components.tsx
  • docs/content/index.module.css
  • docs/app/[[...mdxPath]]/page.tsx
  • docs/content/docs/walkthrough/introduction.md
  • docs/content/overrides.css
  • docs/content/docs/reference/_meta.ts
  • docs/app/analytics.tsx
  • docs/content/docs/walkthrough/_meta.ts
  • docs/content/docs/help.mdx
  • docs/content/docs/_meta.ts
  • docs/app/layout.tsx
🧰 Additional context used
🪛 GitHub Actions: lint all
docs/package.json

[error] 2-30: Wrong indent style found (tabs instead of spaces)

🔇 Additional comments (4)
docs/package.json (4)

7-8: LGTM: Good addition of lint and format scripts.

The addition of standardized lint and format scripts will help maintain consistent code style across the documentation.


11-11: LGTM: Good use of shared Prettier config.

Using a shared Prettier configuration (@steebchen/prettier-config) aligns with the PR's objective of standardizing code style.


21-29: Consider pinning exact versions of development tools.

While you've pinned exact versions for most devDependencies, consider doing the same for all of them to ensure consistent development environments. Also, some versions appear unusually high:

  • TypeScript 5.7.3 (current stable is ~5.3.x)
  • ESLint 9.18.0 (current stable is ~8.x)

Let's verify the available versions:


13-18: Verify package versions - these seem incorrect.

Several dependency versions appear to be future versions that don't exist:

  • Next.js 15.1.5 (current stable is ~14.x)
  • React 19.0.0 (current stable is ~18.x)

Let's verify the available versions:

Comment on lines +2 to +10
"scripts": {
"dev": "next dev --turbopack",
"start": "next start",
"test": "npm run build",
"build": "npx next build && next-sitemap",
"lint": "eslint . && prettier --check .",
"format": "eslint --fix . && prettier --write .",
"postbuild": "pagefind --site .next/server/app --output-path public/_pagefind"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix indentation to use spaces instead of tabs.

The CI pipeline is failing due to the use of tabs for indentation. According to the lint errors, the project standard is to use spaces.

Convert all tabs to spaces in the JSON file to fix the pipeline failure.

🧰 Tools
🪛 GitHub Actions: lint all

[error] 2-30: Wrong indent style found (tabs instead of spaces)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/package.json (1)

2-10: ⚠️ Potential issue

Fix indentation to use spaces instead of tabs.

The indentation still uses tabs instead of spaces, which is causing CI pipeline failures.

Convert all tabs to 2 spaces for consistency with project standards.

🧹 Nitpick comments (1)
docs/package.json (1)

7-8: Consider combining lint and format scripts.

The lint and format scripts could be optimized by running prettier first and then eslint, as eslint can also handle some formatting rules.

-    "lint": "eslint . && prettier --check .",
-    "format": "eslint --fix . && prettier --write .",
+    "lint": "prettier --check . && eslint .",
+    "format": "prettier --write . && eslint --fix ."
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c61ce4b and af83e17.

⛔ Files ignored due to path filters (1)
  • docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (26)
  • .editorconfig (1 hunks)
  • docs/app/[[...mdxPath]]/page.tsx (1 hunks)
  • docs/app/analytics.tsx (1 hunks)
  • docs/app/layout.tsx (1 hunks)
  • docs/content/_meta.ts (1 hunks)
  • docs/content/docs/_meta.ts (1 hunks)
  • docs/content/docs/community.mdx (2 hunks)
  • docs/content/docs/getting-started/_meta.ts (1 hunks)
  • docs/content/docs/help.mdx (2 hunks)
  • docs/content/docs/index.mdx (2 hunks)
  • docs/content/docs/reference/_meta.ts (1 hunks)
  • docs/content/docs/reference/deploy/_meta.ts (1 hunks)
  • docs/content/docs/reference/features/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/_meta.ts (1 hunks)
  • docs/content/docs/walkthrough/fields.md (1 hunks)
  • docs/content/docs/walkthrough/introduction.md (1 hunks)
  • docs/content/index.mdx (1 hunks)
  • docs/content/index.module.css (1 hunks)
  • docs/content/overrides.css (1 hunks)
  • docs/eslint.config.js (1 hunks)
  • docs/mdx-components.tsx (1 hunks)
  • docs/next-sitemap.config.js (1 hunks)
  • docs/next.config.mjs (1 hunks)
  • docs/package.json (1 hunks)
  • docs/tsconfig.json (1 hunks)
  • docs/vercel.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (24)
  • docs/vercel.json
  • docs/content/docs/walkthrough/fields.md
  • docs/eslint.config.js
  • docs/tsconfig.json
  • docs/next-sitemap.config.js
  • docs/content/docs/getting-started/_meta.ts
  • docs/content/docs/walkthrough/introduction.md
  • docs/content/docs/reference/features/_meta.ts
  • docs/content/docs/_meta.ts
  • docs/content/index.mdx
  • docs/mdx-components.tsx
  • docs/next.config.mjs
  • docs/content/docs/reference/_meta.ts
  • docs/content/_meta.ts
  • docs/content/overrides.css
  • docs/content/index.module.css
  • docs/content/docs/index.mdx
  • docs/app/analytics.tsx
  • docs/app/layout.tsx
  • docs/content/docs/reference/deploy/_meta.ts
  • docs/content/docs/help.mdx
  • docs/content/docs/community.mdx
  • docs/content/docs/walkthrough/_meta.ts
  • docs/app/[[...mdxPath]]/page.tsx
🔇 Additional comments (4)
docs/package.json (4)

11-11: LGTM! Good use of shared configuration.

Using a shared prettier configuration will help maintain consistency across projects.


20-30: Verify TypeScript version.

The TypeScript version 5.7.3 seems incorrect as it's beyond the current stable release.

Let's verify the latest stable version:


13-18: Verify dependency versions.

Several dependency versions seem incorrect:

  • next: 15.1.5 (current stable is ~14.x)
  • react: 19.0.0 (current stable is ~18.x)
  • react-dom: 19.0.0 (should match react version)

Let's verify the latest stable versions:


3-3: Consider removing the turbopack flag.

The --turbopack flag enables experimental features that might not be stable. Consider removing it unless there's a specific need for turbopack.

Let's check the Next.js version compatibility:

✅ Verification successful

Remove redundant --turbopack flag

The --turbopack flag is redundant in Next.js 15.x as Turbopack is already the default compiler for development mode. You can safely remove it from the dev script.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify if turbopack is stable in the specified Next.js version
curl -s https://registry.npmjs.org/next/15.1.5 | jq -r '.dist-tags'

Length of output: 161


Script:

#!/bin/bash
# Check Next.js version and any Turbopack related documentation
echo "=== Next.js Version ==="
cat docs/package.json | jq -r '.dependencies.next'

echo -e "\n=== Looking for Turbopack documentation ==="
rg -i turbopack --type md

Length of output: 245

.editorconfig Outdated Show resolved Hide resolved
Updated various files in the `docs` folder to correct inconsistent
indentation, formatting, and quotes. This includes changes to
`vercel.json`, `_meta.ts`, `introduction.md`, `tsconfig.json`,
`analytics.tsx`, and `pnpm-lock.yaml` to ensure consistent coding
standards and improved readability.
@steebchen steebchen disabled auto-merge January 17, 2025 19:04
@steebchen steebchen merged commit 00c4132 into main Jan 17, 2025
12 of 13 checks passed
@steebchen steebchen deleted the chore/docs branch January 17, 2025 19:04
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