Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
style(eslint): add unused-imports module to eslint (#60)
Browse files Browse the repository at this point in the history
* build(deps-dev): add eslint plugin for unused imports

* style(eslint): add unused import plugin to eslint

* style(eslint): remove unused imports
  • Loading branch information
frgfm authored Feb 28, 2024
1 parent 2fd1888 commit 838fe8c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
14 changes: 12 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "unused-imports"],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
"semi": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"eslint": "^8.41.0",
"eslint-plugin-unused-imports": "^3.1.0",
"glob": "^8.1.0",
"husky": "^9.0.6",
"lint-staged": "^15.2.0",
Expand Down
4 changes: 0 additions & 4 deletions src/util/quack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

import * as vscode from "vscode";
import axios, { AxiosResponse } from "axios";
import analyticsClient from "./analytics";
import { getExtensionVersion } from "../activation/environmentSetup";
import { getUniqueId } from "./vscode";
import { getGithubToken } from "./github";

let config = vscode.workspace.getConfiguration("api");

Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,18 @@ escape-string-regexp@^4.0.0:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==

eslint-plugin-unused-imports@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.1.0.tgz#db015b569d3774e17a482388c95c17bd303bc602"
integrity sha512-9l1YFCzXKkw1qtAru1RWUtG2EVDZY0a0eChKXcL+EZ5jitG7qxdctu4RnvhOJHv4xfmUf7h+JJPINlVpGhZMrw==
dependencies:
eslint-rule-composer "^0.3.0"

eslint-rule-composer@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==

[email protected], eslint-scope@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
Expand Down

0 comments on commit 838fe8c

Please sign in to comment.