Skip to content

Commit a49d5a4

Browse files
committed
Linter fixes
1 parent 0828ac8 commit a49d5a4

File tree

6 files changed

+68
-11
lines changed

6 files changed

+68
-11
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
"dev": "cd demo && yarn && yarn dev",
2828
"demo": "cd demo && yarn && yarn start",
2929
"demo:package": "yarn build-package && cd demo && yarn && yarn start:package",
30+
"prebuild": "yarn lint",
3031
"build": "rimraf ./build && rollup -c && rimraf ./build/dts",
3132
"build-package": "yarn build && yarn pack --filename package.tgz && tar -xzf package.tgz -C demo/src && rm package.tgz",
3233
"lint": "eslint",
3334
"postbuild": "node ./scripts/cleanBuildTypes.cjs",
3435
"prepareReadme": "python3 scripts/build_npm_readme.py",
3536
"prepublishOnly": "yarn build && yarn prepareReadme && python3 scripts/use_npm_readme.py prepare",
3637
"postpublish": "python3 scripts/use_npm_readme.py restore && cd demo && yarn add json-edit-react@latest",
37-
"compile": "rimraf ./build && tsc --noEmit",
38+
"compile": "rimraf ./build && tsc --noEmit && ts-prune",
3839
"release": "yarn publish",
3940
"release-demo": "cd demo && yarn deploy"
4041
},
@@ -75,6 +76,7 @@
7576
"rollup-plugin-styles": "^4.0.0",
7677
"ts-jest": "^29.2.5",
7778
"ts-node": "^10.9.2",
79+
"ts-prune": "^0.10.3",
7880
"tslib": "^2.6.2",
7981
"typescript": "^5.3.3",
8082
"typescript-eslint": "^8.29.1"

src/contexts/TreeStateProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from '../types'
1919
import { toPathString } from '../helpers'
2020

