Skip to content

Commit 403633d

Browse files
committed
feat!: Update ESLint peer dependency to >=8.56.0
1 parent 2fc0135 commit 403633d

17 files changed

+50
-44
lines changed

.eslintignore

-1
This file was deleted.

.eslintrc

-22
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ISC License
22

3-
Copyright (c) 2023, Mark Skelton
3+
Copyright (c) 2024, Mark Skelton
44

55
Permission to use, copy, modify, and/or distribute this software for any
66
purpose with or without fee is hereby granted, provided that the above

bun.lockb

-16 KB
Binary file not shown.

eslint.config.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
import globals from "globals"
3+
import eslint from "@eslint/js"
4+
import tseslint from "typescript-eslint"
5+
import prettier from "eslint-config-prettier"
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
...tseslint.configs.recommended,
10+
prettier,
11+
{
12+
ignores: ["dist/**"],
13+
},
14+
{
15+
languageOptions: {
16+
parserOptions: {
17+
ecmaVersion: 2018,
18+
},
19+
globals: {
20+
...globals.node,
21+
},
22+
},
23+
rules: {
24+
"@typescript-eslint/no-explicit-any": "off",
25+
"@typescript-eslint/no-non-null-assertion": "off",
26+
"@typescript-eslint/no-unused-vars": [
27+
"error",
28+
{ argsIgnorePattern: "^_" },
29+
],
30+
},
31+
}
32+
)

index.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
1+
// eslint-disable-next-line @typescript-eslint/no-require-imports
22
module.exports = require("./dist/index.cjs").default

package.json

+6-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsup ./src/index.ts --format cjs,esm",
2020
"format": "prettier --write .",
21-
"lint": "eslint . --ext .ts",
21+
"lint": "eslint .",
2222
"test": "vitest",
2323
"test:watch": "vitest --reporter=dot",
2424
"ts": "tsc"
@@ -38,31 +38,28 @@
3838
"index.d.ts"
3939
],
4040
"peerDependencies": {
41-
"eslint": ">=8"
41+
"eslint": ">=8.56.0"
4242
},
4343
"dependencies": {
44-
"@typescript-eslint/experimental-utils": "^5.54.1",
44+
"@typescript-eslint/utils": "^8.11.0",
4545
"isomorphic-resolve": "^1.0.0",
4646
"natural-compare": "^1.4.0"
4747
},
4848
"devDependencies": {
49-
"@babel/core": "^7.21.0",
5049
"@mskelton/semantic-release-config": "^1.0.1",
5150
"@mskelton/tsconfig": "^2.0.0",
5251
"@types/dedent": "^0.7.0",
53-
"@types/eslint": "^8.21.1",
54-
"@types/estree": "^1.0.0",
52+
"@types/estree": "^1.0.6",
5553
"@types/natural-compare": "^1.4.1",
56-
"@typescript-eslint/eslint-plugin": "^5.54.1",
57-
"@typescript-eslint/parser": "^5.54.1",
5854
"bun-types": "^1.0.1",
5955
"dedent": "^0.7.0",
6056
"eslint": "^8.36.0",
61-
"eslint-config-prettier": "^8.7.0",
57+
"eslint-config-prettier": "^8.10.0",
6258
"prettier": "^2.8.4",
6359
"semantic-release": "^23.0.2",
6460
"tsup": "^6.6.3",
6561
"typescript": "^4.9.5",
62+
"typescript-eslint": "^8.11.0",
6663
"vitest": "^0.29.2"
6764
}
6865
}

src/__tests__/string-enums.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from "@typescript-eslint/experimental-utils"
1+
import { TSESLint } from "@typescript-eslint/utils"
22
import rule from "../rules/string-enums.js"
33
import { createTsRuleTester } from "../test-utils.js"
44

src/__tests__/string-unions.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from "@typescript-eslint/experimental-utils"
1+
import { TSESLint } from "@typescript-eslint/utils"
22
import rule from "../rules/string-unions.js"
33
import { createTsRuleTester } from "../test-utils.js"
44

src/__tests__/type-properties.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from "@typescript-eslint/experimental-utils"
1+
import { TSESLint } from "@typescript-eslint/utils"
22
import rule from "../rules/type-properties.js"
33
import { createTsRuleTester } from "../test-utils.js"
44

src/resolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function isResolved(source: string) {
2121
resolve(source)
2222
resolveCache.set(source, true)
2323
return true
24-
} catch (e) {
24+
} catch {
2525
resolveCache.set(source, false)
2626
return false
2727
}

src/rules/imports.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Rule, AST } from "eslint"
2-
import { TSESTree } from "@typescript-eslint/experimental-utils"
2+
import { TSESTree } from "@typescript-eslint/utils"
33
import * as ESTree from "estree"
44
import { isResolved } from "../resolver.js"
55
import * as tsUtils from "../ts-utils.js"

src/rules/string-enums.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
ESLintUtils,
33
TSESLint,
44
TSESTree,
5-
} from "@typescript-eslint/experimental-utils"
5+
} from "@typescript-eslint/utils"
66
import { getNodeText } from "../ts-utils.js"
77
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"
88

src/rules/string-unions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
ESLintUtils,
33
TSESLint,
44
TSESTree,
5-
} from "@typescript-eslint/experimental-utils"
5+
} from "@typescript-eslint/utils"
66
import { getNodeText } from "../ts-utils.js"
77
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"
88

src/rules/type-properties.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
ESLintUtils,
44
TSESLint,
55
TSESTree,
6-
} from "@typescript-eslint/experimental-utils"
6+
} from "@typescript-eslint/utils"
77
import { getName, getNodeRange, getNodeText, isDelimiter } from "../ts-utils.js"
88
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"
99

src/test-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ESLintUtils } from "@typescript-eslint/experimental-utils"
1+
import { ESLintUtils } from "@typescript-eslint/utils"
22
import { RuleTester } from "eslint"
33
import { it, describe } from "vitest"
44

src/ts-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
AST_NODE_TYPES,
33
TSESLint,
44
TSESTree,
5-
} from "@typescript-eslint/experimental-utils"
5+
} from "@typescript-eslint/utils"
66
import { getTextRange } from "./utils.js"
77

88
/**

0 commit comments

Comments
 (0)