Skip to content

fix: linting #95

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 1 commit into from
May 24, 2024
Merged

fix: linting #95

merged 1 commit into from
May 24, 2024

Conversation

levino
Copy link
Contributor

@levino levino commented May 23, 2024

still working on this

Copy link

vercel bot commented May 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jsonresume-org-homepage2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 7:34am
jsonresume-org-registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 7:34am

Copy link

changeset-bot bot commented May 23, 2024

⚠️ No Changeset found

Latest commit: 985ad9a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented May 23, 2024

Walkthrough

The recent updates primarily focus on standardizing ESLint configurations across various projects. The apps/homepage2 project saw simplification by removing specific settings and extending a custom configuration, while three packages (jsonresume-theme-cv, jsonresume-theme-standard, and jsonresume-theme-tailwind) introduced new ESLint configurations tailored for React. These changes aim to streamline linting rules and ensure consistency across different codebases.

Changes

File Path Change Summary
apps/homepage2/.eslintrc.js Simplified configuration by removing parser, parserOptions, plugins, and settings; added env section; extended 'custom'.
packages/jsonresume-theme-.../.eslintrc Introduced new ESLint configurations extending custom settings for React.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
Contributor

@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: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between ef3d7c6 and 985ad9a.
Files ignored due to path filters (16)
  • apps/homepage2/package.json is excluded by !**/*.json
  • apps/registry/package.json is excluded by !**/*.json
  • package.json is excluded by !**/*.json
  • packages/eslint-config-custom/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-cv/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-flat/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-full/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-onepage/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-spartacus/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-standard/package.json is excluded by !**/*.json
  • packages/jsonresume-theme-tailwind/package.json is excluded by !**/*.json
  • packages/tsconfig/package.json is excluded by !**/*.json
  • packages/ui/package.json is excluded by !**/*.json
  • pnpm-lock.yaml is excluded by !pnpm-lock.yaml, !**/*.yaml
  • themes/papirus/package.json is excluded by !**/*.json
  • themes/stackoverflow/package.json is excluded by !**/*.json
Files selected for processing (4)
  • apps/homepage2/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-cv/.eslintrc (1 hunks)
  • packages/jsonresume-theme-standard/.eslintrc (1 hunks)
  • packages/jsonresume-theme-tailwind/.eslintrc (1 hunks)
Files skipped from review due to trivial changes (4)
  • apps/homepage2/.eslintrc.js
  • packages/jsonresume-theme-cv/.eslintrc
  • packages/jsonresume-theme-standard/.eslintrc
  • packages/jsonresume-theme-tailwind/.eslintrc

Copy link
Contributor Author

@levino levino left a comment

Choose a reason for hiding this comment

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

This should fix any issues we encountered.

Important lessons:

  • do not use eslint@9 or above (we can do it, but we also need to migrate all configs).
  • do not add eslint.config.js files because they enable the new "flat config" mode of eslint@8.

env: {
browser: true,
es2021: true,
jquery: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This enables the usage of $ in the code.

@@ -52,13 +53,11 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.24.5",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure that I removed all unnecessary dependencies. Where did you use this dependency?

Copy link
Member

Choose a reason for hiding this comment

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

can't remember +1 to remove

Comment on lines -20 to -22
"@babel/eslint-parser": "^7.24.5",
"eslint": "^9.3.0",
"eslint-plugin-react": "^7.33.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think in general, these are unnecessary. Removed them.

"license": "MIT",
"devDependencies": {
"@babel/eslint-parser": "^7.24.5",
"eslint": "^9.3.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately this is quite dangerous. We use eslint@8. eslint@9 brings breaking changes with regards to the configuration and bringing it into the project will create all kinds of nightmares.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thomasdavis this was the main mistake, I think. Adding this file means "opting into the new flat config" for eslint. eslint will then ignore all .eslintrc files.

Copy link
Member

Choose a reason for hiding this comment

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

yeah great to know

Copy link
Member

@thomasdavis thomasdavis left a comment

Choose a reason for hiding this comment

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

This is awesome, great work.

  • noted to not go to eslint9 (i'm in no rush)

@levino levino merged commit f60a1aa into master May 24, 2024
7 checks passed
@levino levino deleted the feature/fix-linting branch May 24, 2024 12:47
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.

2 participants