Skip to content

Commit

Permalink
chore: fix all devdependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaGillilan committed Jan 22, 2024
1 parent 51ca8d5 commit fd33980
Show file tree
Hide file tree
Showing 7 changed files with 2,899 additions and 1,891 deletions.
28 changes: 24 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
require.resolve('@contentful/eslint-config-extension'),
require.resolve('@contentful/eslint-config-extension/react.js'),
require.resolve('@contentful/eslint-config-extension/typescript.js'),
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['eslint-plugin-import-helpers'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'eslint-plugin-import-helpers'],
rules: {
'react-hooks/exhaustive-deps': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'import-helpers/order-imports': [
'warn',
{
Expand All @@ -15,5 +31,9 @@ module.exports = {
},
],
'no-restricted-imports': ['warn'],
'react/react-in-jsx-scope': 'off',
},
settings: {
react: { version: 'detect' },
},
};
150 changes: 74 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,107 +36,105 @@
"apps/**"
],
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/eslint-parser": "7.18.2",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/core": "7.9.6",
"@babel/eslint-parser": "7.23.3",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3",
"@babel/plugin-proposal-optional-chaining": "7.9.0",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-flow": "7.21.4",
"@babel/plugin-transform-runtime": "^7.9.6",
"@babel/plugin-transform-runtime": "7.9.6",
"@babel/preset-env": "7.12.11",
"@babel/preset-react": "7.13.13",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^18.4.4",
"@contentful/eslint-config-extension": "0.4.2",
"@contentful/f36-components": "^4.57.0",
"@contentful/f36-tokens": "^4.0.1",
"@cypress/react": "^7.0.3",
"@storybook/addon-actions": "^7.0.18",
"@storybook/addon-docs": "^7.0.18",
"@storybook/addon-essentials": "^7.0.18",
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-links": "^7.0.18",
"@storybook/addons": "^7.0.18",
"@storybook/preset-create-react-app": "^7.0.18",
"@storybook/react": "^7.0.18",
"@storybook/react-webpack5": "^7.0.18",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.57",
"@commitlint/cli": "12.0.1",
"@commitlint/config-conventional": "18.4.4",
"@contentful/f36-components": "4.57.0",
"@contentful/f36-tokens": "4.0.1",
"@cypress/react": "7.0.3",
"@storybook/addon-actions": "7.0.18",
"@storybook/addon-docs": "7.0.18",
"@storybook/addon-essentials": "7.0.18",
"@storybook/addon-info": "5.3.21",
"@storybook/addon-links": "7.0.18",
"@storybook/addons": "7.0.18",
"@storybook/preset-create-react-app": "7.0.18",
"@storybook/react": "7.0.18",
"@storybook/react-webpack5": "7.0.18",
"@swc/cli": "0.1.62",
"@swc/core": "1.3.57",
"@swc/jest": "0.2.29",
"@testing-library/cypress": "^8.0.2",
"@testing-library/cypress": "8.0.2",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "11.2.6",
"@types/jest": "^29.5.1",
"@types/jest": "29.5.1",
"@types/lodash": "4.14.202",
"@types/react": "^16.14.5",
"@types/react": "16.14.5",
"@types/react-dom": "16.9.12",
"@types/testing-library__cypress": "^5.0.9",
"@types/testing-library__cypress": "5.0.9",
"@types/webpack-env": "1.18.0",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"ajv": "^8.8.2",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"ajv": "8.8.2",
"concurrently": "8.0.1",
"contentful-cli": "^1.3.29",
"cypress": "^13.4.0",
"cypress-plugin-tab": "^1.0.5",
"cz-lerna-changelog": "^2.0.2",
"contentful-cli": "1.3.29",
"cypress": "13.4.0",
"cypress-plugin-tab": "1.0.5",
"cz-lerna-changelog": "2.0.2",
"emotion": "10.0.27",
"eslint": "^7.32.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import-helpers": "^1.2.1",
"eslint-plugin-jest": "^26.6.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.12",
"eslint": "8.56.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-import-helpers": "1.3.1",
"eslint-plugin-jest": "27.6.3",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-mocha": "10.2.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-storybook": "0.6.15",
"eslint-plugin-you-dont-need-lodash-underscore": "6.13.0",
"git-cz": "4.7.6",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.0",
"jest": "^29.5.0",
"jest-cli": "^29.5.0",
"html-webpack-plugin": "5.5.0",
"husky": "7.0.0",
"jest": "29.5.0",
"jest-cli": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"jest-junit": "16.0.0",
"lerna": "^6.6.2",
"lerna": "6.6.2",
"lint-staged": "10.5.4",
"mocha": "^8.0.1",
"mocha": "8.0.1",
"prettier": "2.7.1",
"process": "0.11.10",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-markdown": "^8.0.7",
"remark-cli": "^12.0.0",
"remark-gfm": "^3.0.1",
"remark-lint-no-dead-urls": "^1.0.2",
"remark-lint-no-empty-sections": "^4.0.0",
"remark-preset-lint-recommended": "^5.0.0",
"remark-validate-links": "^10.0.0",
"serve": "^12.0.0",
"start-server-and-test": "^1.11.0",
"storybook": "^7.0.18",
"storybook-addon-code-editor": "^2.1.0",
"storybook-addon-swc": "^1.2.0",
"swc-loader": "^0.2.3",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-markdown": "8.0.7",
"remark-cli": "12.0.0",
"remark-gfm": "3.0.1",
"remark-lint-no-dead-urls": "1.0.2",
"remark-lint-no-empty-sections": "4.0.0",
"remark-preset-lint-recommended": "5.0.0",
"remark-validate-links": "10.0.0",
"serve": "12.0.0",
"start-server-and-test": "1.11.0",
"storybook": "7.0.18",
"storybook-addon-code-editor": "2.1.0",
"storybook-addon-swc": "1.2.0",
"swc-loader": "0.2.3",
"ts-loader": "8.1.0",
"tslib": "^2.3.1",
"turbo": "^1.10.1",
"type-fest": "^2.19.0",
"tslib": "2.3.1",
"turbo": "1.10.1",
"type-fest": "2.19.0",
"typescript": "5.1.3",
"webpack": "5.79.0"
},
"resolutions": {
"@types/react": "^16.14.5",
"babel-preset-react-app": "^9.1.2",
"eslint-plugin-react": "^7.30.1",
"@types/react": "16.14.5",
"babel-preset-react-app": "9.1.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@contentful/app-sdk": "4.21.1",
"@contentful/rich-text-types": "^16.3.0"
"@contentful/rich-text-types": "16.3.0"
},
"browserslist": {
"production": "extends @contentful/browserslist-config",
Expand Down
14 changes: 3 additions & 11 deletions packages/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
const path = require('path');

module.exports = {
extends: [
require.resolve('@contentful/eslint-config-extension/typescript'),
require.resolve('@contentful/eslint-config-extension/jsx-a11y'),
require.resolve('@contentful/eslint-config-extension/react'),
],
plugins: ['eslint-comments'],
extends: ['../.eslintrc.js', 'plugin:you-dont-need-lodash-underscore/compatible'],
plugins: ['eslint-comments', 'you-dont-need-lodash-underscore'],
rules: {
'react-hooks/exhaustive-deps': 'error',
// Require descriptions only for disable-line and disable-next-line
'eslint-comments/require-description': [
'error',
Expand Down Expand Up @@ -44,10 +37,9 @@ module.exports = {
{
files: '**/*.{spec,test}.{ts,tsx,js,jsx}',
env: {
browser: true,
node: true,
},
extends: [require.resolve('@contentful/eslint-config-extension/jest')],
extends: ['plugin:jest/recommended', 'plugin:jsx-a11y/recommended'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
Expand Down
3 changes: 1 addition & 2 deletions packages/_shared/src/utils/entityHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import get from 'lodash/get';
import isObject from 'lodash/isObject';
import isString from 'lodash/isString';

import { Asset, ContentType, ContentTypeField, Entry, File } from '../typesEntity';

function titleOrDefault(title: string | undefined, defaultTitle: string): string {
if (!isString(title)) {
if (!(title != null && typeof title.valueOf() === 'string')) {
return defaultTitle;
}
if (title) {
Expand Down
10 changes: 7 additions & 3 deletions packages/markdown/src/utils/linkOrganizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import extend from 'lodash/extend';
import isObject from 'lodash/isObject';
import isString from 'lodash/isString';
import max from 'lodash/max';
// eslint-disable-next-line -- TODO: describe this disable
import isFinite from 'lodash/isFinite';
Expand Down Expand Up @@ -153,7 +152,7 @@ function makeFinder(type: 'inline' | 'ref' | 'label'): (text: string) => Array<a
}

export function findMaxLabelId(textOrLabels: any): number {
if (isString(textOrLabels)) {
if (textOrLabels != null && typeof textOrLabels.valueOf() === 'string') {
textOrLabels = findLabels(textOrLabels);
}

Expand Down Expand Up @@ -185,7 +184,12 @@ function findAll(text: string, type: 'inline' | 'ref' | 'label') {
*/

function hasTitle(link: { title: string }) {
return isObject(link) && isString(link.title) && link.title.length > 0;
return (
isObject(link) &&
link.title !== null &&
typeof link.title.valueOf() === 'string' &&
link.title.length > 0
);
}

function buildLabel(link: { href: string; title: string }, id: number) {
Expand Down
3 changes: 1 addition & 2 deletions packages/rich-text/src/plugins/List/onKeyDownList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import { HotkeyPlugin } from '@udecode/plate-common';
import isHotkey from 'is-hotkey';
import castArray from 'lodash/castArray';

import { getAboveNode } from '../../internal/queries';
import { KeyboardHandler } from '../../internal/types';
Expand All @@ -29,7 +28,7 @@ export const onKeyDownList: KeyboardHandler<HotkeyPlugin> =

if (!hotkey) return;

const hotkeys = castArray(hotkey);
const hotkeys = Array.isArray(hotkey) ? hotkey : [hotkey];

for (const _hotkey of hotkeys) {
if (isHotkey(_hotkey)(e)) {
Expand Down
Loading

0 comments on commit fd33980

Please sign in to comment.