-
Notifications
You must be signed in to change notification settings - Fork 141
Conversation
const linterEslintMeta = require(Path.join(atom.packages.resolvePackagePath('linter-eslint'), 'package.json')) | ||
const config = atom.config.get('linter-eslint') | ||
const configString = JSON.stringify(config, null, 2) | ||
const hoursSinceRestart = process.uptime() / 3600 |
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.
Do we want hours or minutes?
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 tenths of hours (6 min resolution, which is what it is showing now) is enough to tell us whether it's been restarted recently, without being ridiculous when it hasn't been restarted in days. But, happy to change it if you think minutes would be better.
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.
Wow, completely forgot to see how that looked in the output. This is just fine for me.
} catch (e) { | ||
if (config.useGlobalEslint && e.code === 'ENOENT') { | ||
throw new Error( | ||
'ESLint not found, Please install or make sure Atom is getting $PATH correctly' |
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.
Might as well fix #680 here, maybe something along the lines of "Global ESLint not found, please ensure
npm get prefix returns correctly or set the path in settings"
?
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.
Yeah happy to change if you like, or I can submit another PR right after this one, since it's kind of a different issue.
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.
That's probably a better idea, just saw that what was reporting the initial message is further down in the code here anyway.
Reverting this so we can get #609 merged. |
This PR adds a
Linter Eslint: Debug
command which will pop open a notification with some useful debugging information including various package versions, the type of ESLint is being used for the current file, the linter-eslint configuration, time since the last atom restart, and more.My intent is to add an issue template which asks users to provide the output of this command, to assist package maintainers in troubleshooting and triaging incoming issue reports.
Example output: