diff --git a/src/services/codefixes/fixes.ts b/src/services/codefixes/fixes.ts
index 50a0afd3925..e16a7d2d8bf 100644
--- a/src/services/codefixes/fixes.ts
+++ b/src/services/codefixes/fixes.ts
@@ -1,11 +1,14 @@
+// Fixes higher in this list will be first in the array returned by `getCodeFixesAtPosition`.
+
///
///
///
///
///
///
-///
+///
///
+///
///
///
///
@@ -15,7 +18,6 @@
///
///
///
-///
///
///
///
diff --git a/tests/cases/fourslash/codeFixSpelling3.ts b/tests/cases/fourslash/codeFixSpelling3.ts
index 4294e6e44df..6abb8b80e96 100644
--- a/tests/cases/fourslash/codeFixSpelling3.ts
+++ b/tests/cases/fourslash/codeFixSpelling3.ts
@@ -12,4 +12,4 @@ verify.rangeAfterCodeFix(`class C {
doStuff() {
this.state;
}
-}`, /*includeWhiteSpace*/false, /*errorCode*/ undefined, /*index*/ 2);
+}`, /*includeWhiteSpace*/false, /*errorCode*/ undefined, /*index*/ 0);
diff --git a/tests/cases/fourslash/codeFixSpellingVsImport.ts b/tests/cases/fourslash/codeFixSpellingVsImport.ts
new file mode 100644
index 00000000000..20374a19253
--- /dev/null
+++ b/tests/cases/fourslash/codeFixSpellingVsImport.ts
@@ -0,0 +1,16 @@
+///
+
+// Tests that the import fix is returned first.
+
+// @Filename: /a.ts
+////export const foo = 0;
+
+// @Filename: /b.ts
+////const foof = 0;
+////foo;
+
+goTo.file("/b.ts");
+verify.codeFixAvailable([
+ { description: `Import 'foo' from module "./a"` },
+ { description: "Change spelling to 'foof'" },
+]);
diff --git a/tests/cases/fourslash/codeFixSpellingVsMissingMember.ts b/tests/cases/fourslash/codeFixSpellingVsMissingMember.ts
new file mode 100644
index 00000000000..71fd41d5c7c
--- /dev/null
+++ b/tests/cases/fourslash/codeFixSpellingVsMissingMember.ts
@@ -0,0 +1,16 @@
+///
+
+// Tests that the spelling fix is returned first.
+
+////class C {
+//// foof: number;
+//// method() {
+//// this.foo = 10;
+//// }
+////}
+
+verify.codeFixAvailable([
+ { description: "Change spelling to 'foof'" },
+ { description: "Declare property \'foo\'" },
+ { description: "Add index signature for property 'foo'" },
+]);
diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts
index 0bd4ac3a879..cabf3a2d444 100644
--- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts
+++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts
@@ -48,7 +48,7 @@ verify.codeFix({
verify.codeFix({
description: "Declare static property 'prop2'",
- index: 0,
+ index: 1, // fix at index 0 is to change the spelling to 'prop1'
newRangeContent: `
static prop2: string;
static prop1: number;