Skip to content

Commit

Permalink
Tweaks to ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Feb 19, 2025
1 parent 69e203d commit 914737c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default tseslint.config(

rules: {
eqeqeq: ["error", "always", { null: "ignore" }],
quotes: ["error", "single", "avoid-escape"],
"object-shorthand": "error",

"@typescript-eslint/consistent-type-imports": "error",
Expand Down Expand Up @@ -63,7 +62,7 @@ export default tseslint.config(
rules: {
//"@typescript-eslint/no-empty-function": "off",
//"@typescript-eslint/no-inferrable-types": "off",
//"@typescript-eslint/no-non-null-assertion": "off", // Because we have a custom no-restricted-syntax rule for this
"@typescript-eslint/no-non-null-assertion": "off",
//"no-constant-condition": "off",
//"@typescript-eslint/consistent-type-definitions": "off",
//"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
Expand All @@ -76,7 +75,7 @@ export default tseslint.config(

// Relax ESLint a bit in tests
rules: {
//"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
//"@typescript-eslint/no-deprecated": "off",
//"@typescript-eslint/no-explicit-any": "off",
//"@typescript-eslint/no-unsafe-argument": "off",
Expand Down
4 changes: 2 additions & 2 deletions test/builtins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function predicate(): fc.Arbitrary<(a: unknown) => boolean> {
return fc.oneof(
fc.constant(() => true),
fc.constant(() => false),
fc.constant((a: unknown) => (JSON.stringify(a) ?? "").length > 10),
fc.constant((a: unknown) => (JSON.stringify(a) ?? "").length !== 0),
fc.constant((a: unknown) => JSON.stringify(a ?? "0").length > 10),
fc.constant((a: unknown) => JSON.stringify(a ?? "0").length !== 0),
fc.constant((a: unknown) => typeof a === "number"),
fc.constant((a: unknown) => typeof a === "string"),
fc.constant((a: unknown) => typeof a === "object"),
Expand Down

0 comments on commit 914737c

Please sign in to comment.