Skip to content

Commit

Permalink
chore(deps): update eslint config packages
Browse files Browse the repository at this point in the history
TIL: importing just typescript types using the keyword `import type` the
eslint `no-extraneous-dependencies` does not get applied.
I might be misusing it in this case.
import-js/eslint-plugin-import#1820
  • Loading branch information
Samuel Hobl committed Feb 23, 2021
1 parent 2254984 commit 33633c8
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 114 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Expand Up @@ -12,8 +12,6 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
'prettier/react',
],
ignorePatterns: ['.eslintrc.js'],
rules: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -39,8 +39,8 @@
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"eslint": "^7.0.0",
"eslint-config-airbnb-typescript": "^8.0.2",
"eslint-config-prettier": "^6.11.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/interpolate/package.json
Expand Up @@ -28,9 +28,7 @@
},
"dependencies": {
"@gumption-ui/utils": "0.0.1",
"csstype": "^3.0.6",
"otion": "^0.3.2"
},
"devDependencies": {
"csstype": "^3.0.6"
}
}
2 changes: 1 addition & 1 deletion packages/interpolate/src/interpolate.ts
@@ -1,6 +1,6 @@
import * as CSS from 'csstype';
import { css as otionCss } from 'otion'; // TODO remove
import { ThemeOrAny } from '@gumption-ui/interpolate/theme';
import type { ThemeOrAny } from '@gumption-ui/interpolate/theme';
import {
get,
isFunction,
Expand Down
2 changes: 1 addition & 1 deletion packages/interpolate/src/types.ts
@@ -1,5 +1,5 @@
import * as CSS from 'csstype';
import { ThemeOrAny } from '@gumption-ui/interpolate/theme';
import type { ThemeOrAny } from '@gumption-ui/interpolate/theme';

export type CSSProperties = CSS.Properties<string | number>;

Expand Down
4 changes: 1 addition & 3 deletions packages/jsx/src/index.ts
Expand Up @@ -5,8 +5,6 @@ export const jsx = <T extends As>(
type: T,
props: Record<string, any>,
...children: React.ReactNode[]
): JSX.Element => {
return React.createElement(type, props, ...children);
};
): JSX.Element => React.createElement(type, props, ...children);

// export const Fragment = React.Fragment;
29 changes: 16 additions & 13 deletions packages/quark/src/Slots.tsx
Expand Up @@ -49,19 +49,22 @@ export function SlotProvider({
}) {
// parentSlots is always the memoized `value`, therefore won't trigger unnecessary re-renders.
const parentSlots = React.useContext(SlotContext) || {}; // eslint-disable-line react-hooks/exhaustive-deps
const value = React.useMemo(() => {
return Object.keys(parentSlots)
.concat(Object.keys(slots))
.reduce((accumulator, current) => {
return {
...accumulator,
[current]: mergeProps(
parentSlots[current] || {},
slots[current] || {},
),
};
}, {});
}, [parentSlots, slots]);
const value = React.useMemo(
() =>
Object.keys(parentSlots)
.concat(Object.keys(slots))
.reduce(
(accumulator, current) => ({
...accumulator,
[current]: mergeProps(
parentSlots[current] || {},
slots[current] || {},
),
}),
{},
),
[parentSlots, slots],
);

return <SlotContext.Provider value={value}>{children}</SlotContext.Provider>;
}
Expand Down
26 changes: 12 additions & 14 deletions playground/src/examples/scratchpad/jsx-pragma.tsx
Expand Up @@ -9,20 +9,18 @@ import { quark } from '@gumption-ui/quark';

const Quark = quark('div');

export const WithPragma = () => {
return (
<React.Fragment>
<div>
ein div <span>ein span in einem div</span>
</div>
<Quark css={{ color: 'red' }}>
<div>
with pragma and a <Quark>quark</Quark>
</div>
</Quark>
export const WithPragma = () => (
<React.Fragment>
<div>
ein div <span>ein span in einem div</span>
</div>
<Quark css={{ color: 'red' }}>
<div>
with pragma and a <Quark>quark</Quark>
</div>
</React.Fragment>
);
};
</Quark>
<div>
with pragma and a <Quark>quark</Quark>
</div>
</React.Fragment>
);
90 changes: 15 additions & 75 deletions yarn.lock
Expand Up @@ -775,11 +775,6 @@
dependencies:
"@babel/types" "^7.3.0"

"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==

