Skip to content

Commit 68164cc

Browse files
[npm] deprecated npm package
1 parent 8085d0f commit 68164cc

File tree

7 files changed

+8
-119
lines changed

7 files changed

+8
-119
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.vscode
22
target
3-
Cargo.lock
4-
npm-package/src/bin
3+
Cargo.lock

npm-package/package.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

npm-package/src/bin-wrapper.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

npm-package/src/install.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

vscode-ext/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "next-css-lint",
33
"displayName": "Next.Js CSS linter",
44
"description": "Displaying unused CSS classes in Next.Js projects",
5-
"version": "1.7.1",
5+
"version": "1.7.2",
66
"license": "MIT",
77
"repository": "https://github.com/Andcool-Systems/css-linter",
88
"author": {

vscode-ext/src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export function activate(context: vscode.ExtensionContext) {
2525
console.error(`[CSS-linter][ERROR]: ${error || stderr}`);
2626
return;
2727
}
28-
29-
console.log(stdout);
28+
console.info(`[CSS-linter][INFO]: ${stdout}`);
3029

3130
diagnosticCollection.clear();
3231
const error_lines = stdout.split('\n');
@@ -55,6 +54,8 @@ export function activate(context: vscode.ExtensionContext) {
5554
vscode.DiagnosticSeverity.Warning
5655
);
5756

57+
diagnostic.source = 'next-css-linter';
58+
5859
const diagnostics = diagnosticsMap.get(filePath) || [];
5960
diagnostics.push(diagnostic);
6061
diagnosticsMap.set(filePath, diagnostics);

vscode-ext/src/installer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const binaries: { [key: string]: string } = {
99
darwin: 'css-linter-macos',
1010
win32: 'css-linter-win.exe'
1111
};
12+
1213
const remote_repo = 'Andcool-Systems/css-linter';
1314
const url = `https://github.com/${remote_repo}/releases/latest/download`;
1415
const version_api_url = `https://api.github.com/repos/${remote_repo}/releases/latest`;
@@ -23,10 +24,10 @@ const getLatestVer = async (): Promise<string> => {
2324
return response.data.tag_name;
2425
};
2526

26-
const getCurrVer = (exec_path: string): Promise<string> =>
27+
const getCurrVer = async (exec_path: string): Promise<string> =>
2728
new Promise((resolve, reject) => {
2829
exec(`${exec_path} -v`, (error, stdout, stderr) => {
29-
if (error || stderr) reject(error || stderr);
30+
if (error || stderr) reject(error?.message || stderr);
3031
resolve(stdout.trim());
3132
});
3233
});
@@ -60,7 +61,6 @@ export const install = async () => {
6061
const exec_path = path.join(homedir, '.css-linter', binary);
6162
if (!existsSync(exec_path)) {
6263
mkdirSync(path.join(homedir, '.css-linter'), { recursive: true });
63-
6464
await download(bin_url, exec_path);
6565
} else {
6666
const current_ver = await getCurrVer(exec_path);

0 commit comments

Comments
 (0)