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

feat: support ESLint 8.x #32

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MichaelDeBoey
Copy link

@MichaelDeBoey MichaelDeBoey commented Aug 23, 2021

ESLint v8.0.0 is released 🎉

Dependencies should be compatible with ESLint 8 too before we can merge this one:


BREAKING CHANGE: Requires Node@^12.22.0 || ^14.17.0 || >=16.0.0
BREAKING CHANGE: Requires ESLint@^8.0.0

Closes #31

This branch is dependent on #29

const { rules: PluginRulesIndex } = require("@mysticatea/eslint-plugin")
const { rules: removedRules } = require("eslint/conf/replacements.json")
Copy link
Author

@MichaelDeBoey MichaelDeBoey Aug 23, 2021

Choose a reason for hiding this comment

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

@mysticatea We need to figure out a way to get this file, as it's not exported anymore since ESLint v8

This is currently giving the following error when running tests

> @mysticatea/eslint-plugin@13.0.0 test
> npm run -s lint && nyc mocha "tests/lib/**/*.js" --reporter dot

.../eslint-plugin/node_modules/yargs/yargs.js:1172
      else throw err
           ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './conf/replacements.json' is not defined by "exports" in .../eslint-plugin/node_modules/eslint/package.json
    at new NodeError (node:internal/errors:370:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:335:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:560:3)
    at resolveExports (node:internal/modules/cjs/loader:476:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:516:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:913:27)
    at Function.Module._load (node:internal/modules/cjs/loader:772:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (.../eslint-plugin/tests/lib/configs/_rules.js:13:33)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Module.replacementCompile (.../eslint-plugin/node_modules/append-transform/index.js:58:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Object.<anonymous> (.../eslint-plugin/node_modules/append-transform/index.js:62:4)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at .../eslint-plugin/node_modules/mocha/lib/mocha.js:334:36
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (.../eslint-plugin/node_modules/mocha/lib/mocha.js:331:14)
    at Mocha.run (.../eslint-plugin/node_modules/mocha/lib/mocha.js:809:10)
    at Object.exports.singleRun .../eslint-plugin/node_modules/mocha/lib/cli/run-helpers.js:108:16)
    at exports.runMocha .../eslint-plugin/node_modules/mocha/lib/cli/run-helpers.js:142:13)
    at Object.exports.handler (.../eslint-plugin/node_modules/mocha/lib/cli/run.js:292:3)
    at Object.runCommand (.../eslint-plugin/node_modules/yargs/lib/command.js:242:26)
    at Object.parseArgs [as _parseArgs] (.../eslint-plugin/node_modules/yargs/yargs.js:1096:28)
    at Object.parse (.../eslint-plugin/node_modules/yargs/yargs.js:575:25)
    at Object.exports.main (.../eslint-plugin/node_modules/mocha/lib/cli/cli.js:68:6)
    at Object.<anonymous> (.../eslint-plugin/node_modules/mocha/bin/mocha:162:29)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Module.replacementCompile (.../eslint-plugin/node_modules/append-transform/index.js:58:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Object.<anonymous> (.../eslint-plugin/node_modules/append-transform/index.js:62:4)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at runMain (.../.node-spawn-wrap-74801-8936ba6826e7/node:68:10)
    at Function.<anonymous> (.../.node-spawn-wrap-74801-8936ba6826e7/node:171:5)
    at Object.<anonymous> (.../eslint-plugin/node_modules/nyc/bin/wrap.js:27:4)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at .../.node-spawn-wrap-74801-8936ba6826e7/node:178:8
    at Object.<anonymous> (.../.node-spawn-wrap-74801-8936ba6826e7/node:181:3)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

=============================== Coverage summary ===============================
Statements   : Unknown% ( 0/0 )
Branches     : Unknown% ( 0/0 )
Functions    : Unknown% ( 0/0 )
Lines        : Unknown% ( 0/0 )
================================================================================

BREAKING CHANGE: Requires Node@^10.12.0 || >=12.0.0
BREAKING CHANGE: Requires ESLint@^7.0.0
BREAKING CHANGE: Requires Node@^12.22.0 || ^14.17.0 || >=16.0.0
BREAKING CHANGE: Requires ESLint@^8.0.0
@gajus
Copy link

gajus commented Nov 7, 2021

eslint-plugin-eslint-comments has a circular dependency to this plugin.

@gajus
Copy link

gajus commented Nov 7, 2021

eslint-plugin-prettier was already released

@MichaelDeBoey
Copy link
Author

MichaelDeBoey commented Nov 15, 2022

For people watching this PR: we've already started with our own fork in order to not hold the wider community back anymore: https://github.com/eslint-community/eslint-plugin-mysticatea

@mysticatea We would still love to move the original repo to the new https://github.com/eslint-community though.


This PR is released in @eslint-community/eslint-plugin-mysticatea v15.2.0
https://github.com/eslint-community/eslint-plugin-mysticatea/releases/tag/v15.2.0

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.

Support ESLint 8.x
2 participants