-
Notifications
You must be signed in to change notification settings - Fork 395
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
Moving fully to eslint, removing prettier #1024
Conversation
I've created on such micro-PR, addressing the naming convention of type properties for source code located under EDIT: This has now been merged in. |
I have and will be issuing several more pull requests (I list them all in under the TODO section of the original post in this PR). I am trying to group the PRs by rule - one PR per rule, basically. I have merged the ones that do not change any existing rules and just adhere to relatively common / well-accepted rules already - but that does not mean those cannot be easily reverted or modified. I have also left the PRs that change lint rules open for review for people. In either case: all open/closed/merged PRs listed under the TODO section can be reviewed at the team's leisure, and comments can be left there. Once I have created PRs for all rules that are failing, I will comment again. |
79ef148
to
fcbae2d
Compare
2cc7973
to
903d3b8
Compare
… = operator, and prefix for other operators to be at the end of the line.
…irectories to import submodules from.
…s the use of short-circuit logical operators (|| and &&).
Allow use of "as Type" syntax for type assertions in test code. Dont force symbol descriptors in test code
…he accessibility of constructors for various classes.
ed946f4
to
feb7f79
Compare
Alright, with @srajiang resolving the update to TS issues, I have now rebased this PR with the latest EDIT: FYI we will get this warning for now I suppose? Linting and tests still pass fine regardless.
|
🙌 All of these changes are courtesy of @aoberoi and the work they put into #669 🙇
Summary
This PR is the beginning of a journey to tackle #842. The goals are:
This pull request fixes #842
Progress
Using this PR and running
npm run lint
currently yields:🤓 Process
Tackling #842 is a big task! It will require many changes to many files across the project. As such, I propose we employ a divide-and-conquer approach consisting of many pull requests that would look something like the below. This is only a suggestion and I welcome feedback on the approach and am open to other alternatives!
tslint-to-eslint
branch as a base, to offer suggestions on how to change the configurations / linting rules. These config/lint rule change PRs may be accompanied with the appropriate source code changes enabling project source to pass the rules in question. I think this offers an experimental and "let's try it out and see!" approach to figuring out which linting rules we want to include and which ones we want to move away from. With each such micro-PR merged into this PR, this base PR should in theory come closer and closer to passing the CI, as each PR should remove some number of linting errors.main
.📝 TODO
Just keeping a running track of outstanding tasks here - this section will likely be edited many times as this PR is worked on.
package.json
linting run scripts - in particular there is still a run script for linting test source. Perhaps this extra run script can be removed if we complete combining the source-and-test eslint configurations into one file?src/types/**/*.ts
import/no-internal-modules
errors)no-use-before-define
ruleoperator-linebreak
ruleno-inferrable-types
rulerequire
withimport
, allow use ofimport
for JSON fileseslint-
andtslint:
comments/directives and update accordingly based on new configRequirements (place an
x
in each[ ]
)