-
Notifications
You must be signed in to change notification settings - Fork 17
fix: apply needed changes to deps and structure #91
Conversation
# Conflicts: # package.json # yarn.lock
src/generators/app.ts
Outdated
'@typescript-eslint/parser@^4', | ||
'eslint-config-prettier@^8', | ||
'eslint-config-salesforce@^0', | ||
'eslint-config-salesforce-license@^0', |
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.
plugin-generator is intended for customer use...let's not put our copyright on it by default
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.
@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') { |
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.
Please excuse my ignorance but what does this do?
Does it make it so our standard eslintrc
isn't added to our own plugins?
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.
@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}"` |
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.
I think this is typically in the mocha file, but shouldn't hurt.
@W-9368257@ Updates to plugin to bring it more in line with what tools are being used for other production plugins.