Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default status text. #1573

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ From version 2.2.3 on forward odd major, minor or patch version numbers indicate
### Version 2.3.1 - Pre-release

- the extension uses now VS Code's language status indicator
- the language status indicator now informs about long linting or fix on save times. Times above 750ms produce an error indication and times above 250ms a warning indication.
- the language status indicator now informs about long linting or fix on save times.
- the setting `eslint.alwaysShowStatus` got removed since the status is now shown as a language status indicator.

### Version 2.3.0 - Pre-release

Expand Down
4 changes: 2 additions & 2 deletions client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,14 @@ export namespace ESLintClient {
let severity: LanguageStatusSeverity = LanguageStatusSeverity.Information;
const [timeTaken, text, message, warnTime, errorTime] = function(): [number, string, string, number, number] {
if (statusInfo.firstReport) {
return [-1, '', '', lintWarnTime, lintErrorTime];
return [-1, 'ESLint', '', lintWarnTime, lintErrorTime];
}
if ((statusInfo.fixTime ?? 0) > (statusInfo.validationTime ?? 0)) {
return [statusInfo.fixTime ?? 0, `ESLint [${statusInfo.fixTime}ms]`, `Computing fixes during save for file ${uri} during save took ${statusInfo.fixTime}ms`, saveAllWarnTime, saveAllErrorTime];
} else if ((statusInfo.validationTime ?? 0) > 0) {
return [statusInfo.validationTime ?? 0, `ESLint [${statusInfo.validationTime}ms]`, `Linting file ${uri} took ${statusInfo.validationTime}ms`, lintWarnTime, lintErrorTime];
}
return [-1, '', '', lintWarnTime, lintErrorTime];
return [-1, 'ESLint', '', lintWarnTime, lintErrorTime];
}();

switch (statusInfo.state) {
Expand Down
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
"default": "npm",
"description": "The package manager you use to install node modules."
},
"eslint.alwaysShowStatus": {
"type": "boolean",
"default": false,
"description": "Always show the ESlint status bar item.",
"scope": "window"
},
"eslint.problems.shortenToSingleLine": {
"type": "boolean",
"default": false,
Expand Down