Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module github.com/web-infra-dev/rslint
go 1.25.0

replace (
github.com/microsoft/typescript-go/shim/api => ./shim/api
github.com/microsoft/typescript-go/shim/api/encoder => ./shim/api/encoder
github.com/microsoft/typescript-go/shim/ast => ./shim/ast
github.com/microsoft/typescript-go/shim/bundled => ./shim/bundled
github.com/microsoft/typescript-go/shim/checker => ./shim/checker
Expand All @@ -18,13 +20,12 @@ replace (
github.com/microsoft/typescript-go/shim/vfs => ./shim/vfs
github.com/microsoft/typescript-go/shim/vfs/cachedvfs => ./shim/vfs/cachedvfs
github.com/microsoft/typescript-go/shim/vfs/osvfs => ./shim/vfs/osvfs
github.com/microsoft/typescript-go/shim/api => ./shim/api
github.com/microsoft/typescript-go/shim/api/encoder => ./shim/api/encoder
)

require (
github.com/bmatcuk/doublestar/v4 v4.9.1
github.com/fatih/color v1.18.0
github.com/microsoft/typescript-go/shim/api/encoder v0.0.0
github.com/microsoft/typescript-go/shim/ast v0.0.0
github.com/microsoft/typescript-go/shim/bundled v0.0.0
github.com/microsoft/typescript-go/shim/checker v0.0.0
Expand All @@ -40,8 +41,6 @@ require (
github.com/microsoft/typescript-go/shim/vfs v0.0.0
github.com/microsoft/typescript-go/shim/vfs/cachedvfs v0.0.0
github.com/microsoft/typescript-go/shim/vfs/osvfs v0.0.0
github.com/microsoft/typescript-go/shim/api v0.0.0
github.com/microsoft/typescript-go/shim/api/encoder v0.0.0
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a
golang.org/x/sync v0.16.0
golang.org/x/sys v0.35.0
Expand Down
2 changes: 2 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/bmatcuk/doublestar/v4"
"github.com/microsoft/typescript-go/shim/tspath"
importPlugin "github.com/web-infra-dev/rslint/internal/plugins/import"
"github.com/web-infra-dev/rslint/internal/plugins/import/rules/no_self_import"
"github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/adjacent_overload_signatures"
"github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/array_type"
"github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/await_thenable"
Expand Down Expand Up @@ -388,6 +389,7 @@ func registerAllTypeScriptEslintPluginRules() {
func registerAllEslintImportPluginRules() {
for _, rule := range importPlugin.GetAllRules() {
GlobalRuleRegistry.Register(rule.Name, rule)
GlobalRuleRegistry.Register("import/no-self-import", no_self_import.NoSelfImportRule)
}
}

Expand Down
11 changes: 11 additions & 0 deletions internal/rules/fixtures/fixtures.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package fixtures

import (
"path"
"runtime"
)

func GetRootDir() string {
_, filename, _, _ := runtime.Caller(0)
return path.Dir(filename)
}
11 changes: 11 additions & 0 deletions internal/rules/fixtures/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"jsx": "preserve",
"target": "esnext",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"lib": ["es2015", "es2017", "esnext", "DOM"],
"experimentalDecorators": true
}
}
57 changes: 57 additions & 0 deletions possible-problems-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
array-callback-return
constructor-super
for-direction
getter-return
no-async-promise-executor
no-await-in-loop
no-class-assign
no-compare-neg-zero
no-cond-assign
no-const-assign
no-constant-binary-expression
no-constant-condition
no-constructor-return
no-control-regex
no-debugger
no-dupe-args
no-dupe-class-members
no-dupe-else-if
no-dupe-keys
no-duplicate-case
no-duplicate-imports
no-empty-character-class
no-empty-pattern
no-ex-assign
no-fallthrough
no-func-assign
no-import-assign
no-inner-declarations
no-invalid-regexp
no-irregular-whitespace
no-loss-of-precision
no-misleading-character-class
no-new-native-nonconstructor
no-obj-calls
no-promise-executor-return
no-prototype-builtins
no-self-assign
no-self-compare
no-setter-return
no-sparse-arrays
no-template-curly-in-string
no-this-before-super
no-undef
no-unexpected-multiline
no-unmodified-loop-condition
no-unreachable
no-unreachable-loop
no-unsafe-finally
no-unsafe-negation
no-unsafe-optional-chaining
no-unused-private-class-members
no-use-before-define
no-useless-assignment
no-useless-backreference
require-atomic-updates
use-isnan
valid-typeof
4 changes: 3 additions & 1 deletion scripts/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,6 @@ autofix
autofixes
kebab
PascalCase
tmpl
tmpl
isnan
nonconstructor
1 change: 0 additions & 1 deletion scripts/register-rule.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bufio"
"flag"
"fmt"
"go/format"
Expand Down
Loading