Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

fix: apply needed changes to deps and structure #91

Merged
merged 4 commits into from
Jun 16, 2021
Merged

Conversation

peternhale
Copy link
Collaborator

@W-9368257@ Updates to plugin to bring it more in line with what tools are being used for other production plugins.

src/generators/app.ts Show resolved Hide resolved
'@typescript-eslint/parser@^4',
'eslint-config-prettier@^8',
'eslint-config-salesforce@^0',
'eslint-config-salesforce-license@^0',
Copy link
Contributor

Choose a reason for hiding this comment

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

plugin-generator is intended for customer use...let's not put our copyright on it by default

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mshanemc I'll remove salesforce license, what about our config?

@@ -380,13 +381,13 @@ class App extends Generator {
}
}
}
if (this.eslint) {
if (this.eslint && this.type !== 'sfdx-plugin') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please excuse my ignorance but what does this do?
Does it make it so our standard eslintrc isn't added to our own plugins?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@RodEsp This repo was a direct clone of the oclif version of plugin generate. The oclif version asked a bunch of question, such as JS or TS, yarn or npm, ... The interactive piece of this plugin was stripped down to be sfdx specific, including language === 'ts', packager mgr === 'yarn', etc. However, all of the logic that consumes the answers were not stripped down, but left in place. Logic like this.type !== 'sfdx-plugin' is looking for things to for a sfdx plugin.

@@ -274,15 +274,16 @@ class App extends Generator {
this.pjson.scripts.posttest = 'eslint .'
}
if (this.mocha) {
this.pjson.scripts.test = `nyc ${this.ts ? '--extension .ts ' : ''}mocha --forbid-only "test/**/*.test.${this._ext}"`
this.pjson.scripts.test = `nyc ${this.ts ? '--extension .ts --require ts-node/register ' : ''}mocha --forbid-only "test/**/*.test.${this._ext}"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is typically in the mocha file, but shouldn't hurt.

@peternhale peternhale merged commit 3175cc0 into main Jun 16, 2021
@peternhale peternhale deleted the phale/W-9368257 branch June 16, 2021 19:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants