Skip to content

Commit

Permalink
fix: Only write eslint config if non exists already
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Jun 16, 2020
1 parent e7803ae commit a521b2d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/spire-plugin-eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ function eslint(
);
}
}
await writeFile(
'.eslintrc.js',
'// This file was created by spire-plugin-eslint for editor support\n' +
`module.exports = require('${defaultEslintConfig}');\n`
);
if (!hasCustomConfig) {
await writeFile(
'.eslintrc.js',
'// This file was created by spire-plugin-eslint for editor support\n' +
`module.exports = require('${defaultEslintConfig}');\n`
);
}
}
},
async setup({ argv, resolve }) {
Expand Down

0 comments on commit a521b2d

Please sign in to comment.