Skip to content

Commit 5b33bbd

Browse files
committed
fix: don't overwrite the user's config
1 parent 663b19e commit 5b33bbd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/typescript.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ export function setupTypeScript() {
77
// activate atom-typescript
88
atom.commands.dispatch(atom.workspace.getElement(), "typescript:activate")
99
// support flow in JavaScript files
10-
atom.config.set("atom-typescript.ignoredDiagnosticCodes", ["8002", "8003", "8004", "8006", "8008", "8010"])
10+
const ignoredDiagnosticCodes = Array.from(
11+
new Set(
12+
atom.config.get("atom-typescript.ignoredDiagnosticCodes").concat(["8002", "8003", "8004", "8006", "8008", "8010"])
13+
)
14+
)
15+
atom.config.set("atom-typescript.ignoredDiagnosticCodes", ignoredDiagnosticCodes)
1116
}
1217

1318
/*

0 commit comments

Comments
 (0)