Skip to content

Add typings#1382

Merged
ai merged 1 commit intopostcss:mainfrom
Semigradsky:ts
Jan 6, 2021
Merged

Add typings#1382
ai merged 1 commit intopostcss:mainfrom
Semigradsky:ts

Conversation

@Semigradsky
Copy link
Copy Markdown
Member

Add typings based on typings from DefinitelyTyped.

Comment thread package.json Outdated
"no-unused-vars": "off"
"no-unused-vars": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"@typescript-eslint/no-redeclare": ["error"]
"@typescript-eslint/no-redeclare": "error"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What error it prevents in Autoprefixer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no-redeclare rule forbid to make function overloading. Maybe it is better to move rules to @logux/eslint-config:

      "no-redeclare": "off",
      "@typescript-eslint/no-redeclare": "error"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where it could happen?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In any place when you will have function overloading or interface declaration merging. no-redeclare doesn't understand that it is not "redeclare", @typescript-eslint/no-redeclare handles these cases.

Copy link
Copy Markdown
Member

@ai ai Jan 5, 2021

Choose a reason for hiding this comment

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

Thanks for the suggestion. I released ESLint config 44.0.1 and updated config in Autoprefixer’s master.

Can you revert config changes and rebase branch (and we are ready for the release)?

Comment thread lib/autoprefixer.d.ts
Comment thread lib/autoprefixer.d.ts
Comment thread lib/autoprefixer.d.ts Outdated
@ai ai merged commit 70a122b into postcss:main Jan 6, 2021
@ai
Copy link
Copy Markdown
Member

ai commented Jan 6, 2021

Released in 10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants