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

Update ESLint to v7 #577

Merged
merged 15 commits into from May 9, 2020
Merged

Update ESLint to v7 #577

merged 15 commits into from May 9, 2020

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Mar 3, 2020

Prepare for ESLint 7

Closes #368

@fisker
Copy link
Collaborator Author

fisker commented Mar 3, 2020

 AssertionError {
    actual: false,
    code: 'ERR_ASSERTION',
    expected: true,
    generatedMessage: false,
    operator: '==',
    message: 'Invalid error property name \'ruleId\'. Expected one of [\'message\', \'messageId\', \'data\', \'type\', \'line\', \'column\', \'endLine\', \'endColumn\', \'suggestions\'].',
  }

This is a breaking change eslint/eslint#12096 , should we remove them all? But this issue is trying to enforce it

# Conflicts:
#	package.json
#	test/catch-error-name.js
#	test/consistent-function-scoping.js
@sindresorhus
Copy link
Owner

I guess we should use messageId instead?

@fisker
Copy link
Collaborator Author

fisker commented Apr 7, 2020

I use messageId and data for few rules in my recent PRs, but I feel it's not safe, I missed data in #635 .

So I add extra tests in this PR https://github.com/sindresorhus/eslint-plugin-unicorn/pull/666/files#diff-01ad3bc5b5ffd5a28466a36319461266R209

@fisker
Copy link
Collaborator Author

fisker commented May 9, 2020

Updating to v7.0.0

@fisker fisker force-pushed the eslint-7 branch 2 times, most recently from 0d86839 to 3de929c Compare May 9, 2020 02:16
@fisker fisker marked this pull request as ready for review May 9, 2020 02:32
@fisker fisker requested a review from sindresorhus May 9, 2020 02:33
@sindresorhus sindresorhus merged commit e4f44f3 into sindresorhus:master May 9, 2020
@fisker fisker deleted the eslint-7 branch May 9, 2020 09:08
@brettz9
Copy link
Contributor

brettz9 commented May 12, 2020

Could we get a new release including this commit?

When using ESLint 7, I'm getting an error blocking reporting of all other linting errors:

context.report() called with a messageId of 'unexpectedComment' which is not present in the 'messages' config

I note that this unexpectedComment message is not present in eslint-plugin-unicorn but is present in the no-warning-comments rule from ESLint 7 which the expiring-todo-comments rule requires. I think this PR should have fixed the issue, but was wondering if we could get a new release. Thanks!

@fisker
Copy link
Collaborator Author

fisker commented May 12, 2020

@brettz9
This error already fixed in #668 v19.0.0 should include that code. Are you sure you are using latest version?

@brettz9
Copy link
Contributor

brettz9 commented May 12, 2020

Ugh, apologies for the wasted time. No, I need to adjust, thank you!!

@fisker
Copy link
Collaborator Author

fisker commented May 12, 2020

No need apologies, glad I did that before ESLint 7 release.

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.

The ruldeId property in tests is not correctly enforced
3 participants