"@types/glob@^7.1.1":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
Expand Down Expand Up @@ -951,17 +946,6 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/experimental-utils@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686"
integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/typescript-estree" "3.10.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@4.15.2":
version "4.15.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2.tgz#5efd12355bd5b535e1831282e6cf465b9a71cf36"
Expand All @@ -974,18 +958,7 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/parser@^3.1.0":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467"
integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "3.10.1"
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/typescript-estree" "3.10.1"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/parser@^4.15.2":
"@typescript-eslint/parser@^4.15.2", "@typescript-eslint/parser@^4.4.1":
version "4.15.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.2.tgz#c804474321ef76a3955aec03664808f0d6e7872e"
integrity sha512-SHeF8xbsC6z2FKXsaTb1tBCf0QZsjJ94H6Bo51Y1aVEZ4XAefaw5ZAilMoDPlGghe+qtq7XdTiDlGfVTOmvA+Q==
Expand All @@ -1003,30 +976,11 @@
"@typescript-eslint/types" "4.15.2"
"@typescript-eslint/visitor-keys" "4.15.2"

"@typescript-eslint/types@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==

"@typescript-eslint/types@4.15.2":
version "4.15.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.2.tgz#04acf3a2dc8001a88985291744241e732ef22c60"
integrity sha512-r7lW7HFkAarfUylJ2tKndyO9njwSyoy6cpfDKWPX6/ctZA+QyaYscAHXVAfJqtnY6aaTwDYrOhp+ginlbc7HfQ==

"@typescript-eslint/typescript-estree@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853"
integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==
dependencies:
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/visitor-keys" "3.10.1"
debug "^4.1.1"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/typescript-estree@4.15.2":
version "4.15.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2.tgz#c2f7a1e94f3428d229d5ecff3ead6581ee9b62fa"
Expand All @@ -1040,13 +994,6 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/visitor-keys@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931"
integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==
dependencies:
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/visitor-keys@4.15.2":
version "4.15.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2.tgz#3d1c7979ce75bf6acf9691109bd0d6b5706192b9"
Expand Down Expand Up @@ -2210,7 +2157,7 @@ escodegen@^1.14.1:
optionalDependencies:
source-map "~0.6.1"

eslint-config-airbnb-base@^14.1.0, eslint-config-airbnb-base@^14.2.1:
eslint-config-airbnb-base@^14.2.0, eslint-config-airbnb-base@^14.2.1:
version "14.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e"
integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==
Expand All @@ -2219,16 +2166,16 @@ eslint-config-airbnb-base@^14.1.0, eslint-config-airbnb-base@^14.2.1:
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-airbnb-typescript@^8.0.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-8.0.2.tgz#465b17b0b1facdcca4fe23a5426bc27ab7b2b2f2"
integrity sha512-TCOftyCoIogJzzLGSg0Qlxd27qvf+1a3MHyN/PqynTqINS4iFy+SlXy/CrAN+6xkleGMSrvmPbm3pyFEku2+IQ==
eslint-config-airbnb-typescript@^12.3.1:
version "12.3.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-12.3.1.tgz#83ab40d76402c208eb08516260d1d6fac8f8acbc"
integrity sha512-ql/Pe6/hppYuRp4m3iPaHJqkBB7dgeEmGPQ6X0UNmrQOfTF+dXw29/ZjU2kQ6RDoLxaxOA+Xqv07Vbef6oVTWw==
dependencies:
"@typescript-eslint/parser" "^3.1.0"
eslint-config-airbnb "^18.1.0"
eslint-config-airbnb-base "^14.1.0"
"@typescript-eslint/parser" "^4.4.1"
eslint-config-airbnb "^18.2.0"
eslint-config-airbnb-base "^14.2.0"

eslint-config-airbnb@^18.1.0:
eslint-config-airbnb@^18.2.0:
version "18.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9"
integrity sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==
Expand All @@ -2237,12 +2184,10 @@ eslint-config-airbnb@^18.1.0:
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-prettier@^6.11.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9"
integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==
dependencies:
get-stdin "^6.0.0"
eslint-config-prettier@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.0.0.tgz#024d661444319686c588c8849c8da33815dbdb1c"
integrity sha512-5EaAVPsIHu+grmm5WKjxUia4yHgRrbkd8I0ffqUSwixCPMVBrbS97UnzlEY/Q7OWo584vgixefM0kJnUfo/VjA==

eslint-import-resolver-node@^0.3.4:
version "0.3.4"
Expand Down Expand Up @@ -2739,11 +2684,6 @@ get-stdin@8.0.0:
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53"
integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==

get-stream@^4.0.0, get-stream@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
Expand Down Expand Up @@ -2793,7 +2733,7 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
dependencies:
is-glob "^4.0.1"

glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
Expand Down

0 comments on commit 33633c8

Please sign in to comment.