Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update typescript-eslint monorepo to v8 (major) #1710

Merged
merged 26 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eslintrc.ts.react.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-function-type": "off"
"@typescript-eslint/prefer-function-type": "off",
"react/prop-types": "off"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"@babel/eslint-parser": "^7.24.8",
"@changesets/cli": "^2.27.7",
"@nrwl/nx-cloud": "^19.0.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/d3-state-visualizer/examples/tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@babel/preset-env": "^7.24.8",
"@babel/preset-typescript": "^7.24.7",
"@types/node": "^20.14.11",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/d3-state-visualizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"devDependencies": {
"@types/ramda": "^0.30.1",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"rimraf": "^6.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/d3-state-visualizer/src/charts/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { tooltip } from 'd3tooltip';
import type { StyleValue } from 'd3tooltip';

export interface Options {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
state?: {} | null;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
tree?: Node | {};

rootKeyName: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/d3tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"devDependencies": {
"@types/d3": "^7.4.3",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"d3": "^7.9.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/map2tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/map2tree/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export function map2tree(
root: unknown,
options: { key?: string; pushMethod?: 'push' | 'unshift' } = {},
tree: Node = { name: options.key || 'state', children: [] },
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
): Node | {} {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
if (!isPlainObject(root) && root && !(root as { toJS: () => {} }).toJS) {
return {};
}
Expand All @@ -60,13 +60,13 @@ export function map2tree(
}

mapValues(
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
root && (root as { toJS: () => {} }).toJS
? // eslint-disable-next-line @typescript-eslint/ban-types
? // eslint-disable-next-line @typescript-eslint/no-empty-object-type
(root as { toJS: () => {} }).toJS()
: // eslint-disable-next-line @typescript-eslint/ban-types
: // eslint-disable-next-line @typescript-eslint/no-empty-object-type
(root as {}),
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
(maybeImmutable: { toJS?: () => {} }, key) => {
const value =
maybeImmutable && maybeImmutable.toJS
Expand Down
4 changes: 2 additions & 2 deletions packages/react-base16-styling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@types/color": "^3.0.6",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-base16-styling/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const mergeStylings = (
): StylingConfig => {
const keys = Object.keys(defaultStylings);
for (const key in customStylings) {
if (keys.indexOf(key) === -1) keys.push(key);
if (!keys.includes(key)) keys.push(key);
}

return keys.reduce(
Expand Down Expand Up @@ -241,7 +241,7 @@ export const createStyling: CurriedFunction3<

const customStyling = Object.keys(themeOrStyling).reduce(
(s, key) =>
BASE16_KEYS.indexOf(key) === -1
!BASE16_KEYS.includes(key)
? ((s[key] = (themeOrStyling as StylingConfig)[key]), s)
: s,
{} as StylingConfig,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dock/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dock/demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ interface State {
size: number;
}

// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export default class App extends Component<{}, State> {
state: State = {
positionIdx: 0,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dock/src/Dock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export default class Dock extends Component<Props, State> {

handleDimClick = () => {
if (this.props.dimMode === 'opaque') {
this.props.onVisibleChange && this.props.onVisibleChange(false);
if (this.props.onVisibleChange) this.props.onVisibleChange(false);
}
};

Expand Down Expand Up @@ -471,7 +471,7 @@ export default class Dock extends Component<Props, State> {
break;
}

this.props.onSizeChange && this.props.onSizeChange(size);
if (this.props.onSizeChange) this.props.onSizeChange(size);

if (!isControlled) {
this.setState({ size });
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dock/src/autoprefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function prefixProp<Value>(key: string, value: Value) {
export default function autoprefix(style: CSSProperties) {
return Object.keys(style).reduce(
(obj, key) =>
vendorSpecificProperties.indexOf(key) !== -1
vendorSpecificProperties.includes(key)
? {
...obj,
...prefixProp(key, style[key as keyof CSSProperties]),
Expand Down
4 changes: 2 additions & 2 deletions packages/react-json-tree/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-json-tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-json-tree/src/JSONNestedNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function renderChildNodes(
);
} else {
const { key, value } = entry;
const isCircular = circularCache.indexOf(value) !== -1;
const isCircular = circularCache.includes(value);

childNodes.push(
<JSONNode
Expand Down
3 changes: 1 addition & 2 deletions packages/react-json-tree/src/getCollectionEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import type { SortObjectKeys } from './types.js';

function getLength(type: string, collection: unknown) {
if (type === 'Object') {
// eslint-disable-next-line @typescript-eslint/ban-types
return Object.keys(collection as {}).length;
return Object.keys(collection as object).length;
} else if (type === 'Array') {
return (collection as unknown[]).length;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/redux-devtools-app-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"eslint": "^8.57.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/redux-devtools-app-core/src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export interface RequestBase {
libConfig?: LibConfig;
actionsById?: string;
computedStates?: string;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
payload?: {} | string;
liftedState?: Partial<State>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface State {
selected: string | undefined;
}

// eslint-disable-next-line @typescript-eslint/ban-types
export default class Settings extends Component<Props, State> {
state: State = { selected: undefined };

Expand All @@ -27,7 +26,7 @@ export default class Settings extends Component<Props, State> {
{ name: 'State Tree', component: StateTree },
];
return (
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
<Tabs<{}>
tabs={tabs as any}
selected={this.state.selected || tabs[0].name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Props = DispatchProps & OwnProps;

class ChartTab extends Component<Props> {
node?: HTMLDivElement | null;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
renderChart?: (nextState?: {} | null | undefined) => void;

shouldComponentUpdate() {
Expand All @@ -40,7 +40,7 @@ class ChartTab extends Component<Props> {
this.node!.innerHTML = '';
this.createChart(nextProps);
} else if (nextProps.data !== this.props.data) {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
this.renderChart!(nextProps.data as {} | null | undefined);
}
}
Expand All @@ -51,7 +51,7 @@ class ChartTab extends Component<Props> {

createChart(props: Props) {
this.renderChart = tree(this.node!, this.getChartTheme(props.theme));
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
this.renderChart(props.data as {} | null | undefined);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const StyledContainer = styled.div`
padding: 2px 3px;
border-radius: 3px;
position: relative;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
display: inline-block;
}
Expand All @@ -44,23 +44,23 @@ export const StyledContainer = styled.div`
.jsondiffpatch-modified .jsondiffpatch-right-value:before {
vertical-align: top;
padding: 2px;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0E};
content: ' => ';
}

.jsondiffpatch-added .jsondiffpatch-value pre,
.jsondiffpatch-modified .jsondiffpatch-right-value pre,
.jsondiffpatch-textdiff-added {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) =>
effects.color(props.theme.base0B, 'alpha', 0.2)};
}

.jsondiffpatch-deleted pre,
.jsondiffpatch-modified .jsondiffpatch-left-value pre,
.jsondiffpatch-textdiff-deleted {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) =>
effects.color(props.theme.base08, 'alpha', 0.2)};
text-decoration: line-through;
Expand Down Expand Up @@ -129,13 +129,13 @@ export const StyledContainer = styled.div`
padding: 2px 0;
padding-right: 5px;
vertical-align: top;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0D};
}

.jsondiffpatch-property-name:after {
content: ': ';
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
}

Expand Down Expand Up @@ -172,7 +172,7 @@ export const StyledContainer = styled.div`
}

.jsondiffpatch-value pre:after {
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
content: ',';
}
Expand All @@ -196,7 +196,7 @@ export const StyledContainer = styled.div`

.jsondiffpatch-moved .jsondiffpatch-moved-destination {
display: inline-block;
${/* eslint-disable-next-line @typescript-eslint/ban-types */ ''}
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
background: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0A};
}

Expand Down
1 change: 0 additions & 1 deletion packages/redux-devtools-app-core/src/reducers/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function updateState(
const actionsById = request.actionsById;
if (actionsById) {
payload = {
// eslint-disable-next-line @typescript-eslint/ban-types
...payload,
actionsById: parseJSON(actionsById, serialize),
computedStates: parseJSON(request.computedStates, serialize),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function commitExcessActions(liftedState: State, n = 1) {
}

liftedState.skippedActionIds = liftedState.skippedActionIds.filter(
(id) => idsToDelete.indexOf(id) === -1,
(id) => !idsToDelete.includes(id),
);
liftedState.stagedActionIds = [
0,
Expand Down
4 changes: 2 additions & 2 deletions packages/redux-devtools-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"@types/socketcluster-client": "^19.1.0",
"@types/styled-components": "^5.1.34",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
Expand Down
Loading
Loading