eslint-config-atomic
Version:
Eslint config used in atom-ide-community
15 lines (13 loc) • 415 B
text/typescript
import child_process from "child_process"
import eslintPackageJson from "eslint/package.json"
export function getEslintVersion() {
if (process.argv[1].includes("eslint.cjs")) {
const eslintVersion = child_process.execFileSync(process.argv[0], [process.argv[1], "--version"], {
encoding: "utf8",
stdio: "pipe",
})
return eslintVersion
} else {
return eslintPackageJson.version
}
}