-
Notifications
You must be signed in to change notification settings - Fork 0
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
[DEVEX-101] Update @pagopa/eslint-config #4
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.
We should consider to extend the ruleset adding some plugin to enforce some concepts:
Some ruleset are not yet released for ESLint 9 like we should keep an eye on it:
What about having two sets? ie. lite vs nazi (we can settle on "lite" for this pr) |
I agree on having multiple base rulset, but some principles must be guarantees even in lite configuration. |
I'd like to have only auto-fixable items in lite. Which principles are you referring to @BurnedMarshal ? |
Have only auto-fixable rules is impossible, because even the raccomended ts-eslint and raccomended eslint rules have rules that don't support autofix or have reported errors on autofix feature.
|
I've doubts about enforcing functional programming everywhere. Think about a frontend application or infrastructure layers (sdk) where it's not mandatory, neither strongly suggested, to adopt |
I agree, functional programming enforcing can be enabled on "nazy" ruleset or specific rule with functional paradigm. |
I think that functional programming and immutability should be enforced at project-level, for specific workspace/folders. With this common rules (that will be used by the whole PagoPA org) we should enforce writing good and modern TypeScript code. Functional programming is not "nazi", it's just a different paradigm that can be used in some workspaces. |
The functional paradigm is the suggested way for Azure Functions and App Service template in the
|
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.
do this requires more work?
List of changes
code-review.yaml
pipeline@pagopa/eslint-config
workspace that exports aneslint flat configuration
ESlint plugins configured
@eslint/js
- default JS rules fromeslint
strict
andstylistic
rules for TypeScriptvitest
import
,classes
,objects
)eslint-plugin-prettier
to avoid conflicts with prettier formatting