Skip to content

Type checking rules stuck with vue files #4174

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
3 tasks done
andresespinosapc opened this issue Nov 17, 2021 · 1 comment
Closed
3 tasks done

Type checking rules stuck with vue files #4174

andresespinosapc opened this issue Nov 17, 2021 · 1 comment
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin vue issues relating to vue support

Comments

@andresespinosapc
Copy link

andresespinosapc commented Nov 17, 2021

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

.eslintrc.json

{
  "parserOptions": {
    "project": "./tsconfig.json",
    "extraFileExtensions": [".vue"]
  },
  "parser": "@typescript-eslint/parser"
}

tsconfig.json

{
  "include": [
    "app/javascript/**/*.vue"
  ]
}

Run eslint on any file of the project.

Expected Result

To just run normally.

Actual Result

<--- Last few GCs --->

[30480:0x104d00000]   165182 ms: Scavenge 1554.5 (1576.5) -> 1538.5 (1576.5) MB, 0.2 / 0.0 ms  (average mu = 0.993, current mu = 0.993) allocation failure
[30480:0x104d00000]   165285 ms: Scavenge 1554.5 (1576.5) -> 1538.5 (1576.5) MB, 0.2 / 0.0 ms  (average mu = 0.993, current mu = 0.993) allocation failure
[30480:0x104d00000]   165387 ms: Scavenge 1554.5 (1576.5) -> 1538.5 (1576.5) MB, 0.2 / 0.0 ms  (average mu = 0.993, current mu = 0.993) allocation failure


<--- JS stacktrace --->

FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
 1: 0x101319fc5 node::Abort() (.cold.1) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 2: 0x1000b6169 node::Abort() [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 3: 0x1000b62df node::OnFatalError(char const*, char const*) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 4: 0x100200ba7 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 5: 0x100200b43 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 6: 0x1003aec55 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 7: 0x100386726 v8::internal::Factory::NewUninitializedFixedArray(int) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 8: 0x100513752 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handle<v8::internal::JSObject>, unsigned int) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
 9: 0x1006de7d4 v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
