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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESLint 8.x #2890

Closed
MichaelDeBoey opened this issue Sep 4, 2021 · 12 comments 路 Fixed by #2965 or #3057
Closed

Support ESLint 8.x #2890

MichaelDeBoey opened this issue Sep 4, 2021 · 12 comments 路 Fixed by #2965 or #3057
Labels
enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!
Projects

Comments

@MichaelDeBoey
Copy link
Contributor

MichaelDeBoey commented Sep 4, 2021

ESLint v8.0.0 is released 馃帀

It would be awesome to have official ESLint 8 support. 馃憡
I'm happy to help where I can of course 馃檪

@iclanton
Copy link
Member

iclanton commented Sep 7, 2021

@octogonz - want to take a look at this?

@iclanton iclanton added this to Low priority in Bug Triage Sep 7, 2021
@octogonz
Copy link
Collaborator

We don't normally adopt or support beta versions of tools (since it's already a nontrivial time investment to keep up with officially released versions 馃槆).

I'm fine however if someone wants to make a PR that enables usage of eslint-v8.0.0-beta-*. Heft should probably print a notice to the console saying it's not officially supported.

I'm also curious to see what will happen with @rushstack/eslint-patch.

@octogonz octogonz added enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start! labels Sep 10, 2021
@MichaelDeBoey MichaelDeBoey changed the title [eslint-config] Support ESLint 8.x Support ESLint 8.x Sep 10, 2021
@lukashass
Copy link
Contributor

ESLint 8.0.0 was just released 馃槈 https://eslint.org/blog/2021/10/eslint-v8.0.0-released

kodiakhq bot pushed a commit to vercel/next.js that referenced this issue Oct 12, 2021
Fixes #29770

## Description

Pins `eslint` to `v7`. This avoids issues with `v8` from both [changes to the public api](https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#the-lib-entrypoint-has-been-removed) and [lack of support from rushstack](microsoft/rushstack#2890). See #29770 (comment) for slightly more detail. 

Local testing showed output of next app correctly pinned to `v7`. 

<img width="495" alt="Screen Shot 2021-10-12 at 12 31 56 AM" src="https://user-images.githubusercontent.com/29002354/136892312-1571718c-882b-4235-98f4-c1b8d4c72d26.png">


### Bug Checklist

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added
   - Happy to add an integration test for pinning to v7 if we'd like, will need to be updated / removed when v8 is supported. 
- [ ] Errors have helpful link attached, see `contributing.md`
	- No errors to add links for
@anonrig
Copy link

anonrig commented Oct 12, 2021

Any updates or news from this issue?

Bug Triage automation moved this from Low priority to Closed Oct 13, 2021
@marcoreni
Copy link

marcoreni commented Oct 26, 2021

@iclanton I think this should be reopened since #2965 only solved issues for eslint-patch package.

@D4N14L
Copy link
Member

D4N14L commented Nov 29, 2021

@marcoreni is correct, this should be re-opened. I will take a look at this soon.

@D4N14L D4N14L reopened this Nov 29, 2021
Bug Triage automation moved this from Closed to Needs triage Nov 29, 2021
@lukashass
Copy link
Contributor

@D4N14L FYI I already started this in #3009. Not sure if that covers everything needed to close this issue. Also, it is blocked by upstream changes as far as I can tell, but feel free to continue.

@D4N14L
Copy link
Member

D4N14L commented Dec 1, 2021

@lukashass yes, I noticed this just recently, sorry for missing that! I already had some additional changes in my branch, so I'll likely create a separate PR for it. I'll tag you when I get that out.

Bug Triage automation moved this from Needs triage to Closed Dec 6, 2021
@stefaneg
Copy link

I am working on getting eslint to work with heft, having trouble making it work with eslint 8.7.0.

Is it possible that the documentation is out of date here?

https://www.npmjs.com/package/@rushstack/eslint-config

@D4N14L
Copy link
Member

D4N14L commented Jan 24, 2022

@stefaneg it seems like it works successfully (see this PR: #3185). What is the issue you're having?

@stefaneg
Copy link

The error I get is this when execute heft build with .eslintrc.js exactly as it specified in the documentation. I have verified that everything is present in node_modules at the correct paths.

> heft build 
Project build folder is "/Users/gulli/src/github.com/rush-example/libraries/logging"
Starting build
 ---- Pre-compile started ----
 ---- Pre-compile finished (1ms) ----
 ---- Compile started ----
[typescript] Using TypeScript version 3.9.10
[eslint] Using ESLint version 8.7.0
 ---- Compile encountered an error (2239ms) ----
-------------------- Finished (2.51s) --------------------
Project: @tm.is/logging@3.6.10
Heft version: 0.44.2
Node version: v16.13.1
Error: Cannot read config file: /Users/gulli/src/github.com/rush-example/libraries/logging/.eslintrc.js
Error: Failed to patch ESLint because the calling module was not recognized

I tried downgrading ESLint to 7.32.0, and the error persists, so the issue seems to be something else.

@stefaneg
Copy link

stefaneg commented Jan 24, 2022

It looks like the message is originating here:

'Failed to patch ESLint because the calling module was not recognized.\n' +

Hard to be sure unless there is an output processor that outputs only the first line of the exception message to stderr.

EDIT:

Turned out that I managed somehow to install an old version of @rushstack/eslint-config which led to those obscure errors.

natew pushed a commit to natew/next.js that referenced this issue Feb 16, 2022
Fixes vercel#29770

## Description

Pins `eslint` to `v7`. This avoids issues with `v8` from both [changes to the public api](https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#the-lib-entrypoint-has-been-removed) and [lack of support from rushstack](microsoft/rushstack#2890). See vercel#29770 (comment) for slightly more detail. 

Local testing showed output of next app correctly pinned to `v7`. 

<img width="495" alt="Screen Shot 2021-10-12 at 12 31 56 AM" src="https://user-images.githubusercontent.com/29002354/136892312-1571718c-882b-4235-98f4-c1b8d4c72d26.png">


### Bug Checklist

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added
   - Happy to add an integration test for pinning to v7 if we'd like, will need to be updated / removed when v8 is supported. 
- [ ] Errors have helpful link attached, see `contributing.md`
	- No errors to add links for
LuighiV pushed a commit to openpolitica/create-openpolitica-nextjs-app that referenced this issue Aug 24, 2022
Fixes vercel/next.js#29770

## Description

Pins `eslint` to `v7`. This avoids issues with `v8` from both [changes to the public api](https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#the-lib-entrypoint-has-been-removed) and [lack of support from rushstack](microsoft/rushstack#2890). See vercel/next.js#29770 (comment) for slightly more detail. 

Local testing showed output of next app correctly pinned to `v7`. 

<img width="495" alt="Screen Shot 2021-10-12 at 12 31 56 AM" src="https://user-images.githubusercontent.com/29002354/136892312-1571718c-882b-4235-98f4-c1b8d4c72d26.png">


### Bug Checklist

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added
   - Happy to add an integration test for pinning to v7 if we'd like, will need to be updated / removed when v8 is supported. 
- [ ] Errors have helpful link attached, see `contributing.md`
	- No errors to add links for
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!
Projects
Archived in project
Bug Triage
  
Closed
8 participants