Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3b013f4
FileConventions(.Test): unacceptable TS red test
knocte Apr 15, 2026
01382d2
FileConventions: make last test pass
knocte Apr 15, 2026
1da25e1
FileConventions.Test: 2nd test for Unacc TS
knocte Apr 15, 2026
6dc4619
FileConventions.Test: 3rd test for UnaccTS
knocte Apr 15, 2026
bfb2480
FileConventions: make last test pass
knocte Apr 15, 2026
b41e3cb
FileConventions.Test: new UnaccTS test
knocte Apr 15, 2026
4b33fd1
FileConventions: make last test pass
knocte Apr 15, 2026
180ca9a
FileConventions.Test: new test for UnaccTS
knocte Apr 15, 2026
747c0ed
FileConventions: make last test pass
knocte Apr 15, 2026
0556ac8
FileConventions.Test: new test for UnaccTS
knocte Apr 15, 2026
177fd9d
FileConventions: make last test pass
knocte Apr 16, 2026
7f245cd
FileConvention.Test: new UnaccTS test
knocte Apr 17, 2026
2407389
FileConventions: make last test pass
knocte Apr 17, 2026
604fd8a
FileConv.Test: multi-line comment in single-line
knocte Apr 17, 2026
e5cffae
FileConventions: make last test pass
knocte Apr 17, 2026
9a32870
FileConv.Test: another multi-line comment test
knocte Apr 17, 2026
f009ab8
FileConv.Test: 2 multi-line tests
knocte Apr 17, 2026
5eddc03
FileConventions: make last tests pass
knocte May 25, 2026
a93e3c3
CI,.fantomasignore: bring workaround from CI
knocte May 25, 2026
14044d9
FileConv.Tests: add eslint test for TS
knocte May 25, 2026
8164f78
FileConventions: make last test pass
knocte May 25, 2026
0fbf7d4
FileConv.Test: add failing test for delete (TS)
knocte May 25, 2026
7668214
FileConv: make last test pass (delete, TS)
knocte May 25, 2026
07d32e7
FileConventions: new failing test for UnaccTS
knocte May 28, 2026
a6078ab
FileConventions: make last test pass
knocte May 28, 2026
cf52351
scripts,CI: add script that finds unacceptable TS
knocte May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fantomasignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ jobs:
run: dotnet fsi scripts/inconsistentNugetVersionsInFSharpScripts.fsx
- name: Check there are no non-verbose flags in scripts and CI YML files
run: dotnet fsi scripts/nonVerboseFlagsInGitHubCIAndScripts.fsx
- name: Check there is no unacceptable TypeScript keywords in .ts files
run: dotnet fsi scripts/unacceptableTypeScript.fsx
- name: Sanity check nuget packages of .NET projects
run: |
dotnet restore
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/FileConventions.Test/DummyFiles/*
2 changes: 1 addition & 1 deletion scripts/eofConvention.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System.IO
open System

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Helpers.fs"
#load "../src/FileConventions/Library.fs"

Expand Down
1 change: 1 addition & 0 deletions scripts/executableConvention.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"
#load "../src/FileConventions/Library.fs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ open System.IO

#r "nuget: Fsdk, Version=0.9.99--date20260525-0605.git-a5cfc39"
#r "nuget: Microsoft.Build, Version=17.8.43"
#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

Expand Down
2 changes: 1 addition & 1 deletion scripts/inconsistentNugetVersionsInFSharpScripts.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System.IO
open System.Linq

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
2 changes: 1 addition & 1 deletion scripts/inconsistentVersionsInGitHubCI.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
2 changes: 1 addition & 1 deletion scripts/mixedLineEndings.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
2 changes: 1 addition & 1 deletion scripts/nonVerboseFlagsInGitHubCIAndScripts.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
2 changes: 1 addition & 1 deletion scripts/shebangConvention.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
28 changes: 28 additions & 0 deletions scripts/unacceptableTypeScript.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env -S dotnet fsi

open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"
#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo

let validExtensions = seq { ".ts" }

let invalidFiles =
validExtensions
|> Seq.collect(fun ext ->
Helpers.GetInvalidFiles
rootDir
("*" + ext)
FileConventions.ContainsUnacceptableTypeScript
)

let message =
"Please don't use unacceptable TypeScript keywords (e.g. 'any') in the following files:"

Helpers.AssertNoInvalidFiles invalidFiles message
2 changes: 1 addition & 1 deletion scripts/unpinnedDotnetToolInstallVersions.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
2 changes: 1 addition & 1 deletion scripts/unpinnedGitHubActionsImageVersions.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
open System
open System.IO

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

#load "../src/FileConventions/Library.fs"
#load "../src/FileConventions/Helpers.fs"

Expand Down
1 change: 1 addition & 0 deletions scripts/wrapLatestCommitMsg.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ open System
open System.Text.RegularExpressions
open System.Linq

#r "nuget: FSharpx.Collections, Version=3.1.0"
#r "nuget: Mono.Unix, Version=7.1.0-final.1.21458.1"
#r "nuget: YamlDotNet, Version=16.1.3"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
const message: any = "Hello, World!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
const message: /* hehe */ any = "Hello, World!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const obj: { a?: number } = { a: 1 };
delete obj.a;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const message: string = "Hello, World!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint @typescript-eslint/no-explicit-any: "off" */
const message: any = "Hello, World!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const message: any = "Hello, World!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const anythingToSay: string = "Hello, World!";
console.log(anythingToSay);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const message: string = "Hello, any world!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const message: string = "Hello, world!" + "any time!";
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const message: string = 'time any!';
console.log(message);
const message2: string = `any time!`;
console.log(message2);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const message: string = 'hello world!'; // any time!
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const message: string = 'hello world!'; /* any time! */
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const message: string = 'hello world!'; /*
any time */
console.log(message);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const message: string = `foo
any time`;
console.log(message);
const message2: string = 'bar\
any time';
console.log(message2);
Loading
Loading