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: Upgrade ESLint from v7 to v8 #3725

Merged
merged 14 commits into from Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@babel/cli": "7.15.7",
"@babel/node": "7.15.8",
"eslint": "7.32.0",
"eslint": "8.2.0",
"jest": "27.3.1",
"npm-packlist": "3.0.0",
"rimraf": "3.0.2",
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config/package.json
Expand Up @@ -5,21 +5,21 @@
"license": "MIT",
"dependencies": {
"@babel/core": "7.15.8",
"@babel/eslint-parser": "7.15.8",
"@babel/eslint-parser": "7.16.3",
"@babel/eslint-plugin": "7.14.5",
"@redwoodjs/internal": "0.38.3",
"@typescript-eslint/eslint-plugin": "5.1.0",
"@typescript-eslint/parser": "5.1.0",
"eslint": "7.32.0",
"@typescript-eslint/eslint-plugin": "5.4.0",
"@typescript-eslint/parser": "5.4.0",
"eslint": "8.2.0",
"eslint-config-prettier": "8.3.0",
"eslint-import-resolver-babel-module": "5.3.1",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jest-dom": "3.9.2",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.26.1",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-react": "7.27.1",
"eslint-plugin-react-hooks": "4.3.0",
"prettier": "2.4.1"
},
"repository": {
Expand Down
9 changes: 5 additions & 4 deletions packages/forms/src/index.tsx
Expand Up @@ -89,6 +89,7 @@ interface FieldProps<
| HTMLInputElement = HTMLInputElement
> {
name: string
id?: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtoar can you confirm this is correct?

errorClassName?: string
errorStyle?: React.CSSProperties
className?: string
Expand Down Expand Up @@ -467,7 +468,7 @@ const FieldError = ({ name, ...rest }: FieldErrorProps) => {
}

interface TextAreaFieldProps
extends Omit<FieldProps<HTMLTextAreaElement>, 'type'>,
extends FieldProps<HTMLTextAreaElement>,
Omit<React.ComponentPropsWithRef<'textarea'>, 'name'> {}

/**
Expand Down Expand Up @@ -516,7 +517,7 @@ const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(
)

interface SelectFieldProps
extends Omit<FieldProps<HTMLSelectElement>, 'type'>,
extends FieldProps<HTMLSelectElement>,
Omit<React.ComponentPropsWithRef<'select'>, 'name'> {}

/**
Expand Down Expand Up @@ -565,7 +566,7 @@ const SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(
)

interface CheckboxFieldProps
extends Omit<FieldProps<HTMLInputElement>, 'type'>,
extends FieldProps<HTMLInputElement>,
Omit<React.ComponentPropsWithRef<'input'>, 'name' | 'type'> {}

/**
Expand Down Expand Up @@ -672,7 +673,7 @@ const INPUT_TYPES = [
type InputType = typeof INPUT_TYPES[number]

interface InputFieldProps
extends Omit<FieldProps<HTMLInputElement>, 'type'>,
extends FieldProps<HTMLInputElement>,
Omit<React.ComponentPropsWithRef<'input'>, 'name' | 'type'> {
/**
* @privateRemarks
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/generate/graphqlSchema.ts
Expand Up @@ -45,7 +45,7 @@ export const generateGraphQLSchema = async () => {
// This tries to clean up the output of those errors.
console.error(e)
console.error(chalk.red('Error parsing SDLs or Schema'))
for (const error of e?.errors) {
for (const error of e.errors ?? []) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

console.error(error.details)
}

Expand Down
2 changes: 2 additions & 0 deletions packages/router/src/links.tsx
Expand Up @@ -56,6 +56,7 @@ const useMatch = (pathname: string, options?: UseMatchOptions) => {

interface LinkProps {
to: string
onClick: React.MouseEventHandler<HTMLAnchorElement>
nzdjb marked this conversation as resolved.
Show resolved Hide resolved
}

const Link = forwardRef<
Expand Down Expand Up @@ -95,6 +96,7 @@ interface NavLinkProps {
to: string
activeClassName: string
activeMatchParams?: FlattenSearchParams
onClick: React.MouseEventHandler<HTMLAnchorElement>
nzdjb marked this conversation as resolved.
Show resolved Hide resolved
}

const NavLink = forwardRef<
Expand Down