-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-6305] Modify package.json so that lint and prettier cover projects folder #5054
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
Conversation
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.
What do you think about broadening the checks to all files except for dist, node_modules, and target (by using ignore files), instead of limiting them only to src and projects? I thought including configuration files as well would help keep things tidy and improve collaboration.
For example:
- "{src,projects}/**/*.{ts,js,json}": [
+ "**/*.{ts,js,json}": [|
I’ve made the changes based on your feedback. Thank you, as always, for your valuable suggestions and review. Please let me know if anything else is needed. |
|
Could you please rebase this branch onto Also, while reviewing, I noticed two items that might be worth double-checking:
// src/app/arr.ts
export const strs: string[] = [];// src/app/for-in.ts
import { strs } from '@zeppelin/arr'; // use path alias so type info is needed
// Should trigger no-for-in-array
for (const s in strs) console.log(s);
Tentative proposal (very open to correction):Maybe we could use Apologies for the long comments. My checks were somewhat inductive, so I might have drawn the wrong conclusions. I mainly wanted to see whether the previous code intentionally relied on passing |
c07c0d9 to
8b928fa
Compare
8b928fa to
2ded0a7
Compare
|
Due to editor autocomplete, an incorrect parameter was passed to the I looked into managing I thought |
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.
LGTM👍 Related CI job has also passwed.
…rojects folder ### What is this PR for? > This PR for **zeppeling-web-angular** In `npm run lint`, `projects folder` is linted using ng, but `prettier` only checks the `src folder`. In `lint-staged`, neither lint nor `prettier` checks the `projects folder`. This seems to need fixing. Because `ng lint --fix` is not supported, I added a `lint:fix` script to run `tslint` with the `--fix` option. Since src and projects folders need to reference different tslint configs, I added the corresponding option to `lint-staged`. ### What type of PR is it? Bug Fix Improvement ### Todos ### What is the Jira issue? * [[ZEPPELIN-6305](https://issues.apache.org/jira/browse/ZEPPELIN-6305)] ### How should this be tested? ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? N * Is there breaking changes for older versions? N * Does this needs documentation? N Closes #5054 from dididy/fix/ZEPPELIN-6305. Signed-off-by: ChanHo Lee <[email protected]> (cherry picked from commit 7110bed) Signed-off-by: ChanHo Lee <[email protected]>
|
Merged into master and branch-0.12 |
What is this PR for?
In
npm run lint,projects folderis linted using ng, butprettieronly checks thesrc folder. Inlint-staged, neither lint norprettierchecks theprojects folder. This seems to need fixing.Because
ng lint --fixis not supported, I added alint:fixscript to runtslintwith the--fixoption.Since src and projects folders need to reference different tslint configs, I added the corresponding option to
lint-staged.What type of PR is it?
Bug Fix
Improvement
Todos
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Questions: