Skip to content

Commit fe36afc

Browse files
committed
chore: update deps and lint
# Conflicts: # packages/@interactjs/dev-tools/visualizer/Visualizer.vue # packages/@interactjs/dev-tools/visualizer/plugin.ts # packages/@interactjs/modifiers/avoid/avoid.ts # packages/@interactjs/modifiers/spring/spring.ts # packages/@interactjs/modifiers/transform/transform.spec.ts # packages/@interactjs/react/types.ts # packages/@interactjs/types/index.ts # packages/@interactjs/vue/package.json
1 parent 9b3d901 commit fe36afc

34 files changed

+1524
-1690
lines changed

.eslintrc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extends:
88
settings:
99
import/resolver:
1010
typescript:
11-
project: './tsconfig.json'
1211
react:
1312
version: '16'
1413

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.5.0

babel.config.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@ const isProd = process.env.NODE_ENV === 'production'
22

33
module.exports = {
44
presets: [
5-
[
6-
require.resolve('@babel/preset-env'),
7-
{ exclude: ['transform-regenerator'] },
8-
],
5+
[require.resolve('@babel/preset-env'), { exclude: ['transform-regenerator'] }],
96
[
107
require.resolve('@babel/preset-typescript'),
11-
{ isTsx: false, onlyRemoveTypeImports: true, allExtensions: true },
8+
{ isTsx: false, onlyRemoveTypeImports: true, allExtensions: true, allowDeclareFields: true },
129
],
1310
].filter(Boolean),
1411

1512
plugins: [
1613
require.resolve('./scripts/babel/vue-sfc'),
17-
require.resolve('@babel/plugin-proposal-class-properties'),
1814
[
1915
require.resolve('@babel/plugin-transform-runtime'),
2016
{
@@ -24,13 +20,7 @@ module.exports = {
2420
],
2521
isProd && require.resolve('./scripts/babel/for-of-array'),
2622
isProd && require.resolve('@babel/plugin-proposal-optional-catch-binding'),
27-
isProd && [
28-
require.resolve('@babel/plugin-proposal-optional-chaining'),
29-
{ loose: true },
30-
],
31-
[
32-
require.resolve('@babel/plugin-transform-modules-commonjs'),
33-
{ noInterop: isProd },
34-
],
23+
isProd && [require.resolve('@babel/plugin-proposal-optional-chaining'), { loose: true }],
24+
[require.resolve('@babel/plugin-transform-modules-commonjs'), { noInterop: isProd }],
3525
].filter(Boolean),
3626
}

examples/sortable/react.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import interact from '@interactjs/interactjs'
12
import { createElement as h, useState } from 'react'
23
import ReactDOM from 'react-dom'
34

4-
import interact from '@interactjs/interactjs'
5-
65
import { getData } from './shared.js'
76

87
// eslint-disable-next-line no-undef

examples/sortable/vue.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// import Vue from 'vue/dist/vue.esm.browser.js'
2-
import { createApp } from 'vue/dist/vue.esm-browser'
3-
42
import interact from '@interactjs/interactjs'
3+
import { createApp } from 'vue/dist/vue.esm-browser'
54

65
import { getData, sortableOptions, swappableOptions } from './shared.js'
76

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Config } from '@jest/types'
22

3-
// import { sourcesGlob } from './scripts/utils'
3+
import { sourcesGlob } from './scripts/utils'
44

55
const config: Config.InitialOptions = {
66
preset: 'vijest',
@@ -13,7 +13,7 @@ const config: Config.InitialOptions = {
1313
},
1414
},
1515
// collectCoverage: true,
16-
// collectCoverageFrom: [sourcesGlob],
16+
collectCoverageFrom: [sourcesGlob],
1717
coveragePathIgnorePatterns: ['[\\\\/]_', '\\.d\\.ts$', '@interactjs[\\\\/](rebound|symbol-tree)[\\\\/]'],
1818
coverageReporters: ['json', 'text', ['lcov', { projectRoot: 'packages/@interactjs' }]],
1919
}

jsdoc/jsdoc.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
extensions: ['js', 'ts'],
2929
babelrc: false,
3030
configFile: false,
31-
presets: [require.resolve('@babel/preset-typescript')],
31+
presets: [[require.resolve('@babel/preset-typescript'), { allowDeclareFields: true }]],
3232
},
3333

3434
markdown: {

package.json

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,36 @@
1414
"esnext": "_add_plugin_indexes && _esnext",
1515
"test": "jest",
1616
"test:debug": "node --inspect node_modules/.bin/jest --no-cache --runInBand ",
17-
"tsc_lint_test": "_add_plugin_indexes && tsc -b -f && _lint && yarn test --coverage",
17+
"tsc_lint_test": "_add_plugin_indexes && tsc -b -f && _lint && yarn test",
1818
"prepare": "bin/_link; husky install"
1919
},
2020
"homepage": "https://interactjs.io/pro",
2121
"description": "",
2222
"devDependencies": {
23-
"@babel/core": "^7.15.0",
24-
"@babel/plugin-proposal-class-properties": "^7.14.5",
25-
"@babel/plugin-proposal-export-default-from": "^7.14.5",
26-
"@babel/plugin-proposal-optional-catch-binding": "^7.14.5",
27-
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
28-
"@babel/plugin-transform-modules-commonjs": "^7.15.0",
29-
"@babel/plugin-transform-runtime": "^7.15.0",
30-
"@babel/preset-env": "^7.15.0",
31-
"@babel/preset-typescript": "^7.15.0",
32-
"@babel/register": "^7.15.3",
33-
"@babel/runtime": "^7.15.3",
23+
"@babel/core": "^7.17.8",
24+
"@babel/plugin-proposal-export-default-from": "^7.16.7",
25+
"@babel/plugin-proposal-optional-catch-binding": "^7.16.7",
26+
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
27+
"@babel/plugin-transform-modules-commonjs": "^7.17.7",
28+
"@babel/plugin-transform-runtime": "^7.17.0",
29+
"@babel/preset-env": "^7.16.11",
30+
"@babel/preset-typescript": "^7.16.7",
31+
"@babel/register": "^7.17.7",
32+
"@babel/runtime": "^7.17.8",
3433
"@types/jest": "^27.0.1",
3534
"@types/node": "^16.7.4",
3635
"@types/react": "^17.0.19",
3736
"@types/shelljs": "^0.8.9",
3837
"@types/tape": "^4.13.2",
39-
"@typescript-eslint/eslint-plugin": "^4.29.3",
40-
"@typescript-eslint/eslint-plugin-tslint": "^4.29.3",
41-
"@typescript-eslint/parser": "^4.29.3",
42-
"@vitejs/plugin-vue": "^1.6.0",
43-
"@vue/babel-plugin-jsx": "^1.0.6",
44-
"@vue/compiler-sfc": "^3.2.6",
45-
"@vue/reactivity": "^3.2.6",
46-
"@vue/runtime-dom": "^3.2.6",
47-
"@vue/test-utils": "^1.2.2",
38+
"@typescript-eslint/eslint-plugin": "^5.17.0",
39+
"@typescript-eslint/eslint-plugin-tslint": "^5.17.0",
40+
"@typescript-eslint/parser": "^5.17.0",
41+
"@vitejs/plugin-vue": "^2.3.1",
42+
"@vue/babel-plugin-jsx": "^1.1.1",
43+
"@vue/compiler-sfc": "^3.2.31",
44+
"@vue/reactivity": "^3.2.31",
45+
"@vue/runtime-dom": "^3.2.31",
46+
"@vue/test-utils": "^2.0.0-rc.17",
4847
"babel-helper-vue-jsx-merge-props": "^2.0.3",
4948
"babel-plugin-syntax-jsx": "^6.18.0",
5049
"babelify": "^10.0.0",
@@ -58,17 +57,17 @@
5857
"del": "^6.0.0",
5958
"derequire": "^2.1.1",
6059
"errorify": "^0.3.1",
61-
"eslint": "^7.32.0",
60+
"eslint": "^8.12.0",
6261
"eslint-config-standard": "^16.0.3",
63-
"eslint-import-resolver-typescript": "^2.4.0",
64-
"eslint-plugin-import": "^2.24.2",
65-
"eslint-plugin-jest": "^24.4.0",
66-
"eslint-plugin-markdown": "^2.0.1",
62+
"eslint-import-resolver-typescript": "^2.7.0",
63+
"eslint-plugin-import": "^2.25.4",
64+
"eslint-plugin-jest": "^26.1.3",
65+
"eslint-plugin-markdown": "^2.2.1",
6766
"eslint-plugin-node": "^11.1.0",
68-
"eslint-plugin-promise": "^5.1.0",
69-
"eslint-plugin-react": "^7.24.0",
67+
"eslint-plugin-promise": "^6.0.0",
68+
"eslint-plugin-react": "^7.29.4",
7069
"eslint-plugin-require-path-exists": "^1.1.9",
71-
"eslint-plugin-vue": "^7.17.0",
70+
"eslint-plugin-vue": "^8.5.0",
7271
"fs-extra": "^10.0.0",
7372
"glob": "^7.1.7",
7473
"hash-sum": "^2.0.0",
@@ -80,8 +79,8 @@
8079
"lint-staged": "^11.1.2",
8180
"mkdirp": "^1.0.4",
8281
"nodemon": "^2.0.12",
83-
"p-queue": "^7.1.0",
84-
"prettier": "^2.3.2",
82+
"p-queue": "6",
83+
"prettier": "^2.6.1",
8584
"promise-polyfill": "^8.2.0",
8685
"react": "^17.0.2",
8786
"react-dom": "^17.0.2",
@@ -94,11 +93,10 @@
9493
"temp": "^0.9.4",
9594
"terser": "^5.7.2",
9695
"ts-node": "^10.2.1",
97-
"tslint": "^6.1.3",
9896
"typescript": "^4.4.2",
99-
"vijest": "^0.0.0",
100-
"vite": "^2.5.1",
101-
"vue": "^3.2.6",
97+
"vijest": "^0.0.1",
98+
"vite": "^2.8.6",
99+
"vue": "^3.2.31",
102100
"yargs": "^17.1.1"
103101
},
104102
"engines": {

packages/@interactjs/actions/drag/drag.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('actions/drag', () => {
1818
})
1919

2020
describe('interactable.draggable method', () => {
21-
const interactable = ({
21+
const interactable = {
2222
options: {
2323
drag: {},
2424
},
@@ -29,7 +29,7 @@ describe('actions/drag', () => {
2929
setOnEvents: () => {
3030
calledSetOnEvents = true
3131
},
32-
} as unknown) as Interactable
32+
} as unknown as Interactable
3333
let calledSetPerAction = false
3434
let calledSetOnEvents = false
3535

packages/@interactjs/actions/drop/plugin.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,13 @@ function collectDrops ({ interactables }: Scope, draggableElement: Element) {
248248
}
249249

250250
// query for new elements if necessary
251-
const dropElements = (is.string(dropzone.target)
252-
? dropzone._context.querySelectorAll(dropzone.target)
253-
: is.array(dropzone.target)
254-
? dropzone.target
255-
: [dropzone.target]) as Element[]
251+
const dropElements = (
252+
is.string(dropzone.target)
253+
? dropzone._context.querySelectorAll(dropzone.target)
254+
: is.array(dropzone.target)
255+
? dropzone.target
256+
: [dropzone.target]
257+
) as Element[]
256258

257259
for (const dropzoneElement of dropElements) {
258260
if (dropzoneElement !== draggableElement) {

0 commit comments

Comments
 (0)