21-
export interface DragSource {
21+
interface DragSource {
2222
path: CollectionKey[] | null
2323
pathString: string | null
2424
}

src/hooks/useCommon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from '../types'
1616
import { toPathString } from '../helpers'
1717

18-
export interface CommonProps {
18+
interface CommonProps {
1919
props: CollectionNodeProps | ValueNodeProps
2020
collapsed?: boolean
2121
}

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export {
4444
type UpdateFunctionProps,
4545
} from './types'
4646
export { type EditState, type ExternalTriggers } from './hooks'
47+
export { type IconProps } from './Icons'
4748
export { type LocalisedStrings, type TranslateFunction } from './localisation'
4849

4950
export {

src/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,6 @@ export interface Theme {
418418
styles: Partial<ThemeStyles>
419419
}
420420

421-
// Same as "Theme", but we know every property in styles is defined
422-
export interface DefaultTheme extends Theme {
423-
displayName: 'Default'
424-
styles: ThemeStyles
425-
}
426-
427421
// All the fragments and shorthand defined in Theme is compiled into a single
428422
// CSS "Style" object before being passed to components
429423
export type CompiledStyles = Record<ThemeableElement, ThemeFunction | React.CSSProperties>

yarn.lock

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,16 @@
891891
resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
892892
integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==
893893

894+
"@ts-morph/common@~0.12.3":
895+
version "0.12.3"
896+
resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.12.3.tgz#a96e250217cd30e480ab22ec6a0ebbe65fd784ff"
897+
integrity sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==
898+
dependencies:
899+
fast-glob "^3.2.7"
900+
minimatch "^3.0.4"
901+
mkdirp "^1.0.4"
902+
path-browserify "^1.0.1"
903+
894904
"@tsconfig/node10@^1.0.7":
895905
version "1.0.9"
896906
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2"
@@ -1578,6 +1588,11 @@ co@^4.6.0:
15781588
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
15791589
integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
15801590

1591+
code-block-writer@^11.0.0:
1592+
version "11.0.3"
1593+
resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-11.0.3.tgz#9eec2993edfb79bfae845fbc093758c0a0b73b76"
1594+
integrity sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==
1595+
15811596
collect-v8-coverage@^1.0.0:
15821597
version "1.0.2"
15831598
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9"
@@ -1617,6 +1632,11 @@ commander@^2.20.0:
16171632
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
16181633
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
16191634

1635+
commander@^6.2.1:
1636+
version "6.2.1"
1637+
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
1638+
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
1639+
16201640
commander@^7.2.0:
16211641
version "7.2.0"
16221642
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
@@ -2394,7 +2414,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
23942414
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
23952415
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
23962416

2397-
fast-glob@^3.3.2:
2417+
fast-glob@^3.2.7, fast-glob@^3.3.2:
23982418
version "3.3.3"
23992419
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
24002420
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
@@ -3529,7 +3549,7 @@ json-stable-stringify-without-jsonify@^1.0.1:
35293549
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
35303550
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
35313551

3532-
json5@^2.2.3:
3552+
json5@^2.1.3, json5@^2.2.3:
35333553
version "2.2.3"
35343554
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
35353555
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
@@ -3622,6 +3642,11 @@ lodash.uniq@^4.5.0:
36223642
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
36233643
integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==
36243644

3645+
lodash@^4.17.21:
3646+
version "4.17.21"
3647+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
3648+
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
3649+
36253650
loose-envify@^1.4.0:
36263651
version "1.4.0"
36273652
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -3773,6 +3798,11 @@ minimatch@^9.0.4:
37733798
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
37743799
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
37753800

3801+
mkdirp@^1.0.4:
3802+
version "1.0.4"
3803+
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
3804+
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
3805+
37763806
module-details-from-path@^1.0.3:
37773807
version "1.0.3"
37783808
resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b"
@@ -4019,6 +4049,11 @@ parse-json@^5.0.0, parse-json@^5.2.0:
40194049
json-parse-even-better-errors "^2.3.0"
40204050
lines-and-columns "^1.1.6"
40214051

4052+
path-browserify@^1.0.1:
4053+
version "1.0.1"
4054+
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
4055+
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==
4056+
40224057
path-exists@^4.0.0:
40234058
version "4.0.0"
40244059
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -5248,6 +5283,11 @@ to-regex-range@^5.0.1:
52485283
dependencies:
52495284
is-number "^7.0.0"
52505285

5286+
"true-myth@^4.1.0":
5287+
version "4.1.1"
5288+
resolved "https://registry.yarnpkg.com/true-myth/-/true-myth-4.1.1.tgz#ff4ac9d5130276e34aa338757e2416ec19248ba2"
5289+
integrity sha512-rqy30BSpxPznbbTcAcci90oZ1YR4DqvKcNXNerG5gQBU2v4jk0cygheiul5J6ExIMrgDVuanv/MkGfqZbKrNNg==
5290+
52515291
ts-api-utils@^2.0.1:
52525292
version "2.1.0"
52535293
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
@@ -5268,6 +5308,14 @@ ts-jest@^29.2.5:
52685308
semver "^7.6.3"
52695309
yargs-parser "^21.1.1"
52705310

5311+
ts-morph@^13.0.1:
5312+
version "13.0.3"
5313+
resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-13.0.3.tgz#c0c51d1273ae2edb46d76f65161eb9d763444c1d"
5314+
integrity sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==
5315+
dependencies:
5316+
"@ts-morph/common" "~0.12.3"
5317+
code-block-writer "^11.0.0"
5318+
52715319
ts-node@^10.9.2:
52725320
version "10.9.2"
52735321
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f"
@@ -5287,6 +5335,18 @@ ts-node@^10.9.2:
52875335
v8-compile-cache-lib "^3.0.1"
52885336
yn "3.1.1"
52895337

5338+
ts-prune@^0.10.3:
5339+
version "0.10.3"
5340+
resolved "https://registry.yarnpkg.com/ts-prune/-/ts-prune-0.10.3.tgz#b6c71a525543b38dcf947a7d3adfb7f9e8b91f38"
5341+
integrity sha512-iS47YTbdIcvN8Nh/1BFyziyUqmjXz7GVzWu02RaZXqb+e/3Qe1B7IQ4860krOeCGUeJmterAlaM2FRH0Ue0hjw==
5342+
dependencies:
5343+
commander "^6.2.1"
5344+
cosmiconfig "^7.0.1"
5345+
json5 "^2.1.3"
5346+
lodash "^4.17.21"
5347+
"true-myth" "^4.1.0"
5348+
ts-morph "^13.0.1"
5349+
52905350
tslib@^2.3.1:
52915351
version "2.6.2"
52925352
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"

0 commit comments

Comments
 (0)