Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallgassner committed Oct 8, 2020
1 parent 08a9250 commit f9f3daf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/all-contributors/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function getExtraContributors(body?: string) {
return authorContributions;
}


/** Determine which files need to display contributors and generate contributors */
function generateContributorReadme(config: AllContributorsRc, contributors: any) {
return (config.files || ["README.md"]).map(async (file) => {
const oldReadMe = fs.readFileSync(file, {
Expand All @@ -200,7 +200,9 @@ export default class AllContributorsPlugin implements IPlugin {

/** The options of the plugin */
readonly options: Required<IAllContributorsPluginOptions>;
/** Has the Readme been initialized */
private generatedReadme: boolean;

/** Initialize the plugin with it's options */
constructor(options: IAllContributorsPluginOptions = {}) {
this.options = {
Expand Down Expand Up @@ -518,7 +520,7 @@ export default class AllContributorsPlugin implements IPlugin {
}
}

if (config.contributors.length && this.generatedReadme === false) {
if (config.contributors.length && !this.generatedReadme) {
// if the all-contributors has not been generated ... generate it
try {
// test if the first file in the list of files has been init
Expand Down

0 comments on commit f9f3daf

Please sign in to comment.