Open vojtechjelinek opened 4 years ago
@vojtechjelinek Is this issue ready to start working on? Based on the description I understand that most of the checks are already implemented in eslint, and we only need to enable them, so do you think this becomes a good candidate for good-first-issue
tag?
@sajalasati Yes, although it needs bit better description (I don't have the bandwidth to do it rn) and some check might require some decision (like which style to use).
@sajalasati Yes, although it needs bit better description (I don't have the bandwidth to do it rn) and some check might require some decision (like which style to use).
@vojtechjelinek Thanks for letting me know!
@Hudda Would you be able to change the issue description so that it's ready to be tagged with good-first-issue
label? Asking you as a Linter team member, and also since you would have better idea here, and would understand what @vojtechjelinek is exactly suggesting. I think providing some idea about basic flow to solve this issue (with helpful links to wiki as needed) would be good.
Also I believe it can serve as a very good start point for first time contributors. Thanks a lot!!
@vojtechjelinek @DubeySandeep Hi, I am new here and would like to contribute to this issue. I tried adding @typescript-eslint/quotes to .eslintrc file and ran python -m scripts.linters.pre_commit_linter --only-check-file-extensions js. I don't any issues, all checks were successfully passed. Am I doing anything wrong here?. Please guide me.
@vojtechjelinek @DubeySandeep Hi, I am new here and would like to contribute to this issue. I tried adding @typescript-eslint/quotes to .eslintrc file and ran python -m scripts.linters.pre_commit_linter --only-check-file-extensions js. I don't any issues, all checks were successfully passed. Am I doing anything wrong here?. Please guide me.
@activenod This command will run script only on js files that you have changed. But you need to run the script on all js files in the codebase, which can be done by this command python -m scripts.linters.pre_commit_linter --only-check-file-extensions=js --path=. --verbose
. If it takes too much time you can directly push the code to github and github actions will run these checks for you. I've updated the instructions in the issue description accordingly. Thanks!
@Hudda Please assign me @typescript-eslint/quotes
@activenod I've assigned you. Thanks!
Hi @oppia/core-maintainers, this issue is not assigned to any project. Can you please update the same? Thanks!
@Hudda please assign me @typescript-eslint/dot-notation
@huntermaxfield I've assigned you. Thanks!
@Hudda i want to work on this can you please guide me through this
@mahendra1290 all the steps are listed in the issue description. Please take a look at that.
@Hudda Hi, I would like to work on this issue. This is my first open-source contribution so please assign me a file accordingly.
@Hudda, I would like to work on typescript-eslint/space-before-function-paren
. Also I noticed that including typescript-eslint/keyword-spacing
and @typescript-eslint/comma-spacing
in the .eslintrc doesn't throw any errors.
@Hudda, I would like to work on
typescript-eslint/space-before-function-paren
. Also I noticed that includingtypescript-eslint/keyword-spacing
and@typescript-eslint/comma-spacing
in the .eslintrc doesn't throw any errors.
@Lawful2002 I've assigned you to these checks.
@Hudda I would like to work on @typescript-eslint/method-signature-style
. I am new to opensource contribution and this is my first issue.
@SanjaySajuJacob I've assigned you, you can start working on this one.
@Hudda the property space-before-function-paren
already exists in the .eslintrc file:
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "never",
"named": "never"
}
],
do I need to update it from never
(default) to always
?
Hey @Hudda , could you assign me the @typescript-eslint/consistent-type-assertions rule?
@Hudda the property
space-before-function-paren
already exists in the .eslintrc file:"space-before-function-paren": [ "error", { "anonymous": "never", "asyncArrow": "never", "named": "never" } ],
do I need to update it from
never
(default) toalways
?
Sorry for the delay. Yes, you need to change it to always.
Hey @Hudda , could you assign me the @typescript-eslint/consistent-type-assertions rule?
@PranshuSrivastava You are assigned.
@Lawful2002 Hey, sorry about this, but actually I think @Hudda is wrong. What you need to do is to enable the @typescript-eslint/space-before-function-paren
and disable the space-before-function-paren
check. The rules for the @typescript-eslint/space-before-function-paren
should stay the same as for space-before-function-paren
.
@vojtechjelinek So I need to add
"space-before-function-paren": "off",
....
....
"@typescript-eslint/space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "never",
"named": "never"
}
],
@Lawful2002 Yes
Hey @Hudda, I would like to work on @typescript-eslint/func-call-spacing if available.
@ShivamJhaa I've assigned you!
Hello @Hudda, can you please assign me to work on @typeScript-eslint/promise-function-async?
@IniobongUdom7 You are assigned.
Hello @Hudda, may I work on @typescript-eslint/consistent-type-definitions?
@nithinrdy I've assigned you.
@Hudda , may I work on @typescript-eslint/member-delimiter-style?
@nithinrdy you are assigned.
@vojtechjelinek I am using the following configuration for the 'member-delimiter-style' rule:
I would like to know if these are appropriate. More specifically, the underlined part is what I'd like to know about. With it set to true:
With it set to false:
Which one should I be using?
@vojtechjelinek I am using the following configuration for the 'member-delimiter-style' rule:
I would like to know if these are appropriate. More specifically, the underlined part is what I'd like to know about. With it set to true:
With it set to false:
Which one should I be using?
I think false is better, also it seems to be used in the default config . I think we can just use the default config.
@Hudda @vojtechjelinek Can @typescript-eslint/lines-between-class-members
be assigned to me?
@Hudda Pls assign me @typescript-eslint/no-for-in-array
@khareyash05 Done.
@Hudda Please assign me @typescript-eslint/explicit-function-return-type
@pathange-s You are assigned.
Hi @Hudda can you assign me @typescript-eslint/await-thenable
@ParmeetChawla25 I've assigned you.
@vojtechjelinek can you please assign me @typescript-eslint/no-unnecessary-condition?
@DubeyRicha Done.
@vojtechjelinek Can you please assign me @typescript-eslint/no-invalid-void-type?
@BlakeHan01 Done.
@vojtechjelinek I have fixed all errors but I couldn't fix this one in the second image on line 178. I tried changing void to undefined but it wouldn't let me. Could you provide some help with it? Thanks.
@BlakeHan01 Can you put just FeedbackThread[]
there?
@vojtechjelinek Unfortunately I get the same error. Do you still think it's possible to fix this error without changing other parts of the codebase?
@BlakeHan01 Maybe not, can you try to change the code so that void
is not returned?
@vojtechjelinek I have tried changing the code in this file and in the file where FeedbackThread[] is defined. However, the return type has to be void | FeedbackThread[]. Could you please remove this rule as it probably can't be fixed without changing a lot of the codebase which might not be so beginner-friendly?
@typesctript-eslint
contains a subset of rules that extend basic rules provided byeslint
, these rules usually work better and provide additional checks. The checks that are these extend-rules are listed in ESLint typescript rules at the bottom (the rules that have a reddish background).The goal of this issue should be to implement these rules, starting with the ones that we use already but only the simple
eslint
version and then all the other ones that can also be enabled, some of these might help us to get rid of our own listing.For some of these there might be one more problem that we do not have all files covered with tsconfig.json. And some of these need a decision on which style we want to use (this is visible in the sheet)
Steps to follow to create a PR:
"@typescript-eslint/<rule>
)"@typescript-eslint/<rule>
: [...]` in the .eslintrc file.python -m scripts.linters.pre_commit_linter --only-check-file-extensions=js --path=. --verbose
to check existing issues in the codebase. (This can take 3-5 mins mins to complete.)List of rules to enable: