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

More strict eslint? #90

Open
mifi opened this issue Mar 29, 2023 · 5 comments
Open

More strict eslint? #90

mifi opened this issue Mar 29, 2023 · 5 comments
Assignees
Labels
prio-3 uppy The open source file uploader

Comments

@mifi
Copy link
Contributor

mifi commented Mar 29, 2023

I noticed that eslint doesn't complain about almost anything, e.g. semicolons vs no semicolons, and it doesn't help us with missing react hooks dependencies. should we have more strict linting? maybe transloadit rules?

@lekevbot lekevbot added the uppy The open source file uploader label Mar 29, 2023
@kvz
Copy link
Member

kvz commented Mar 29, 2023

plus prettier i'd vote, same as we've been doing for other transloadit repos 👌

@mifi
Copy link
Contributor Author

mifi commented Mar 29, 2023

we already have prettier here but for some reason i think it's not working properly:

  • when i ran prettier fix, it changed some files that i had not touched
  • i cannot get it to run on save in vscode even if i have set editor.formatOnSave: true

@aduh95
Copy link
Contributor

aduh95 commented Mar 29, 2023

  • i cannot get it to run on save in vscode even if i have set editor.formatOnSave: true

That's on MDX files, right? I think that's because Prettier doesn't support them out of the box.

@mifi
Copy link
Contributor Author

mifi commented Mar 29, 2023

no, also examples.tsx

but I ran the "npm run format" command and it caused aws-s3.mdx to get modified by prettier: bbba0e5#diff-4c2bc38564b6cae2154e034b529fcd7788562662ff3b1121992c1d454eb8abc2 - a file that i hadn't touched

@kvz
Copy link
Member

kvz commented Apr 3, 2023

Perhaps we can set Prettier for filetypes that work well, but Remark for mdx since as reported Prettier adds newlines in wrong places there(?)

  "[markdown]": {
    "files.trimTrailingWhitespace": false,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[mdx]": {
    "editor.defaultFormatter": "<REMARK?>"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.formatOnSave": true,

@arturi is going to show @aduh95 where it breaks for him

Merlijn says we should install the MDX VS Code Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-3 uppy The open source file uploader
Projects
None yet
Development

No branches or pull requests

4 participants