Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Support ESLint 8.x #286

Closed
MichaelDeBoey opened this issue Aug 31, 2021 · 3 comments · Fixed by #302
Closed

Support ESLint 8.x #286

MichaelDeBoey opened this issue Aug 31, 2021 · 3 comments · Fixed by #302

Comments

@MichaelDeBoey
Copy link

MichaelDeBoey commented Aug 31, 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 🙂

nanpx added a commit to nanpx/eslint-plugin-sonarjs that referenced this issue Oct 18, 2021
- Updates all dev dependencies
- Addresses breaking changes from dependencies
- Lint fixes from dependency changes to recommended configs

See SonarSource#286
nanpx added a commit to nanpx/eslint-plugin-sonarjs that referenced this issue Oct 18, 2021
- Updates all dev dependencies
- Addresses breaking changes from dependencies
- Lint fixes from dependency changes to recommended configs

See SonarSource#286
@nanpx
Copy link

nanpx commented Oct 18, 2021

@MichaelDeBoey I've started on this, but could use a little help.

I'm having a hard time with two things:

Failing Unit Test
When running npm run build and then npm run test, this test fails. It looks like it was put in place to solve a previous issue with a false positive, but I'm not sure I understand why it should be a passing test. It looks like it's re-assigning the value of an array, but expects the index of the previous assignment to be accessible. This is an incorrect expectation and should fail.

// foo.js
module.exports = {
  c: [1, 2, 3],
};

// bar.js
let {c} = require('./foo');

c = [];

console.log(c[0]); // undefined - not 1

Babel Config
This one is a bit out of my wheelhouse - when I run npm run ruling (as noted in the contributing guidelines) I get the following error:

Parsing error: No Babel config file detected for ruling/javascript-test-sources/src/Chart.js/samples/charts/area/analyser.js. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.

I tried setting requireConfigFile to false in the config options which does make the error go away, but then causes errors in other files. I'm not very experienced in the world of TypeScript and transpiling so it's a bit difficult for me to track this one down.

Any thoughts / ideas?

gboer added a commit to gboer/eslint-plugin-sonarjs that referenced this issue Oct 25, 2021
@gboer
Copy link
Contributor

gboer commented Oct 26, 2021

@MichaelDeBoey I've tried it myself as well and didn't run into any issues really, except some other outdated packages. In any case, a PR is open #291 :) Hope that this gets merged soon :)

@virajshelke
Copy link

virajshelke commented Nov 10, 2021

This creates an issue with my package-lock. I have to use --legacy-peer-deps. We need to support eslint 8! :-)

Hope the PR gets merged as soon as possible!

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-sonarjs
npm ERR!   dev eslint-plugin-sonarjs@"^0.10.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

kris7t added a commit to kris7t/refinery that referenced this issue Nov 21, 2021
vllcrz pushed a commit to keybas-engineering/eslint-config-backend that referenced this issue Feb 23, 2022
sonarjs is not yet compatible with eslint 8, see issue:
SonarSource/eslint-plugin-sonarjs#286
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants