Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[indent-new-do-not-use] Error with ESLint 6.0.0 pre-releases #564

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

Closed
teppeis opened this issue May 27, 2019 · 1 comment · Fixed by #645
Closed

[indent-new-do-not-use] Error with ESLint 6.0.0 pre-releases #564

teppeis opened this issue May 27, 2019 · 1 comment · Fixed by #645
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@teppeis
Copy link
Contributor

teppeis commented May 27, 2019

Repro

{
  "extends": "plugin:@typescript-eslint/eslint-recommended",
}

Expected Result

Able to parse and lint

Actual Result

Error: Failed to load plugin '@typescript-eslint': Cannot find module 'eslint/lib/util/ast-utils'

import { createGlobalLinebreakMatcher } from 'eslint/lib/util/ast-utils';

Additional Info

Error: Failed to load plugin '@typescript-eslint' declared in '--config » ../../+typescript.js': Cannot find module 'eslint/lib/util/ast-utils'
Referenced from: /Users/teppei/src/github.com/teppeis/eslint-config-teppeis/+typescript.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js:7:21)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at /Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/requireindex/index.js:52:28
    at Array.forEach (<anonymous>)
    at Object.module.exports [as default] (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/requireindex/index.js:34:11)
    at Object.<anonymous> (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/@typescript-eslint/eslint-plugin/dist/index.js:9:37)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at ConfigArrayFactory._loadPlugin (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:858:49)
    at ConfigArrayFactory._loadExtendedPluginConfig (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:660:29)
    at ConfigArrayFactory._loadExtends (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:606:29)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:544:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:490:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:544:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:490:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at createConfigArray (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:306:25)
    at ConfigArrayFactory.loadFile (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/config-array-factory.js:381:16)
    at createCLIConfigArray (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:140:35)
    at new CascadingConfigArrayFactory (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:199:29)
    at new CLIEngine (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/node_modules/eslint/lib/cli-engine/cli-engine.js:552:36)
    at verify (/Users/teppei/src/github.com/teppeis/eslint-config-teppeis/test/index.js:23:18)

Versions

package version
@typescript-eslint/eslint-plugin 1.9.0
@typescript-eslint/parser 1.9.0
TypeScript 3.4.5
ESLint 6.0.0-alpha.2
node 10.15.3
npm 6.9.0
@teppeis teppeis added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels May 27, 2019
@platinumazure
Copy link
Contributor

This is due to ast-utils moving to a different location in the most recent ESLint release.

@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for team members to take a look labels May 28, 2019
@bradzacher bradzacher added this to the indent rewrite milestone Jun 11, 2019
@teppeis teppeis changed the title [indent-new-do-not-use] Error with ESLint 6.0.0-alpha.2 [indent-new-do-not-use] Error with ESLint 6.0.0 pre-releases Jun 12, 2019
@bradzacher bradzacher added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jun 25, 2019
@bradzacher bradzacher added has pr there is a PR raised to close this and removed 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labels Jun 25, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants