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

Typed linting #909

Merged
merged 44 commits into from
Dec 12, 2023
Merged

Typed linting #909

merged 44 commits into from
Dec 12, 2023

Conversation

goastler
Copy link
Member

@goastler goastler commented Dec 11, 2023

blocked by #907

this isn't fully typed, as the typed version eats ram!

this is stylistically typed, so keeps our ts style consistent

fixes prosopo/captcha-private#442

Copy link

Pull Request Review - Summary

Hey there! 👋 I've summarized the previous results for you. Here's a markdown document that you can use for your pull request review:

Changes

  1. In .eslintrc.cjs, added 'plugin:@typescript-eslint/stylistic' to the 'extends' array.
  2. In .eslintrc.cjs, removed the '+' in line 7, as it seems to be a typo.
  3. In .eslintrc.cjs, the rule 'unused-imports/no-unused-vars' is disabled and then enabled again in line 21. It can be removed.
  4. In .eslintrc.cjs, the rule 'sort-imports' is disabled and then enabled again in line 56. It can be removed.
  5. In .eslintrc.cjs, consider removing the trailing comma after the 'json/*' rule in line 57.
  6. In contracts/captcha/package.json, the 'clean' script seems to be missing a command in line 96.

Suggestions

  1. In contracts/proxy/package.json, change the 'eslint' script in line 7 to "npx eslint . --no-error-on-unmatched-pattern --config ../../.eslintrc.js".
  2. In demos/client-example-server/package.json, change the 'eslint' script in line 17 to "npx eslint . --no-error-on-unmatched-pattern --config ../../.eslintrc.js".
  3. In demos/client-example/package.json, change the 'eslint' script in line 36 to "npx eslint . --no-error-on-unmatched-pattern --config ../../.eslintrc.js".
  4. In demos/client-bundle-example/package.json, change the 'eslint' script in line 7 to "npx eslint . --no-error-on-unmatched-pattern --config ../../.eslintrc.js".

Bugs

  1. In .eslintrc.cjs, the 'plugin:@typescript-eslint/stylistic' plugin is added, but it may not be installed in line 7.
  2. In .eslintrc.cjs, the 'unused-imports/no-unused-vars' rule is disabled and then enabled again in line 21. It can be removed.
  3. In .eslintrc.cjs, the 'sort-imports' rule is disabled and then enabled again in line 56. It can be removed.
  4. In .eslintrc.cjs, the 'json/*' rule is missing a closing bracket } in line 57.
  5. In contracts/captcha/package.json, the 'clean' script seems to be missing a command in line 96.

Improvements

  1. In .eslintrc.cjs, the 'overrides' array can be refactored for better readability. Here's the code snippet:
overrides: [
  {
    files: ['*.html'],
    rules: {
      'plugin:@typescript-eslint/stylistic': 'off',
      'unused-imports/no-unused-vars': 'off',
      'sort-imports': 'off',
      'json/*': 'off',
    },
  },
],

Rating

Here's a brief explanation of the code rating criteria:

  • Readability: The code has been improved with better indentation, removal of empty lines, and added comments.
  • Performance: No specific performance-related changes were mentioned in the previous tasks.
  • Security: No specific security-related changes were mentioned in the previous tasks.

Feel free to add more details or make any necessary adjustments to the markdown document. Good luck with your pull request! 🚀

P.S. Did you know that our premium plan can analyze even bigger pull requests? It's like having a superpower for code reviews! 😄

Copy link
Contributor

⏳ Blocked by: * #907.
🔔 I'll update this comment when the blocking issues/PRs are closed.
💭 From Dependent Issues (:robot:)

forgetso
forgetso previously approved these changes Dec 11, 2023
@goastler goastler mentioned this pull request Dec 12, 2023
@goastler goastler enabled auto-merge (squash) December 12, 2023 09:32
@goastler goastler merged commit eabebd0 into main Dec 12, 2023
10 checks passed
@goastler goastler deleted the typed-linting-2 branch December 12, 2023 09:45
@goastler goastler mentioned this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants