-
Notifications
You must be signed in to change notification settings - Fork 295
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
build: eslint, tslint, prettier consolidation, purge from non-root pkgs #3071
Merged
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:build-eslint-prettier-consolidation-phase-1
Mar 12, 2024
Merged
build: eslint, tslint, prettier consolidation, purge from non-root pkgs #3071
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:build-eslint-prettier-consolidation-phase-1
Mar 12, 2024
Conversation
This file contains 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
packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/routes/index.ts
Fixed
Show resolved
Hide resolved
@petermetz Weaver tests are failing |
@outSH Oops, thank you, I'm working on a fix! |
b87fc2b
to
10e39e4
Compare
@outSH Weaver tests are now passing! |
outSH
approved these changes
Mar 11, 2024
jagpreetsinghsasan
approved these changes
Mar 12, 2024
1. We had dozens of different versions of ESLint, TSLint, Prettier declard in package.json files. Most versions were so old that they had ben EOL for several years too. 2. The presence of these and their scripts/config files/etc were making it impossible to run the linter on the sub-folders where these were being used. 3. As part of the big push to consolidate linting and code formatting on the entire project, this is phase 1 where I purged the mentioned dependencies from the project and now only the root package.json file declares them which is currently using the latest and greatest versions. 4. I know that the diff is huge in this pull request but there are no code changes that would cause bugs or logic modification at all. It's all just applying automated formatting and linting on sub-directories where previously this was impossible. E.g., this entire change should not cause any sort of bugs (but of course we'll see what the CI execution has to say about that). 5. The follow-up phases will consist of slowly applying more brazen refactoring in a much more targeted and surgical manner with small pull requests that are easy and quick to review. 6. The smaller pull requests will target sub-directories that we still cannot include in the linting (see the .eslintignore file for a list) and then culminate in us finally enabling the linter for everything. 7. The root folder's ESLint ignore file was refactored in a way that the files that we plan on fixing later are now ignored on a one by one basis instead of using patterns. This makes the ignore file a collection of to-dos where one can delete a single line from the ignore file (pertaining to a single file that is being ignored) and then proceed to fix the linter issues and send a small, easy to review pull request that does not overwhelm the maintainers when they are trying to review a huge diff with a large batch of linter fixes. Phase two of this project is then to one by one drain the ignore entries of these mentioned files from the ESLint ignore file. So, the bottom line is that this might look like a hugely disruptive change, but I've done my best to keep it as simple as possible so that we don't have to worry about reviewing it line by line and instead just focus on the big picture and the principle idea(s) behind it (code quality). If it does end up introducing a bug or CI breakage, I'll volunteer to fix those because I'm very confident that even if this does happen, it will be very minor and quick fixes necessary only so I don't mind being on the hook for it. Signed-off-by: Peter Somogyvari <[email protected]>
10e39e4
to
3546153
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
declard in package.json files. Most versions were so old that they had
ben EOL for several years too.
it impossible to run the linter on the sub-folders where these were
being used.
the entire project, this is phase 1 where I purged the mentioned dependencies
from the project and now only the root package.json file declares them
which is currently using the latest and greatest versions.
code changes that would cause bugs or logic modification at all. It's all
just applying automated formatting and linting on sub-directories where
previously this was impossible. E.g., this entire change should not cause
any sort of bugs (but of course we'll see what the CI execution has to
say about that).
refactoring in a much more targeted and surgical manner with small
pull requests that are easy and quick to review.
cannot include in the linting (see the .eslintignore file for a list) and
then culminate in us finally enabling the linter for everything.
files that we plan on fixing later are now ignored on a one by one basis
instead of using patterns. This makes the ignore file a collection of
to-dos where one can delete a single line from the ignore file (pertaining
to a single file that is being ignored) and then proceed to fix the linter
issues and send a small, easy to review pull request that does not overwhelm
the maintainers when they are trying to review a huge diff with a large
batch of linter fixes. Phase two of this project is then to one by one
drain the ignore entries of these mentioned files from the ESLint ignore
file.
So, the bottom line is that this might look like a hugely disruptive
change, but I've done my best to keep it as simple as possible so that
we don't have to worry about reviewing it line by line and instead just
focus on the big picture and the principle idea(s) behind it (code quality).
If it does end up introducing a bug or CI breakage, I'll volunteer to fix
those because I'm very confident that even if this does happen, it will
be very minor and quick fixes necessary only so I don't mind being on the
hook for it.
Signed-off-by: Peter Somogyvari [email protected]
Pull Request Requirements
upstream/main
branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.-s
flag when usinggit commit
command. You may refer to this link for more information.Character Limit
A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.