Skip to content

Commit 04362bb

Browse files
authored
Convert to TypeScript (#345)
* Initial setup * Convert piping classes to TS * Contexts to TS * Convert main files * Type diff filters * Type patch filters * Reverse filters * Add bad type cast * Lie * Type jsonpatch formatter * Type annotated formatter * Console formatter * HTML formatter * Fix lint * Update build * Update CI * Generate declaration files as part of build * Format * Remove duplicate
1 parent da0900c commit 04362bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2602
-3199
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"presets": [["@babel/preset-env", { "targets": "defaults" }]]
2+
"presets": [
3+
["@babel/preset-env", { "targets": "defaults" }],
4+
"@babel/preset-typescript"
5+
]
36
}

.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/recommended-type-checked',
5+
],
6+
plugins: ['@typescript-eslint'],
7+
parser: '@typescript-eslint/parser',
8+
parserOptions: {
9+
project: true,
10+
tsconfigRootDir: __dirname,
11+
},
12+
root: true,
13+
};

.eslintrc.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/demo/demo.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
}
228228
},
229229
getJson: function (url, callback) {
230-
/* global XMLHttpRequest */
231230
let request = new XMLHttpRequest();
232231
request.open('GET', url, true);
233232
request.onreadystatechange = function () {
@@ -236,7 +235,6 @@
236235
try {
237236
data = JSON.parse(this.responseText, jsondiffpatch.dateReviver);
238237
} catch (parseError) {
239-
// eslint-disable-next-line n/no-callback-literal
240238
return callback('parse error: ' + parseError);
241239
}
242240
if (this.status >= 200 && this.status < 400) {

docs/test/index.html

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)