Skip to content

TypeScript rewrite #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 152 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
3157696
First steps towards TypeScript conversion
ExplodingCabbage Feb 28, 2025
0e25a14
Convert xml.js->xml.ts
ExplodingCabbage Mar 7, 2025
0262a2e
Add compilation to build step
ExplodingCabbage Mar 7, 2025
5aaa633
Rewrite base.js in TypeScript (maybe shit, need to review own work on…
ExplodingCabbage Mar 9, 2025
cfafa10
Rewrite json.js -> json.ts and get tests passing (I'm honestly shocke…
ExplodingCabbage Mar 10, 2025
2ac1627
array.js -> array.ts
ExplodingCabbage Mar 10, 2025
f4f7880
character.js -> character.ts
ExplodingCabbage Mar 10, 2025
2317d9c
css.js->css.ts
ExplodingCabbage Mar 10, 2025
4bd69ee
sentence.js->sentence.ts
ExplodingCabbage Mar 10, 2025
9b4fc4f
word.js -> word.ts
ExplodingCabbage Mar 10, 2025
cb03e0a
line.js -> line.ts
ExplodingCabbage Mar 10, 2025
90cbe7b
index.js->index.ts
ExplodingCabbage Mar 10, 2025
56cce5c
Convert a couple more fiiles
ExplodingCabbage Mar 10, 2025
143706b
Convert params.ts
ExplodingCabbage Mar 10, 2025
4cb52b4
string.js -> string.ts
ExplodingCabbage Mar 10, 2025
5ad83c6
Partly convert patch-related files to TypeScript; more to do
ExplodingCabbage Mar 10, 2025
2dd993e
Type more stuff
ExplodingCabbage Mar 11, 2025
88838c9
Begin converting line-endings.js. Interesting TypeScript bug along th…
ExplodingCabbage Mar 11, 2025
7e0d68b
Bump TypeScript
ExplodingCabbage Mar 11, 2025
bbe9520
Add link to bug report
ExplodingCabbage Mar 11, 2025
a21648e
Finish converted line-endings.js to TypeScript
ExplodingCabbage Mar 12, 2025
4b3691a
Add missing overloads to support case where argument type isn't known…
ExplodingCabbage Mar 12, 2025
88a5513
reverse.js -> reverse.ts
ExplodingCabbage Mar 12, 2025
72bc4dc
add todo
ExplodingCabbage Mar 12, 2025
c62827e
Rewrite base.ts types (breaks everything for now)
ExplodingCabbage Mar 12, 2025
be36cc0
Per-diff-function options types. Still not compiling but close.
ExplodingCabbage Mar 12, 2025
268e96b
Fix build
ExplodingCabbage Mar 14, 2025
0be74a5
Merge remote-tracking branch 'origin/master' into add-typescript
ExplodingCabbage Mar 14, 2025
f0cfaf6
Run 'yarn add @eslint/js typescript-eslint --save-dev' as suggested a…
ExplodingCabbage Mar 14, 2025
38faa69
Turn on recommended eslint rules as recommended by Getting Started gu…
ExplodingCabbage Mar 14, 2025
3de3195
Get linting of TypeScript working (now with the officially recommende…
ExplodingCabbage Mar 14, 2025
3714370
yarn lint --fix
ExplodingCabbage Mar 14, 2025
457e40a
Tweak some indentation that eslint broke
ExplodingCabbage Mar 14, 2025
2f07bc3
Fix a couple of linting errors
ExplodingCabbage Mar 14, 2025
9c865af
Allow explicit 'any'
ExplodingCabbage Mar 14, 2025
7a13d9f
Eliminate needless explicit respecification of rules that eslint.conf…
ExplodingCabbage Mar 14, 2025
1b6cf7e
Fix another eslint config bug
ExplodingCabbage Mar 14, 2025
4809714
Start using arrow functions and thereby resolve a https://typescript-…
ExplodingCabbage Mar 14, 2025
fa3cb01
Fix some linting errors about pointless escape sequences
ExplodingCabbage Mar 14, 2025
36580d0
Fix more linting errors about pointless escape sequences
ExplodingCabbage Mar 14, 2025
9f93ce0
Eliminate a util made redundant by Object.keys, and fix a linting err…
ExplodingCabbage Mar 14, 2025
91885c8
Fix a no-prototype-builtins linting error
ExplodingCabbage Mar 14, 2025
5e6adc7
Disable no-use-before-define for TypeScript code, where it's broken
ExplodingCabbage Mar 14, 2025
3fe6e57
Liberalise more rules
ExplodingCabbage Mar 14, 2025
ed5aaa0
Fix lint errors in parse.ts
ExplodingCabbage Mar 14, 2025
3a52b9e
Fix lint errors in apply.ts
ExplodingCabbage Mar 14, 2025
173bc03
Fix remaining linting errors
ExplodingCabbage Mar 14, 2025
5688499
Add missing newline at EOF
ExplodingCabbage Mar 17, 2025
0cf1dbd
Remove a couple of unused ts-expect-error directives. (My editor was …
ExplodingCabbage Mar 17, 2025
b9ea31f
create.js->create.ts
ExplodingCabbage Mar 17, 2025
27023aa
Fix some linting errors
ExplodingCabbage Mar 17, 2025
00fcf4b
Merge branch 'master' into add-typescript
ExplodingCabbage Mar 17, 2025
811b746
Merge branch 'master' into add-typescript
ExplodingCabbage Mar 17, 2025
b16b1df
Lint on build, like before
ExplodingCabbage Mar 17, 2025
9cda2b5
Generate type declarations on build
ExplodingCabbage Mar 18, 2025
47b55cc
Merge remote-tracking branch 'origin/master' into add-typescript
ExplodingCabbage Mar 18, 2025
12c553e
Migrate to using tsconfig.json instead of CLI args
ExplodingCabbage Mar 18, 2025
cc088d5
Start adding tsd tests... but actually maybe should use dtslint?
ExplodingCabbage Mar 18, 2025
d97cc58
Correctly mark a load of arguments as optional
ExplodingCabbage Mar 19, 2025
f10133e
convert tests to tsd style
ExplodingCabbage Mar 19, 2025
52559a3
Fix type test
ExplodingCabbage Mar 19, 2025
ce74623
Fix some more type test things
ExplodingCabbage Mar 19, 2025
4584dfb
Undo some testing silliness
ExplodingCabbage Mar 19, 2025
ddb99ec
aaaaaaaaaaargh
ExplodingCabbage Mar 19, 2025
9db441a
Get most of the way to fixing type definitions based on https://githu…
ExplodingCabbage Mar 28, 2025
e17b4c2
Fix index.ts
ExplodingCabbage Apr 1, 2025
1e0200e
Fix remaining compilation errors
ExplodingCabbage Apr 1, 2025
f26bd1a
Restore 'Change' type from DefinitelyTyped
ExplodingCabbage Apr 1, 2025
87de9bf
tsd test syntax fix
ExplodingCabbage Apr 1, 2025
0da807a
Fix: oldHeader & newHeader are allowed to be explicitly given as unde…
ExplodingCabbage Apr 1, 2025
90ca769
Fix 'Abortable' types in patch/create
ExplodingCabbage Apr 1, 2025
e5daedb
Fix another typing error
ExplodingCabbage Apr 1, 2025
416388e
Fix error-handling-related types in patch/apply
ExplodingCabbage Apr 1, 2025
af16b40
Analyse errors I'm seeing in tests copied from DT & add TODOs
ExplodingCabbage Apr 1, 2025
ef8cc08
Begin adding some docs
ExplodingCabbage Apr 1, 2025
b0dde34
Fix a load of test cases where the DT behaviour was just wrong
ExplodingCabbage Apr 1, 2025
830e8b4
Make diffArrays generic instead of using any
ExplodingCabbage Apr 2, 2025
3cb305f
Make DiffArraysOptions types generic
ExplodingCabbage Apr 2, 2025
48f6f77
Rename ParsedDiff -> StructuredPatch
ExplodingCabbage Apr 2, 2025
9b45e37
Export ApplyPatchOptions, ApplyPatchesOptions
ExplodingCabbage Apr 2, 2025
52e8002
Make all methods public for backwards compat
ExplodingCabbage Apr 2, 2025
ecea629
Fix remaining type error
ExplodingCabbage Apr 2, 2025
5227872
Fix ignoring of test-d
ExplodingCabbage Apr 2, 2025
8f1a313
Copy latest change from DT (https://github.com/DefinitelyTyped/Defini…
ExplodingCabbage Apr 2, 2025
04c07e0
Flesh out docs
ExplodingCabbage Apr 2, 2025
e71d0a3
Resolve ignoreWhitespace dilemma
ExplodingCabbage Apr 2, 2025
96f3dce
nah
ExplodingCabbage Apr 2, 2025
f312f7e
Remove obsolete TODOs
ExplodingCabbage Apr 2, 2025
06a3c48
Fix bad .gitignore rule
ExplodingCabbage Apr 2, 2025
bc0b794
Add another type test file
ExplodingCabbage Apr 2, 2025
e80f324
v0.0.1
ExplodingCabbage Apr 4, 2025
e66ce84
v0.0.2
ExplodingCabbage Apr 4, 2025
fe02244
.npmignore more stuff
ExplodingCabbage Apr 4, 2025
ef8b1e4
Move test-d/ out of types/ so yarn clean won't delete it
ExplodingCabbage Apr 4, 2025
967fc15
Add attw
ExplodingCabbage Apr 4, 2025
3a26b69
durrrr
ExplodingCabbage Apr 4, 2025
836056b
failed fix attempt
ExplodingCabbage Apr 4, 2025
14d6610
Get attw passing (hallelujah!)
ExplodingCabbage Apr 7, 2025
c628619
Enable "strict": true
ExplodingCabbage Apr 7, 2025
e737e50
Fix a strict mode error
ExplodingCabbage Apr 7, 2025
892c450
Fix a strict mode error
ExplodingCabbage Apr 7, 2025
0639ed8
Fix more strict mode errors
ExplodingCabbage Apr 7, 2025
2f5e15a
Silence a silly strict mode error
ExplodingCabbage Apr 7, 2025
3b369f7
Further placate strict mode
ExplodingCabbage Apr 7, 2025
298654b
Further placate strict mode
ExplodingCabbage Apr 7, 2025
89f8f86
Fix a legit type error that strict mode found
ExplodingCabbage Apr 7, 2025
d9eb888
Merge branch 'master' into add-typescript
ExplodingCabbage Apr 7, 2025
031450c
Further placate strict mode
ExplodingCabbage Apr 7, 2025
4ffca31
Get TypeScript happy with create.ts
ExplodingCabbage Apr 7, 2025
b782edd
Further placate strict mode
ExplodingCabbage Apr 7, 2025
297fbfd
Further placate strict mode
ExplodingCabbage Apr 7, 2025
3e614d6
Placate compiler about apply.ts
ExplodingCabbage Apr 7, 2025
27234cb
Fix a load more strict mode errors
ExplodingCabbage Apr 7, 2025
6a526f7
Placate strict mode further
ExplodingCabbage Apr 7, 2025
d734b59
Merge branch 'master' into add-typescript
ExplodingCabbage Apr 7, 2025
770718c
Merge remote-tracking branch 'origin/master' into add-typescript
ExplodingCabbage Apr 7, 2025
3433cb7
Fix some more compilation errors
ExplodingCabbage Apr 7, 2025
23d561e
Fix one more compilation error
ExplodingCabbage Apr 7, 2025
64d2c54
Fix remaining base.ts errors
ExplodingCabbage Apr 7, 2025
2fb9180
Fix line.ts
ExplodingCabbage Apr 7, 2025
6865260
Type a variable to remove a slew of compilation errors
ExplodingCabbage Apr 7, 2025
9e8d869
Add more types to resolve more errors
ExplodingCabbage Apr 7, 2025
4929698
Add even more types to resolve even more errors
ExplodingCabbage Apr 7, 2025
fe4015f
Fix remaining type errors. Huzzah!!!
ExplodingCabbage Apr 7, 2025
3deafc3
Address verbatimModuleSyntax guidance
ExplodingCabbage Apr 7, 2025
f740326
Remove obsolete comment
ExplodingCabbage Apr 7, 2025
2e7d690
Get @typescript-eslint/consistent-type-exports enabled
ExplodingCabbage Apr 7, 2025
9b3adaa
Un-disable no-duplicate-type-constituents and let it autofix. I guess…
ExplodingCabbage Apr 8, 2025
44a4ee6
Reenable another rule
ExplodingCabbage Apr 9, 2025
e5dee6b
Remove no-longer-needed gitignore rule from earlier in this PR
ExplodingCabbage Apr 9, 2025
cead6a7
Remove an obsolete disabling of a rule from early in my eslint tinker…
ExplodingCabbage Apr 9, 2025
a7ed5ca
Fix deps being wrongly declared as non-dev deps
ExplodingCabbage Apr 9, 2025
aa78695
Bump new deps to latest
ExplodingCabbage Apr 9, 2025
3092635
Re-add support for imports from /lib/, maybe?
ExplodingCabbage Apr 10, 2025
a43c5cf
Restore support for subpath imports in Node 12.19 and earlier (see ht…
ExplodingCabbage Apr 11, 2025
74c1ba4
Restore es5 support
ExplodingCabbage Apr 11, 2025
6faead8
Improve docs; add more exports to obviate need to import stuff from lib/
ExplodingCabbage Apr 11, 2025
bed132e
Fix rollup
ExplodingCabbage Apr 11, 2025
8c313a1
Improve docs; restore package.json top-level fields that maybe are us…
ExplodingCabbage Apr 11, 2025
19eb667
Stop using babel with rollup.
ExplodingCabbage Apr 11, 2025
33a2a71
Remove unused dependency on Babel CLI
ExplodingCabbage Apr 11, 2025
8530bcd
Remove another unused dep
ExplodingCabbage Apr 11, 2025
4c320a8
Get karma working
ExplodingCabbage Apr 11, 2025
292b6a6
Remove apparently unneeded eslint ignore directives
ExplodingCabbage Apr 11, 2025
658d195
Fix misplaced bullet in release notes
ExplodingCabbage Apr 11, 2025
f0dd179
bah
ExplodingCabbage Apr 11, 2025
310e7d7
Begin the tedious work of copying and pasting the README documentatio…
ExplodingCabbage Apr 11, 2025
9be3db7
More copying and pasting. I should probably test this before moving on
ExplodingCabbage Apr 11, 2025
c65abbf
More copying and pasting of docs
ExplodingCabbage Apr 11, 2025
68d7987
Finish pasting docs
ExplodingCabbage Apr 11, 2025
eb280e1
Revert temporary package name change
ExplodingCabbage Apr 11, 2025
f8b44a0
Hackily resolve the Intl.Segmenter issue
ExplodingCabbage Apr 11, 2025
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
coverage
node_modules
lib
libesm
libcjs
dist
yarn-error.log
.vscode
Expand Down
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.babelrc
.eslintrc
.eslint.config.mjs
.gitignore
.npmignore
.vscode
.nyc_output
test-d
components
coverage
examples
Expand All @@ -15,5 +16,6 @@ runtime.js
src
tasks
test
tsconfig.json
yarn-error.log
yarn.lock
104 changes: 68 additions & 36 deletions README.md

Large diffs are not rendered by default.

350 changes: 178 additions & 172 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,176 +1,182 @@
import globals from "globals";
import babelParser from "@babel/eslint-parser";

export default [
{
languageOptions: {
globals: {
...globals.browser,
},

parser: babelParser,
},

rules: {
// Possible Errors //
//-----------------//
"comma-dangle": [2, "never"],
"no-cond-assign": [2, "except-parens"],
"no-console": 1, // Allow for debugging
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 1, // Allow for debugging
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": [2, "functions"],
"no-extra-semi": 2,
"no-func-assign": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-unreachable": 1, // Optimizer and coverage will handle/highlight this and can be useful for debugging
"use-isnan": 2,
"valid-typeof": 2,

// Best Practices //
//----------------//
curly: 2,
"default-case": 1,

"dot-notation": [2, {
allowKeywords: false,
}],

"guard-for-in": 1,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 1,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-multi-spaces": 2,
"no-multi-str": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-process-env": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-warning-comments": 1,
"no-with": 2,
radix: 2,
"wrap-iife": 2,

// Variables //
//-----------//
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-undef": 2,
"no-undef-init": 2,

"no-unused-vars": [2, {
vars: "all",
args: "after-used",
}],

"no-use-before-define": [2, "nofunc"],

// Node.js //
//---------//

// Stylistic //
//-----------//
"brace-style": [2, "1tbs", {
allowSingleLine: true,
}],

camelcase: 2,

"comma-spacing": [2, {
before: false,
after: true,
}],
// @ts-check

"comma-style": [2, "last"],
"consistent-this": [1, "self"],
"eol-last": 2,
"func-style": [2, "declaration"],

"key-spacing": [2, {
beforeColon: false,
afterColon: true,
}],

"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-nested-ternary": 1,
"no-new-object": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,

"quote-props": [2, "as-needed", {
keywords: true,
}],

quotes: [2, "single", "avoid-escape"],
semi: 2,

"semi-spacing": [2, {
before: false,
after: true,
}],

"space-before-blocks": [2, "always"],

"space-before-function-paren": [2, {
anonymous: "never",
named: "never",
}],
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from "globals";

"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always"],
"wrap-regex": 1,
"no-var": 2,
},
export default tseslint.config(
{
ignores: [
"**/*", // ignore everything...
"!src/**/", "!src/**/*.ts", // ... except our TypeScript source files...
"!test/**/", "!test/**/*.js", // ... and our tests
],
},
eslint.configs.recommended,
tseslint.configs.recommended,
{
files: ['src/**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},
rules: {
"no-unused-expressions": 0, // Needs disabling to support Chai `.to.be.undefined` etc syntax
},
extends: [tseslint.configs.recommendedTypeChecked],
rules: {
// Not sure if these actually serve a purpose, but they provide a way to enforce SOME of what
// would be imposed by having "verbatimModuleSyntax": true in our tsconfig.json without
// actually doing that.
"@typescript-eslint/consistent-type-imports": 2,
"@typescript-eslint/consistent-type-exports": 2,

// Things from the recommendedTypeChecked shared config that are disabled simply because they
// caused lots of errors in our existing code when tried. Plausibly useful to turn on if
// possible and somebody fancies doing the work:
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-return": 0,
}
];
},
{
languageOptions: {
globals: {
...globals.browser,
},
},

rules: {
// Possible Errors //
//-----------------//
"comma-dangle": [2, "never"],
"no-console": 1, // Allow for debugging
"no-debugger": 1, // Allow for debugging
"no-extra-parens": [2, "functions"],
"no-extra-semi": 2,
"no-negated-in-lhs": 2,
"no-unreachable": 1, // Optimizer and coverage will handle/highlight this and can be useful for debugging

// Best Practices //
//----------------//
curly: 2,
"default-case": 1,
"dot-notation": [2, {
allowKeywords: false,
}],
"guard-for-in": 1,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 1,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-multi-spaces": 2,
"no-multi-str": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal-escape": 2,
"no-process-env": 2,
"no-proto": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-warning-comments": 1,
radix: 2,
"wrap-iife": 2,

// Variables //
//-----------//
"no-catch-shadow": 2,
"no-label-var": 2,
"no-undef-init": 2,

// Node.js //
//---------//

// Stylistic //
//-----------//
"brace-style": [2, "1tbs", {
allowSingleLine: true,
}],
camelcase: 2,
"comma-spacing": [2, {
before: false,
after: true,
}],
"comma-style": [2, "last"],
"consistent-this": [1, "self"],
"eol-last": 2,
"func-style": [2, "declaration"],
"key-spacing": [2, {
beforeColon: false,
afterColon: true,
}],
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-nested-ternary": 1,
"no-new-object": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"quote-props": [2, "as-needed", {
keywords: true,
}],
quotes: [2, "single", "avoid-escape"],
semi: 2,
"semi-spacing": [2, {
before: false,
after: true,
}],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, {
anonymous: "never",
named: "never",
}],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always"],
"wrap-regex": 1,
"no-var": 2,

// Typescript //
//------------//
"@typescript-eslint/no-explicit-any": 0, // Very strict rule, incompatible with our code

// We use these intentionally - e.g.
// export interface DiffCssOptions extends CommonDiffOptions {}
// for the options argument to diffCss which currently takes no options beyond the ones
// common to all diffFoo functions. Doing this allows consistency (one options interface per
// diffFoo function) and future-proofs against the API having to change in future if we add a
// non-common option to one of these functions.
"@typescript-eslint/no-empty-object-type": [2, {allowInterfaces: 'with-single-extends'}],
},
},
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},
rules: {
"no-unused-expressions": 0, // Needs disabling to support Chai `.to.be.undefined` etc syntax
"@typescript-eslint/no-unused-expressions": 0, // (as above)
},
}
);
Loading