voidmatcha opened a new pull request, #5279:
URL: https://github.com/apache/zeppelin/pull/5279
### What is this PR for?
PR #5109 removed all TSLint code from zeppelin-web-angular. This restores
the two
custom lint rules on the ESLint flat config as a local plugin at
`zeppelin-web-angular/eslint-rules`:
- **constructor-params-order** (ZEPPELIN-6301): constructor parameters must
be
ordered public, protected, private, with optional and `@Optional()`
parameters
last.
- **ordered-exports** (ZEPPELIN-6325): top-level exports in `public-api.ts`
barrels must be alphabetically ordered by module specifier.
Both are registered in `eslint.config.js` and enforced by the existing
husky/lint-staged pre-commit hook that runs `eslint --fix` on staged `.ts`
files.
Logic and autofix are ported from the original TSLint rules onto the
typescript-eslint AST. The rules are plain CommonJS, matching
eslint.config.js.
`eslint src projects` reports no violations on the current tree, so no
existing
code changes are required.
### What type of PR is it?
Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6372
### How should this be tested?
* `cd zeppelin-web-angular && npm run lint` passes.
* Add an out-of-order constructor parameter, or an unsorted export in a
`public-api.ts`, then run `eslint --fix` and confirm the rule flags and
reorders it.
### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]