Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generate eslintrc (json) file since only .eslintrc files are supported (import formatter). And only rules present in the .eslintrc file. Extends are not supported.
const cp = require('child_process');
const fs = require('fs');
cp.exec('eslint --print-config ./eslintrc.js', {}, (err, stdout, stderr) => {
if (stderr) {
console.log(stderr);
return;
}
fs.writeFileSync('./.eslintrc', stdout);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.