-
Notifications
You must be signed in to change notification settings - Fork 2
Eslint check #119
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
Eslint check #119
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
2b77ebe
Removed unused imports
GuillaumeLeroy34 8a3f0a7
commented unused feature that would allow to change the display type …
GuillaumeLeroy34 9a4ab97
Fixed logger incorrectly logging the error instead of it's message at…
GuillaumeLeroy34 4f2da10
removed unused test page
GuillaumeLeroy34 d6c1161
correctly typed index, previous "type" was int instead of number
GuillaumeLeroy34 086c09e
removed unused import
GuillaumeLeroy34 fba500b
removed unused websocket for gama system
GuillaumeLeroy34 3c3dfad
changed the type of message back to any from a string
GuillaumeLeroy34 897f3d9
retyped from int to number
GuillaumeLeroy34 a192a0f
fixed typo
GuillaumeLeroy34 a3feda4
used proper template syntax
GuillaumeLeroy34 83f45c9
allowed subprojectsList to be empty, as initialization is asynchronou…
GuillaumeLeroy34 a34ad2b
Moved logger definition in proper scope
GuillaumeLeroy34 6da9f3c
removed unnecessary @ts-expect-error
GuillaumeLeroy34 62a1025
added expect error, error is invalid
GuillaumeLeroy34 156801f
reformated
GuillaumeLeroy34 fe648aa
removed / fixed unused imports
GuillaumeLeroy34 95f1164
implemented logger in this component, added a if else block for tailw…
GuillaumeLeroy34 9711f37
added optionnal property to tailwindcanvas dim
GuillaumeLeroy34 d9d3c9d
Removed "streamplayerscreenControl" component, as it is currently unu…
GuillaumeLeroy34 a3a9a26
fixed wrong declaration of logger
GuillaumeLeroy34 aef2665
added ternary operator, checking if selectadPlayer is not undefined b…
GuillaumeLeroy34 3f0d3f8
fixed syntax highlighting not working properly, updated eslint depend…
GuillaumeLeroy34 4c291f6
updated package and package.lock
GuillaumeLeroy34 f359aaf
added expect error on a value that was identified as unused, but was …
GuillaumeLeroy34 ac9fe0c
added "entries" property of type array of simulation for proper typin…
GuillaumeLeroy34 7099bb7
added comments on 2 potentially obscure functions
GuillaumeLeroy34 f708a4f
changed how subProjectsList is implemented: instead of using [array] …
GuillaumeLeroy34 e9f2db2
created an error object to properly display an error message in the c…
GuillaumeLeroy34 1e7b2c6
removed unused "setIdentifier" from the useSearchParams() function
GuillaumeLeroy34 07e9729
removed unused screen display type functionnality, removed different …
GuillaumeLeroy34 d7a9f77
added bracket for correct template syntax
GuillaumeLeroy34 6f57254
added brackets for correct use of logger
GuillaumeLeroy34 138183c
Simplified the subprojectList: now use an effect hook to update the s…
GuillaumeLeroy34 c976ed9
converted style attribute containing css to tailwind utilities to red…
GuillaumeLeroy34 73687a7
Uniformized spacing
GuillaumeLeroy34 d5a935f
Removed unused commented code
GuillaumeLeroy34 ee0b1e6
changed to using and operator instead of the ternary operator
GuillaumeLeroy34 1f80158
added an else clause to fix the issue where the simulation list did n…
GuillaumeLeroy34 86d5407
removed 'style attribute', and replaced it by an image that is easie…
GuillaumeLeroy34 b64fd60
removed uncessary ternary operator, and replaced them by an and opera…
GuillaumeLeroy34 48a13cd
removed eslint exception
GuillaumeLeroy34 2cf61ff
removed unsued code adding text in the buttons of the simulation flow…
GuillaumeLeroy34 848da73
removed weird tailwind class
GuillaumeLeroy34 997896f
added template in the string in the info logs
GuillaumeLeroy34 18f836b
removed package, package-lock and eslint.config from the .gitignore
GuillaumeLeroy34 9953431
removed commented useless code and empty space at the top of the comp…
GuillaumeLeroy34 180b7e4
removed Simulation interface from SelectorSimulation, and replaced it…
GuillaumeLeroy34 ccbe08f
since we now use properly defined types, we can check the type of the…
GuillaumeLeroy34 9969041
defined a constant "catalog_item" in the scope of the if to tell ts t…
GuillaumeLeroy34 3405b49
removed weird conditionnal check that was used to see if an item cont…
GuillaumeLeroy34 dd01c9f
removed unecessary check, as subprojectlist is always initialized as …
GuillaumeLeroy34 b8c351a
removed the interface Simulation, implemented the interface VU_CATALO…
GuillaumeLeroy34 c6ee96d
changed the log to use the error message instead of directly dumping …
GuillaumeLeroy34 d82be01
removed Simulation from the constants file.
GuillaumeLeroy34 4c4b79b
removed Simulation and replaced it with VU_MODEL_SETTING_JSON | VU_CA…
GuillaumeLeroy34 ca2805f
removed useless header from the streaming page
GuillaumeLeroy34 65d644e
Fixed logger having an incorrect category attribute, and removed unec…
GuillaumeLeroy34 0b54c61
added comment explaining the eslint config file, removed deprecated .…
GuillaumeLeroy34 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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
| // new configuration file for eslint, the old .cjs was deprecated | ||
| import js from "@eslint/js"; | ||
| import globals from "globals"; | ||
| import tseslint from "typescript-eslint"; | ||
| import pluginReact from "eslint-plugin-react"; | ||
| import { defineConfig } from "eslint/config"; | ||
|
|
||
| export default defineConfig([ | ||
| { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: {...globals.browser, ...globals.node} } }, | ||
| tseslint.configs.recommended, | ||
| pluginReact.configs.flat.recommended, | ||
| ]); | ||
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.
Please add comments to explain how you configured ESLint as it's a bit complicated to read as is
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.
I used "npm init @eslint/config@latest" as per the official documentation, followed the steps in the terminal, which ended up making this configuration file. I didn't write it by hand, nor should we read it
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.
I cannot directly answer to the comment, but since the types are not proper classes but instead instances, it would require implementing type guard functions as using instanceof is not possible since interfaces are ditched at runtime. As per the official typescript documentation, this would require creating a function that will also just check the type attribute of the interface.
A cleaner implementation (using instanceof) would require classes, which would make the constant file bigger and heavier, I think that the current system is a good compromise.