Skip to content

Conversation

@sqs
Copy link
Member

@sqs sqs commented Apr 18, 2020

See commit messages.

sqs added 5 commits April 17, 2020 23:45
Use ESLint instead of TSLint; upgrade tsconfig.json.
Use ESLint instead of TSLint, use yarn instead of npm, use newer JSON Schemas for validation.
@sqs sqs requested a review from felixfbecker April 18, 2020 07:09
@sqs sqs merged commit 3386e33 into master Apr 19, 2020
@sqs sqs deleted the modernize branch April 19, 2020 03:37
@sourcegraph-bot
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! It is much appreciated, but please wait for code owner approval next time before merging :)

},
}
await writeFile('tslint.json', JSON.stringify(tslintJson, null, 2))
await writeFile('eslint.json', JSON.stringify(eslintJson, null, 2))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be .eslintrc.json


console.log('📄 Adding .gitignore')
await writeFile('.gitignore', ['dist/', 'node_modules/', '.cache/', ''].join('\n'))
await writeFile('.gitignore', ['dist/', 'node_modules/', '.cache/', 'yarn.lock', ''].join('\n'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn.lock shouldn't be gitignored

console.log('📦 Installing dependencies')
await exec(
'npm',
'yarn',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should definitely use yarn in our repo for consistency, but should we really force extension authors to use yarn? I'm worried that some might not even have it installed (especially if they're not from the JS ecosystem) and then it becomes one more thing they need to figure out they have to install manually in addition to just NodeJS. And then if you go to https://yarnpkg.com, it shows you the documentation for Yarn v2, but we're relying on Yarn v1 here and Yarn v2 will not work. All this could be very confusing for a user.

With this concern, the question for me becomes "what is the incremental value extension authors get out of yarn over npm?" (and does it outweigh the concern), and I don't see any significant value. They have few dependencies, so performance difference is not noticeable, and latest npm is almost as fast as yarn (and no longer has the annoying lockfile bugs that made us switch originally).


if (await exists('tslint.json')) {
console.log('📄 tslint.json already exists, skipping creation')
if (await exists('eslint.json')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be .eslintrc.json

sqs added a commit that referenced this pull request May 2, 2020
sqs added a commit that referenced this pull request May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants