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

feature(eslint): eslint 7 upgrade #64

Merged
merged 4 commits into from
Oct 29, 2021
Merged

Conversation

rwaskiewicz
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Unit tests (npm test) were run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

ESLint v7.0 is not supported by this library

Relates to #32, most of this work is derived from the original work done by the author of #32. @alex-ketch did most of the work here 🎉

GitHub Issue Number: N/A

What is the new behavior?

update dependencies to support ESLint 7, and make v7 the earliest
version that is supported by this library.

update tests for rules that have fixers, but weren't being previously
evaluated. this required some test cases to be updated as well as they
were not being properly run previously.

update readme to specify cleaner install instructions for npm 7+ users

BREAKING CHANGE: ESLint version 6 and below are no longer supported

Does this introduce a breaking change?

  • Yes
  • No

Applications will be required to upgrade to ESLint v7.0.0. This PR does not include support for v8.0.0 of ESLint.

Testing

  • Using npm 8, I spun up a new Stencil component library using npm init stencil.
  • I added the following .eslintrc.json file to the project
    {
      "parserOptions": {
          "project": "./tsconfig.json"
      },
      "extends": [
          "plugin:@stencil/recommended"
      ]

}

- I added the following `lint` script to `package.json`:
`"lint": "eslint src/**/*{.ts,.tsx}"`
- Pull down this branch, `npm ci && npm run build && npm pack`
- In the sample component library, install the tarball that was just generated
- `npm run lint` to smoke test

## Other information

<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->

@rwaskiewicz rwaskiewicz requested a review from a team October 28, 2021 16:19
README.md Outdated
@@ -34,6 +39,16 @@ Add a new `lint` script to the `package.json`:
}
```

Considering putting a note about ESLint, node_modules is ignored...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: I need to remove or commit to this

@rwaskiewicz
Copy link
Contributor Author

CI if failing, looks like async-methods doesn't work ATM on Windows

update dependencies to support ESLint 7, and make v7 the earliest
version that is supported by this library.

update tests for rules that have fixers, but weren't being previously
evaluated. this required some test cases to be updated as well as they
were not being properly run previously.

update readme to specify cleaner install instructions for npm 7+ users

BREAKING CHANGE: ESLint version 6 and below are no longer supported
@rwaskiewicz rwaskiewicz force-pushed the rwaskiewicz/eslint7-support branch from a908660 to 4b62529 Compare October 28, 2021 17:49
package.json Outdated Show resolved Hide resolved
Co-authored-by: Alex Ketch <alex-ketch@users.noreply.github.com>
@rwaskiewicz
Copy link
Contributor Author

Thanks @alex-ketch! LGTM!

@rwaskiewicz rwaskiewicz merged commit c27aea4 into main Oct 29, 2021
@rwaskiewicz rwaskiewicz deleted the rwaskiewicz/eslint7-support branch October 29, 2021 14:06
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.

3 participants