Skip to content

Commit 6fc9848

Browse files
committed
fix lint and types
1 parent b51300d commit 6fc9848

File tree

13 files changed

+245
-45
lines changed

13 files changed

+245
-45
lines changed
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,3 @@ declare type NestedElement = {
2121
interface NestedMultiPartData {
2222
[key: string]: string | boolean | number | Date | Blob;
2323
}
24-
interface ObjectDepth {
25-
[key: string]: any;
26-
}
27-
interface ArrayDepth {
28-
[key: number]: any;
29-
}
30-
declare type NestedDepth = ArrayDepth | ObjectDepth;

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/nestedMultiPart.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"homepage": "https://github.com/remigermain/multipart-object#readme",
1212
"main": "dist/index.js",
13-
"typings": "dist/types/index.d.ts",
13+
"typings": "dist/@types/index.d.ts",
1414
"files": [
1515
"src",
1616
"dist",
@@ -50,9 +50,13 @@
5050
"prettier": "^2.4.1",
5151
"rollup": "^2.58.0",
5252
"rollup-plugin-terser": "^7.0.1",
53+
"rollup-plugin-ts": "^1.4.7",
5354
"ts-jest": "^27.0.6",
5455
"tslib": "^2.3.1",
5556
"typescript": "^4.4.4"
5657
},
57-
"browserslist": "> 0.25%, not dead"
58+
"browserslist": "> 0.25%, not dead",
59+
"dependencies": {
60+
"remove": "^0.1.5"
61+
}
5862
}

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import babel from "@rollup/plugin-babel";
2-
import { terser } from "rollup-plugin-terser";
3-
import typescript from '@rollup/plugin-typescript';
1+
import babel from "@rollup/plugin-babel"
2+
import { terser } from "rollup-plugin-terser"
3+
import typescript from '@rollup/plugin-typescript'
44

55
const def = {
66
plugins: [

src/nestedMultiPart.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const defaultOptions: NestedDataOptions = {
32
separator: "bracket"
43
}
@@ -23,7 +22,7 @@ export function toObject(data: object, options: NestedDataOptions = defaultOptio
2322
function toNestedData(parentKey: string | null, value: any[string]): void {
2423
Object.keys(value).forEach(key => {
2524

26-
let val = value[key]
25+
const val = value[key]
2726
// check if the value of objects is another objects
2827

2928
if (val instanceof Array ||

src/nestedParser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//options
32
const defaultOptions: NestedParserOptions = {
43
separator: "bracket",
@@ -124,7 +123,6 @@ export class NestedParser {
124123
return this._valid
125124
}
126125

127-
128126
get validateData(): object {
129127
if (this._valid === null)
130128
throw new Error("You need to be call is_valid() before access validate_data")

0 commit comments

Comments
 (0)