Skip to content

Commit

Permalink
Upgrade @1password/eslint-config and @typescript-eslint/eslint-plugin…
Browse files Browse the repository at this point in the history
…, add eslint, remove eslint-plugin-jsdoc eslint-plugin-prettier eslint-plugin-sonarjs eslint-plugin-unicorn
  • Loading branch information
jodyheavener committed May 21, 2024
1 parent 05bb1d5 commit 39c927b
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 991 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"extends": [
"@1password"
],
"extends": "@1password/eslint-config",
"overrides": [
{
"files": [
Expand All @@ -16,10 +14,13 @@
"unicorn/prefer-node-protocol": "off",
"no-shadow": "off",
"unicorn/filename-case": "off",
"unicorn/no-object-as-default-parameter": "off",
"jsdoc/require-jsdoc": "off",
"import/order": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/naming-convention": [
"warn",
{
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,18 @@
"yaml-ast-parser": "^0.0.43"
},
"devDependencies": {
"@1password/eslint-config": "^1.0.0",
"@1password/eslint-config": "^4.3.0",
"@1password/prettier-config": "^1.1.3",
"@types/jest": "^27.4.1",
"@types/json-to-ast": "^2.1.2",
"@types/node": "20.8.6",
"@types/uuid": "^9.0.1",
"@types/vscode": "^1.66.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"cross-env": "^7.0.3",
"esbuild": "^0.21.3",
"esbuild-register": "^3.5.0",
"eslint-plugin-jsdoc": "^46.2.6",
"eslint-plugin-no-unsanitized": "^4.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-unicorn": "^40.1.0",
"eslint": "^8.57.0",
"fishery": "^2.2.2",
"husky": "^9.0.11",
"jest": "^27.5.1",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createErrorHandler =
};

export class CLI {
valid = false;
public valid = false;

public constructor() {
setClientInfo({
Expand Down
1 change: 1 addition & 0 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Config {
);
}

/* eslint-disable-next-line @typescript-eslint/naming-convention */
private _onDidChange = new EventEmitter<ConfigurationChangeEvent>();
public get onDidChange(): Event<ConfigurationChangeEvent> {
return this._onDidChange.event;
Expand Down
2 changes: 1 addition & 1 deletion src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { provideDocumentLinks } from "./language-providers/document-link";
import { provideHover } from "./language-providers/hover";

export class Editor {
subscriptions: Disposable[] = [];
private subscriptions: Disposable[] = [];

public constructor(private core: Core) {
this.configure();
Expand Down
2 changes: 1 addition & 1 deletion src/injection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { COMMANDS, EXTENSION_ID, REGEXP } from "./constants";
import type { Core } from "./core";

export class Injection {
activeDocument: TextDocument;
private activeDocument: TextDocument;

public constructor(private core: Core) {
this.core.context.subscriptions.push(
Expand Down
6 changes: 3 additions & 3 deletions src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { COMMANDS, DEBUG, STATE } from "./constants";
import type { Core } from "./core";

export class Setup {
accountUuid?: string;
accountUrl?: string;
vaultId?: string;
public accountUuid?: string;
public accountUrl?: string;
public vaultId?: string;

public constructor(private core: Core) {
this.core.context.subscriptions.push(
Expand Down
1 change: 0 additions & 1 deletion src/url-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const createInternalUrl = (

export const createOpenOPHandler =
(core: InstanceType<typeof Core>) =>
// eslint-disable-next-line unicorn/no-object-as-default-parameter
async ({ action, ...args }: { action: AppAction | "" } = { action: "" }) => {
const url = new URL(`onepassword://${action}`);

Expand Down
Loading

0 comments on commit 39c927b

Please sign in to comment.