Skip to content

Commit

Permalink
Upgrade eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
ryb73 committed Jul 27, 2023
1 parent 16153f7 commit 5b23efd
Show file tree
Hide file tree
Showing 9 changed files with 792 additions and 822 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";

/** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config} */
module.exports = {
extends: `@ryb73`,

Expand Down
15 changes: 4 additions & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@ packageExtensions:
"@microsoft/eslint-plugin-sdl@0.2":
peerDependencies:
eslint: "*"
"@putout/engine-processor@7":
peerDependencies:
putout: "*"
"@putout/engine-runner@16":
peerDependencies:
putout: "*"
"@shopify/eslint-plugin@42":
peerDependencies:
"@babel/core": "*"
prettier: "*"
eslint-config-hardcore@36:
eslint-config-hardcore@41:
peerDependencies:
"@babel/core": "*"
"@testing-library/dom": "*"
vue-eslint-parser: "*"
eslint-plugin-styled-components-a11y@2:
eslint-plugin-sonar@0.12:
peerDependencies:
eslint: "*"
eslint-plugin-import: "*"
eslint-plugin-react: "*"
"@babel/core": "*"
"@typescript-eslint/parser": "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
Expand Down
32 changes: 19 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@emotion/styled": "^11.3.0",
"@jest/types": "^29.5.0",
"@radix-ui/react-collapsible": "^1.0.2",
"@ryb73/eslint-config": "^9.1.3",
"@ryb73/eslint-config": "^10.0.3",
"@shopify/eslint-plugin": "^42.1.0",
"@testing-library/dom": "^9.3.0",
"@testing-library/jest-dom": "^5.12.0",
Expand All @@ -40,37 +40,38 @@
"@types/node": "^17.0.23",
"@types/react": "^17.0.4",
"@types/testing-library__jest-dom": "^5.9.5",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/utils": "^6.2.0",
"@yarnpkg/pnpify": "^3.0.0-rc.3",
"assert": "^2.0.0",
"axios": "^0.26.1",
"dayjs": "^1.10.4",
"dotenv": "^16.0.0",
"eslint": "^8.28.0",
"eslint-config-hardcore": "^36.3.2",
"eslint": "^8.45.0",
"eslint-config-hardcore": "^41.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-plugin-array-func": "^3.1.8",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-etc": "^2.0.3",
"eslint-plugin-ext": "^0.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-no-constructor-bind": "^2.0.4",
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-putout": "^17.6.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-putout": "^18.2.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-regexp": "^1.15.0",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-styled-components-a11y": "^0.1.0 || ^2.0.1",
"eslint-plugin-unicorn": "^47.0.0",
"eslint-plugin-styled-components-a11y": "^2.1.31",
"eslint-plugin-unicorn": "^48.0.1",
"fp-ts": "^2.10.4",
"graphql": "^15.5.0",
"io-ts": "^2.2.16",
Expand All @@ -83,8 +84,8 @@
"nanoid": "^4.0.0",
"newtype-ts": "^0.3.4",
"next": "13.1.6",
"prettier": "^2.8.7",
"putout": "^29.11.1",
"prettier": "^3.0.0",
"putout": "^30.7.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-query": "^3.13.12",
Expand Down Expand Up @@ -182,6 +183,11 @@
},
"packageManager": "yarn@3.5.0",
"resolutions": {
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/utils": "^6.2.0",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-react": "^7.33.0",
"typescript": "5.0.4"
}
}
2 changes: 1 addition & 1 deletion src/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

export type Options = {
retryCount?: number;
readonly retryCount?: number;
};

function Loading({ retryCount = 0 }: Options = {}) {
Expand Down
10 changes: 5 additions & 5 deletions src/queries/WhenSuccessful.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { isDefined } from "../type-checks";
import { isQueryResolved } from "./isQueryResolved";

type SingularProps<Data> = {
children: (result: QueryObserverSuccessResult<Data>) => ReactNode;
LoadingIndicator?: Loading;
result: QueryObserverResult<Data>;
readonly children: (result: QueryObserverSuccessResult<Data>) => ReactNode;
readonly LoadingIndicator?: Loading;
readonly result: QueryObserverResult<Data>;
};

type PairProps<D1, D2> = {
result: [QueryObserverResult<D1>, QueryObserverResult<D2>];
children: (
readonly result: [QueryObserverResult<D1>, QueryObserverResult<D2>];
readonly children: (
result: [QueryObserverSuccessResult<D1>, QueryObserverSuccessResult<D2>],
) => ReactNode;
};
Expand Down
2 changes: 1 addition & 1 deletion src/ui/DynamicHeightCollapsibleContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const StyledCollapsibleContent = makeStyledCollapsible<
);

type Props = {
isOpen: boolean;
readonly isOpen: boolean;
};

/** Mount Collapsible.Content to the page so that it gets dynamically sized before hiding. */
Expand Down
2 changes: 1 addition & 1 deletion src/ui/ExternalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function ExternalLink({
"rel" | "target"
>) {
return (
<a {...props} target="_blank" rel="noopener noreferrer">
<a {...props} rel="noopener noreferrer" target="_blank">
{children}
</a>
);
Expand Down
4 changes: 2 additions & 2 deletions src/ui/FakeLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { useRandomClassName } from "./randomClassName";

type Props = PropsWithChildren<
Omit<HTMLAttributes<HTMLSpanElement>, "onClick"> & {
htmlFor: string;
setAriaLabel?: boolean;
readonly htmlFor: string;
readonly setAriaLabel?: boolean;
}
>;

Expand Down
Loading

0 comments on commit 5b23efd

Please sign in to comment.