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

Move from deprecated ESLint.CLIEngine to ESLint #534

Merged
merged 14 commits into from May 9, 2021

Conversation

Richienb
Copy link
Contributor

@Richienb Richienb commented Apr 27, 2021

@sindresorhus
Copy link
Member

Thanks for working on this ❤️

@sindresorhus
Copy link
Member

I was hoping switching to the new API would make it possible to npm link XO again, but seems not:

~/dev/oss/xo pr/534
❯ npm link

~/dev/oss/xo pr/534
❯ cd ../chalk

~/dev/oss/chalk
❯ npm link xo

~/dev/oss/chalk
❯ xo
Error: Failed to load config "xo" to extend from.
Referenced from: BaseConfig
    at configInvalidError (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:290:9)
    at ConfigArrayFactory._loadExtendedShareableConfig (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:883:23)
    at ConfigArrayFactory._loadExtends (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:781:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:720:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:665:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory.create (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:460:16)
    at createBaseConfigArray (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:98:48)
    at new CascadingConfigArrayFactory (/Users/sindresorhus/dev/oss/xo/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:234:30)

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
@xojs xojs deleted a comment from codecov-commenter Apr 28, 2021
@sindresorhus
Copy link
Member

How are you manually testing this when npm link doesn't work? We cannot really trust only the tests as they're not comprehensive enough.

lib/options-manager.js Outdated Show resolved Hide resolved
@codecov-commenter

This comment has been minimized.

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
@Richienb
Copy link
Contributor Author

Richienb commented May 8, 2021

How are you manually testing this when npm link doesn't work? We cannot really trust only the tests as they're not comprehensive enough.

I was using XO to lint its own codebase which doesn't suffer from these directory problems.

@Richienb Richienb requested a review from sindresorhus May 8, 2021 14:22
@sindresorhus
Copy link
Member

This seems to be working well. Really nice work, @Richienb 🙌

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.

Move from deprecated ESLint.CLIEngine
3 participants