Skip to content

Commit

Permalink
feat!: Update ESLint peer dependency to >=8.56.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Oct 23, 2024
1 parent 2fc0135 commit 403633d
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 44 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ISC License

Copyright (c) 2023, Mark Skelton
Copyright (c) 2024, Mark Skelton

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
Binary file modified bun.lockb
Binary file not shown.
32 changes: 32 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-check
import globals from "globals"
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import prettier from "eslint-config-prettier"

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
ignores: ["dist/**"],
},
{
languageOptions: {
parserOptions: {
ecmaVersion: 2018,
},
globals: {
...globals.node,
},
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
}
)
2 changes: 1 addition & 1 deletion index.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("./dist/index.cjs").default
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"scripts": {
"build": "tsup ./src/index.ts --format cjs,esm",
"format": "prettier --write .",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"test": "vitest",
"test:watch": "vitest --reporter=dot",
"ts": "tsc"
Expand All @@ -38,31 +38,28 @@
"index.d.ts"
],
"peerDependencies": {
"eslint": ">=8"
"eslint": ">=8.56.0"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^5.54.1",
"@typescript-eslint/utils": "^8.11.0",
"isomorphic-resolve": "^1.0.0",
"natural-compare": "^1.4.0"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@mskelton/semantic-release-config": "^1.0.1",
"@mskelton/tsconfig": "^2.0.0",
"@types/dedent": "^0.7.0",
"@types/eslint": "^8.21.1",
"@types/estree": "^1.0.0",
"@types/estree": "^1.0.6",
"@types/natural-compare": "^1.4.1",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"bun-types": "^1.0.1",
"dedent": "^0.7.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-prettier": "^8.10.0",
"prettier": "^2.8.4",
"semantic-release": "^23.0.2",
"tsup": "^6.6.3",
"typescript": "^4.9.5",
"typescript-eslint": "^8.11.0",
"vitest": "^0.29.2"
}
}
2 changes: 1 addition & 1 deletion src/__tests__/string-enums.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSESLint } from "@typescript-eslint/experimental-utils"
import { TSESLint } from "@typescript-eslint/utils"
import rule from "../rules/string-enums.js"
import { createTsRuleTester } from "../test-utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/string-unions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSESLint } from "@typescript-eslint/experimental-utils"
import { TSESLint } from "@typescript-eslint/utils"
import rule from "../rules/string-unions.js"
import { createTsRuleTester } from "../test-utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/type-properties.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSESLint } from "@typescript-eslint/experimental-utils"
import { TSESLint } from "@typescript-eslint/utils"
import rule from "../rules/type-properties.js"
import { createTsRuleTester } from "../test-utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function isResolved(source: string) {
resolve(source)
resolveCache.set(source, true)
return true
} catch (e) {
} catch {
resolveCache.set(source, false)
return false
}
Expand Down
2 changes: 1 addition & 1 deletion src/rules/imports.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Rule, AST } from "eslint"
import { TSESTree } from "@typescript-eslint/experimental-utils"
import { TSESTree } from "@typescript-eslint/utils"
import * as ESTree from "estree"
import { isResolved } from "../resolver.js"
import * as tsUtils from "../ts-utils.js"
Expand Down
2 changes: 1 addition & 1 deletion src/rules/string-enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ESLintUtils,
TSESLint,
TSESTree,
} from "@typescript-eslint/experimental-utils"
} from "@typescript-eslint/utils"
import { getNodeText } from "../ts-utils.js"
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/rules/string-unions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ESLintUtils,
TSESLint,
TSESTree,
} from "@typescript-eslint/experimental-utils"
} from "@typescript-eslint/utils"
import { getNodeText } from "../ts-utils.js"
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/rules/type-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ESLintUtils,
TSESLint,
TSESTree,
} from "@typescript-eslint/experimental-utils"
} from "@typescript-eslint/utils"
import { getName, getNodeRange, getNodeText, isDelimiter } from "../ts-utils.js"
import { docsURL, enumerate, getSorter, isUnsorted } from "../utils.js"

Expand Down
2 changes: 1 addition & 1 deletion src/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ESLintUtils } from "@typescript-eslint/experimental-utils"
import { ESLintUtils } from "@typescript-eslint/utils"
import { RuleTester } from "eslint"
import { it, describe } from "vitest"

Expand Down
2 changes: 1 addition & 1 deletion src/ts-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
AST_NODE_TYPES,
TSESLint,
TSESTree,
} from "@typescript-eslint/experimental-utils"
} from "@typescript-eslint/utils"
import { getTextRange } from "./utils.js"

/**
Expand Down

0 comments on commit 403633d

Please sign in to comment.