10: 0x100a8deb9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
11: 0x2e3b00acd72d
12: 0x100a24a02 Builtins_InterpreterEntryTrampoline [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
13: 0x100a24a02 Builtins_InterpreterEntryTrampoline [/Users/andres/.nvm/versions/node/v14.18.1/bin/node]
error Command failed with signal "SIGABRT".

Additional Info

eslint:cli CLI args: [ './app/javascript/composables/useUppy.ts', '--debug' ] +0ms
  eslint:cli Running on files +3ms
  eslintrc:config-array-factory Loading .eslintignore file: /Users/andres/workspace/tushop/.eslintignore +0ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/andres/workspace/tushop', loose: false } ] +0ms
  eslintrc:ignore-pattern   processed: { basePath: '/Users/andres/workspace/tushop', patterns: [ '/**/node_modules/*' ] } +1ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/andres/workspace/tushop', loose: false } ] +1ms
  eslintrc:ignore-pattern   processed: { basePath: '/Users/andres/workspace/tushop', patterns: [ '/**/node_modules/*' ] } +0ms
  eslint:file-enumerator Start to iterate files: [ './app/javascript/composables/useUppy.ts' ] +0ms
  eslint:file-enumerator File: /Users/andres/workspace/tushop/app/javascript/composables/useUppy.ts +0ms
  eslintrc:cascading-config-array-factory Load config files for /Users/andres/workspace/tushop/app/javascript/composables. +0ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres/workspace/tushop/app/javascript/composables. +0ms
  eslintrc:config-array-factory Config file not found on /Users/andres/workspace/tushop/app/javascript/composables +5ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres/workspace/tushop/app/javascript. +1ms
  eslintrc:config-array-factory Config file not found on /Users/andres/workspace/tushop/app/javascript +0ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres/workspace/tushop/app. +0ms
  eslintrc:config-array-factory Config file not found on /Users/andres/workspace/tushop/app +0ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres/workspace/tushop. +0ms
  eslintrc:config-array-factory Loading JSON config file: /Users/andres/workspace/tushop/.eslintrc.json +0ms
  eslintrc:config-array-factory Config file found: /Users/andres/workspace/tushop/.eslintrc.json +1ms
  eslintrc:config-array-factory Loading {extends:"plugin:@typescript-eslint/recommended"} relative to /Users/andres/workspace/tushop/.eslintrc.json +0ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from /Users/andres/workspace/tushop/.eslintrc.json +0ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@5.4.0 (/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js) +1ms
  eslint:rules Loading rule 'brace-style' (remaining=284) +0ms
  eslint:rules Loading rule 'comma-dangle' (remaining=283) +5ms
  eslint:rules Loading rule 'dot-notation' (remaining=282) +7ms
  eslint:rules Loading rule 'indent' (remaining=281) +4ms
  eslint:rules Loading rule 'init-declarations' (remaining=280) +5ms
  eslint:rules Loading rule 'keyword-spacing' (remaining=279) +1ms
  eslint:rules Loading rule 'lines-between-class-members' (remaining=278) +1ms
  eslint:rules Loading rule 'no-dupe-class-members' (remaining=277) +16ms
  eslint:rules Loading rule 'no-duplicate-imports' (remaining=276) +1ms
  eslint:rules Loading rule 'no-empty-function' (remaining=275) +2ms
  eslint:rules Loading rule 'no-extra-parens' (remaining=274) +2ms
  eslint:rules Loading rule 'no-extra-semi' (remaining=273) +2ms
  eslint:rules Loading rule 'no-invalid-this' (remaining=272) +13ms
  eslint:rules Loading rule 'no-loop-func' (remaining=271) +2ms
  eslint:rules Loading rule 'no-loss-of-precision' (remaining=270) +1ms
  eslint:rules Loading rule 'no-magic-numbers' (remaining=269) +1ms
  eslint:rules Loading rule 'no-restricted-imports' (remaining=268) +20ms
  eslint:rules Loading rule 'no-unused-expressions' (remaining=267) +33ms
  eslint:rules Loading rule 'no-useless-constructor' (remaining=266) +3ms
  eslint:rules Loading rule 'object-curly-spacing' (remaining=265) +5ms
  eslint:rules Loading rule 'quotes' (remaining=264) +23ms
  eslint:rules Loading rule 'semi' (remaining=263) +9ms
  eslint:rules Loading rule 'space-infix-ops' (remaining=262) +2ms
  eslintrc:config-array-factory Plugin /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js loaded in: 537ms +537ms
  eslintrc:config-array-factory Loading {extends:"./configs/base"} relative to /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
  eslintrc:config-array-factory package.json was not found: Cannot find module './configs/base/package.json'
Require stack:
- /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
  eslintrc:config-array-factory Loaded: ./configs/base (/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js) +0ms
  eslintrc:config-array-factory Loading JS config file: /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js +0ms
  eslintrc:config-array-factory Loading parser "@typescript-eslint/parser" from /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js +1ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/parser@5.4.0 (/Users/andres/workspace/tushop/node_modules/@typescript-eslint/parser/dist/index.js) +1ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js +106ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@5.4.0 (/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js) +0ms
  eslintrc:config-array-factory Plugin /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js loaded in: 0ms +0ms
  eslintrc:config-array-factory Loading {extends:"./configs/eslint-recommended"} relative to /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
  eslintrc:config-array-factory package.json was not found: Cannot find module './configs/eslint-recommended/package.json'
Require stack:
- /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
  eslintrc:config-array-factory Loaded: ./configs/eslint-recommended (/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js) +0ms
  eslintrc:config-array-factory Loading JS config file: /Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js +0ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres/workspace. +649ms
  eslintrc:config-array-factory Config file not found on /Users/andres/workspace +2ms
  eslintrc:cascading-config-array-factory No cache found: /Users/andres. +0ms
  eslintrc:cascading-config-array-factory Stop traversing because of considered root. +0ms
  eslint:rules Loading rule 'constructor-super' (remaining=261) +125ms
  eslint:rules Loading rule 'getter-return' (remaining=260) +1ms
  eslint:rules Loading rule 'no-const-assign' (remaining=259) +0ms
  eslint:rules Loading rule 'no-dupe-args' (remaining=258) +1ms
  eslint:rules Loading rule 'no-dupe-keys' (remaining=257) +0ms
  eslint:rules Loading rule 'no-func-assign' (remaining=256) +0ms
  eslint:rules Loading rule 'no-import-assign' (remaining=255) +1ms
  eslint:rules Loading rule 'no-new-symbol' (remaining=254) +0ms
  eslint:rules Loading rule 'no-obj-calls' (remaining=253) +1ms
  eslint:rules Loading rule 'no-redeclare' (remaining=252) +1ms
  eslint:rules Loading rule 'no-setter-return' (remaining=251) +0ms
  eslint:rules Loading rule 'no-this-before-super' (remaining=250) +1ms
  eslint:rules Loading rule 'no-undef' (remaining=249) +0ms
  eslint:rules Loading rule 'no-unreachable' (remaining=248) +1ms
  eslint:rules Loading rule 'no-unsafe-negation' (remaining=247) +0ms
  eslint:rules Loading rule 'no-var' (remaining=246) +1ms
  eslint:rules Loading rule 'prefer-const' (remaining=245) +1ms
  eslint:rules Loading rule 'prefer-rest-params' (remaining=244) +1ms
  eslint:rules Loading rule 'prefer-spread' (remaining=243) +1ms
  eslint:rules Loading rule 'valid-typeof' (remaining=242) +0ms
  eslint:rules Loading rule 'no-array-constructor' (remaining=241) +3ms
  eslint:rules Loading rule 'no-unused-vars' (remaining=240) +4ms
  eslintrc:cascading-config-array-factory Configuration was determined: ConfigArray(7) [ { type: 'config', name: 'DefaultIgnorePattern', filePath: '', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: '/Users/andres/workspace/tushop', loose: false }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/recommended » ./configs/base', filePath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: { error: null, filePath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/parser/dist/index.js', id: '@typescript-eslint/parser', importerName: '.eslintrc.json » plugin:@typescript-eslint/recommended » ./configs/base', importerPath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js' }, parserOptions: { sourceType: 'module' }, plugins: { '@typescript-eslint': [Object] }, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/recommended » ./configs/eslint-recommended', filePath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/recommended » ./configs/eslint-recommended#overrides[0]', filePath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js', criteria: { includes: [Array], excludes: null, basePath: '/Users/andres/workspace/tushop' }, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: { 'constructor-super': 'off', 'getter-return': 'off', 'no-const-assign': 'off', 'no-dupe-args': 'off', 'no-dupe-class-members': 'off', 'no-dupe-keys': 'off', 'no-func-assign': 'off', 'no-import-assign': 'off', 'no-new-symbol': 'off', 'no-obj-calls': 'off', 'no-redeclare': 'off', 'no-setter-return': 'off', 'no-this-before-super': 'off', 'no-undef': 'off', 'no-unreachable': 'off', 'no-unsafe-negation': 'off', 'no-var': 'error', 'prefer-const': 'error', 'prefer-rest-params': 'error', 'prefer-spread': 'error', 'valid-typeof': 'off' }, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/recommended', filePath: '/Users/andres/workspace/tushop/node_modules/@typescript-eslint/eslint-plugin/dist/index.js', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: { '@typescript-eslint/adjacent-overload-signatures': 'error', '@typescript-eslint/ban-ts-comment': 'error', '@typescript-eslint/ban-types': 'error', 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'error', 'no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'error', '@typescript-eslint/no-empty-interface': 'error', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-extra-non-null-assertion': 'error', 'no-extra-semi': 'off', '@typescript-eslint/no-extra-semi': 'error', '@typescript-eslint/no-inferrable-types': 'error', 'no-loss-of-precision': 'off', '@typescript-eslint/no-loss-of-precision': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'error', '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'warn', '@typescript-eslint/no-this-alias': 'error', '@typescript-eslint/no-unnecessary-type-constraint': 'error', 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'warn', '@typescript-eslint/no-var-requires': 'error', '@typescript-eslint/prefer-as-const': 'error', '@typescript-eslint/prefer-namespace-keyword': 'error', '@typescript-eslint/triple-slash-reference': 'error' }, settings: undefined }, { type: 'config', name: '.eslintrc.json', filePath: '/Users/andres/workspace/tushop/.eslintrc.json', criteria: null, env: { es6: true }, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: { parser: '@typescript-eslint/parser', ecmaVersion: 2018, sourceType: 'module', project: './tsconfig.json', extraFileExtensions: [Array] }, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined }, { type: 'ignore', name: '.eslintignore', filePath: '/Users/andres/workspace/tushop/.eslintignore', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: '/Users/andres/workspace/tushop', loose: true }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined } ] on /Users/andres/workspace/tushop/app/javascript/composables +21ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: '/Users/andres/workspace/tushop', loose: false }, IgnorePattern { patterns: [ 'node_modules', 'public' ], basePath: '/Users/andres/workspace/tushop', loose: true } ] +676ms
  eslintrc:ignore-pattern   processed: { basePath: '/Users/andres/workspace/tushop', patterns: [ '/**/node_modules/*', 'node_modules', 'public' ] } +1ms
  eslintrc:ignore-pattern Check {
  filePath: '/Users/andres/workspace/tushop/app/javascript/composables/useUppy.ts',
  dot: false,
  relativePath: 'app/javascript/composables/useUppy.ts',
  result: false
} +1ms
  eslint:cli-engine Lint /Users/andres/workspace/tushop/app/javascript/composables/useUppy.ts +0ms
  eslint:linter Linting code for /Users/andres/workspace/tushop/app/javascript/composables/useUppy.ts (pass 1) +0ms
  eslint:linter Verify +0ms
  eslint:linter With ConfigArray: /Users/andres/workspace/tushop/app/javascript/composables/useUppy.ts +0ms

Versions

package version
@typescript-eslint/eslint-plugin 5.4.0
@typescript-eslint/parser 5.4.0
TypeScript 4.4.4
ESLint 8.2.0
node 14.18.1
@andresespinosapc andresespinosapc added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Nov 17, 2021
@bradzacher
Copy link
Member

It's going to be pretty much impossible for us to investigate this given that it only repros on your private codebase.

I can only point you at two issues:

First #1192 - which has some tips on how you can adjust your config to split it up. The number of the files is often the problem and cause of OOMs.

Second vuejs/eslint-plugin-vue#1296 - we as volunteer maintainers do not use or know vue, and the vue community has not stepped up to champion support. So vue support is, unfortunately, in a state of "no warranty provided".

@bradzacher bradzacher added vue issues relating to vue support and removed triage Waiting for team members to take a look labels Nov 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin vue issues relating to vue support
Projects
None yet
Development

No branches or pull requests

2 participants