Skip to content

parser breaks on folders with accented characters in their name #3966

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

Open
3 tasks done
ImRodry opened this issue Oct 5, 2021 · 15 comments
Open
3 tasks done

parser breaks on folders with accented characters in their name #3966

ImRodry opened this issue Oct 5, 2021 · 15 comments
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: parser Issues related to @typescript-eslint/parser

Comments

@ImRodry
Copy link

ImRodry commented Oct 5, 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

Create a folder with an unsupported character in its name. In my example it was "Ekrem İmamoğlu" (the ğ is the unsupported character)
Notice this error at the very top of the file
image

eslint config file: ```json { "root": true, "env": { "browser": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "plugin:eqeqeq-fix/recommended" ], "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2021, "project": "./tsconfig.json" }, "rules": { "semi": ["warn", "always", { "omitLastInOneLineBlock": true }], "no-multiple-empty-lines": ["warn", { "max": 2, "maxEOF": 0, "maxBOF": 0 }], "quotes": ["warn", "double", { "avoidEscape": true }], "camelcase": ["warn", { "properties": "always" }], "curly": ["warn", "multi-or-nest"], "eqeqeq": ["error", "always"], "comma-dangle": ["warn", "never"], "one-var": ["warn", "consecutive"], "linebreak-style": ["warn", "unix"], "prefer-const": "error", "no-multi-spaces": "error", "object-shorthand": "error", "quote-props": ["error", "as-needed"], "prefer-destructuring": "warn", "prefer-template": "warn", "space-before-blocks": ["error", "always"], "space-infix-ops": "warn", "func-call-spacing": ["error", "never"], "key-spacing": ["warn", { "beforeColon": false }], "dot-notation": "error", "no-case-declarations": "error", "brace-style": "error", "template-curly-spacing": "warn", "no-console": "error", "no-var": "error", "no-undef": "off", "no-restricted-syntax": [ "error", { "selector": "TSEnumDeclaration[const=true]", "message": "Usage of const enums is forbidden." } ], "@typescript-eslint/no-explicit-any": "error" }, "overrides": [ { "env": { "node": true, "mongo": true }, "files": ["./*.ts"], "rules": { "@typescript-eslint/no-non-null-assertion": "off", "no-console": "off" } } ], "reportUnusedDisableDirectives": true, "noInlineConfig": false, "plugins": ["@typescript-eslint"] } ```
{
  "compilerOptions": {
    "module": "CommonJS",
    "target": "ES2021",
    "removeComments": true,
    "noEmitOnError": true,
    "noFallthroughCasesInSwitch": true,
    "noUnusedLocals": true,
    "newLine": "lf",
    "noImplicitAny": true,
    "noUnusedParameters": true,
    "typeRoots": ["@types"],
    "esModuleInterop": true
  }
}

Expected Result

eslint runs on the folder like it does on every other

Actual Result

eslint throws an error due to the folders name

Additional Info

logs
  eslint:cli CLI args: [ './websites/E/Ekrem İmamoğlu', '--debug' ] +0ms
  eslint:cli Running on files +3ms
  eslintrc:config-array-factory Loading .eslintignore file: D:\Users\rodri\Documents\GitHub\Presences\.eslintignore +0ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: false } ] +0ms
  eslintrc:ignore-pattern   processed: { basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', patterns: [ '/**/node_modules/*' ] } +2ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: false } ] +0ms
  eslintrc:ignore-pattern   processed: { basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', patterns: [ '/**/node_modules/*' ] } +1ms
  eslint:file-enumerator Start to iterate files: [ './websites/E/Ekrem İmamoğlu' ] +0ms
  eslint:file-enumerator Directory: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu +1ms
  eslint:file-enumerator Enter the directory: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu +1ms
  eslintrc:cascading-config-array-factory Load config files for D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu. +0ms
  eslintrc:cascading-config-array-factory No cache found: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu. +1ms
  eslintrc:config-array-factory Config file not found on D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu +8ms
  eslintrc:cascading-config-array-factory No cache found: D:\Users\rodri\Documents\GitHub\Presences\websites\E. +1ms
  eslintrc:config-array-factory Config file not found on D:\Users\rodri\Documents\GitHub\Presences\websites\E +0ms
  eslintrc:cascading-config-array-factory No cache found: D:\Users\rodri\Documents\GitHub\Presences\websites. +1ms
  eslintrc:config-array-factory Config file not found on D:\Users\rodri\Documents\GitHub\Presences\websites +1ms
  eslintrc:cascading-config-array-factory No cache found: D:\Users\rodri\Documents\GitHub\Presences. +1ms
  eslintrc:config-array-factory Loading JSON config file: D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +2ms
  eslintrc:config-array-factory Config file found: D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +1ms
  eslintrc:config-array-factory Loading {extends:"eslint:recommended"} relative to D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +1ms
  eslintrc:config-array-factory Loading JS config file: D:\Users\rodri\AppData\Roaming\npm\node_modules\eslint\conf\eslint-recommended.js +1ms
  eslintrc:config-array-factory Loading {extends:"plugin:@typescript-eslint/eslint-recommended"} relative to D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +3ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +0ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js) +4ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js loaded in: 1135ms +1s
  eslintrc:config-array-factory Loading {extends:"plugin:@typescript-eslint/recommended"} relative to D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +2ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +1ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js) +0ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js loaded in: 0ms +0ms
  eslintrc:config-array-factory Loading {extends:"./configs/base"} relative to D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js +1ms
  eslintrc:config-array-factory package.json was not found: Cannot find module './configs/base/package.json'
Require stack:
- D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js +1ms
  eslintrc:config-array-factory Loaded: ./configs/base (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\base.js) +0ms
  eslintrc:config-array-factory Loading JS config file: D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\base.js +0ms
  eslintrc:config-array-factory Loading parser "@typescript-eslint/parser" from D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\base.js +3ms     
  eslintrc:config-array-factory Loaded: @typescript-eslint/parser@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\parser\dist\index.js) +4ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\base.js +180ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js) +1ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js loaded in: 0ms +0ms
  eslintrc:config-array-factory Loading {extends:"./configs/eslint-recommended"} relative to D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js +1ms
  eslintrc:config-array-factory package.json was not found: Cannot find module './configs/eslint-recommended/package.json'
Require stack:
- D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js +1ms
  eslintrc:config-array-factory Loaded: ./configs/eslint-recommended (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js) +1ms  eslintrc:config-array-factory Loading JS config file: D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js +0ms
  eslintrc:config-array-factory Loading {extends:"plugin:eqeqeq-fix/recommended"} relative to D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +3ms
  eslintrc:config-array-factory Loading plugin "eqeqeq-fix" from D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +1ms
  eslintrc:config-array-factory Loaded: eslint-plugin-eqeqeq-fix@1.0.3 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\eslint-plugin-eqeqeq-fix\eslint-plugin-eqeqeq-fix.js) +2ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\eslint-plugin-eqeqeq-fix\eslint-plugin-eqeqeq-fix.js loaded in: 1ms +1ms
  eslintrc:config-array-factory Loading plugin "eqeqeq-fix" from D:\Users\rodri\Documents\GitHub\Presences\node_modules\eslint-plugin-eqeqeq-fix\eslint-plugin-eqeqeq-fix.js +0ms
  eslintrc:config-array-factory Loaded: eslint-plugin-eqeqeq-fix@1.0.3 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\eslint-plugin-eqeqeq-fix\eslint-plugin-eqeqeq-fix.js) +1ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\eslint-plugin-eqeqeq-fix\eslint-plugin-eqeqeq-fix.js loaded in: 0ms +0ms
  eslintrc:config-array-factory Loading parser "@typescript-eslint/parser" from D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +0ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/parser@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\parser\dist\index.js) +1ms
  eslintrc:config-array-factory Loading plugin "@typescript-eslint" from D:\Users\rodri\Documents\GitHub\Presences\.eslintrc.json +0ms
  eslintrc:config-array-factory Loaded: @typescript-eslint/eslint-plugin@4.33.0 (D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js) +1ms
  eslintrc:config-array-factory Plugin D:\Users\rodri\Documents\GitHub\Presences\node_modules\@typescript-eslint\eslint-plugin\dist\index.js loaded in: 0ms +0ms
  eslintrc:cascading-config-array-factory Stop traversing because of 'root:true'. +1s
  eslint:rules Loading rule 'constructor-super' (remaining=283) +0ms
  eslint:rules Loading rule 'for-direction' (remaining=282) +2ms
  eslint:rules Loading rule 'getter-return' (remaining=281) +2ms
  eslint:rules Loading rule 'no-async-promise-executor' (remaining=280) +10ms
  eslint:rules Loading rule 'no-case-declarations' (remaining=279) +2ms
  eslint:rules Loading rule 'no-class-assign' (remaining=278) +2ms
  eslint:rules Loading rule 'no-compare-neg-zero' (remaining=277) +1ms
  eslint:rules Loading rule 'no-cond-assign' (remaining=276) +2ms
  eslint:rules Loading rule 'no-const-assign' (remaining=275) +2ms
  eslint:rules Loading rule 'no-constant-condition' (remaining=274) +2ms
  eslint:rules Loading rule 'no-control-regex' (remaining=273) +2ms
  eslint:rules Loading rule 'no-debugger' (remaining=272) +4ms
  eslint:rules Loading rule 'no-delete-var' (remaining=271) +2ms
  eslint:rules Loading rule 'no-dupe-args' (remaining=270) +2ms
  eslint:rules Loading rule 'no-dupe-class-members' (remaining=269) +1ms
  eslint:rules Loading rule 'no-dupe-else-if' (remaining=268) +2ms
  eslint:rules Loading rule 'no-dupe-keys' (remaining=267) +3ms
  eslint:rules Loading rule 'no-duplicate-case' (remaining=266) +2ms
  eslint:rules Loading rule 'no-empty' (remaining=265) +1ms
  eslint:rules Loading rule 'no-empty-character-class' (remaining=264) +3ms
  eslint:rules Loading rule 'no-empty-pattern' (remaining=263) +2ms
  eslint:rules Loading rule 'no-ex-assign' (remaining=262) +1ms
  eslint:rules Loading rule 'no-extra-boolean-cast' (remaining=261) +2ms
  eslint:rules Loading rule 'no-extra-semi' (remaining=260) +4ms
  eslint:rules Loading rule 'no-fallthrough' (remaining=259) +2ms
  eslint:rules Loading rule 'no-func-assign' (remaining=258) +3ms
  eslint:rules Loading rule 'no-global-assign' (remaining=257) +1ms
  eslint:rules Loading rule 'no-import-assign' (remaining=256) +3ms
  eslint:rules Loading rule 'no-inner-declarations' (remaining=255) +1ms
  eslint:rules Loading rule 'no-invalid-regexp' (remaining=254) +2ms
  eslint:rules Loading rule 'no-irregular-whitespace' (remaining=253) +3ms
  eslint:rules Loading rule 'no-misleading-character-class' (remaining=252) +3ms
  eslint:rules Loading rule 'no-mixed-spaces-and-tabs' (remaining=251) +6ms
  eslint:rules Loading rule 'no-new-symbol' (remaining=250) +7ms
  eslint:rules Loading rule 'no-obj-calls' (remaining=249) +3ms
  eslint:rules Loading rule 'no-octal' (remaining=248) +1ms
  eslint:rules Loading rule 'no-prototype-builtins' (remaining=247) +2ms
  eslint:rules Loading rule 'no-redeclare' (remaining=246) +1ms
  eslint:rules Loading rule 'no-regex-spaces' (remaining=245) +2ms
  eslint:rules Loading rule 'no-self-assign' (remaining=244) +2ms
  eslint:rules Loading rule 'no-setter-return' (remaining=243) +1ms
  eslint:rules Loading rule 'no-shadow-restricted-names' (remaining=242) +2ms
  eslint:rules Loading rule 'no-sparse-arrays' (remaining=241) +1ms
  eslint:rules Loading rule 'no-this-before-super' (remaining=240) +2ms
  eslint:rules Loading rule 'no-undef' (remaining=239) +2ms
  eslint:rules Loading rule 'no-unexpected-multiline' (remaining=238) +3ms
  eslint:rules Loading rule 'no-unreachable' (remaining=237) +1ms
  eslint:rules Loading rule 'no-unsafe-finally' (remaining=236) +1ms
  eslint:rules Loading rule 'no-unsafe-negation' (remaining=235) +2ms
  eslint:rules Loading rule 'no-unused-labels' (remaining=234) +1ms
  eslint:rules Loading rule 'no-unused-vars' (remaining=233) +2ms
  eslint:rules Loading rule 'no-useless-catch' (remaining=232) +3ms
  eslint:rules Loading rule 'no-useless-escape' (remaining=231) +1ms
  eslint:rules Loading rule 'no-with' (remaining=230) +3ms
  eslint:rules Loading rule 'require-yield' (remaining=229) +1ms
  eslint:rules Loading rule 'use-isnan' (remaining=228) +1ms
  eslint:rules Loading rule 'valid-typeof' (remaining=227) +2ms
  eslint:rules Loading rule 'no-var' (remaining=226) +2ms
  eslint:rules Loading rule 'prefer-const' (remaining=225) +1ms
  eslint:rules Loading rule 'prefer-rest-params' (remaining=224) +2ms
  eslint:rules Loading rule 'prefer-spread' (remaining=223) +2ms
  eslint:rules Loading rule 'no-array-constructor' (remaining=222) +6ms
  eslint:rules Loading rule 'no-empty-function' (remaining=221) +2ms
  eslint:rules Loading rule 'eqeqeq' (remaining=220) +5ms
  eslint:rules Loading rule 'semi' (remaining=219) +3ms
  eslint:rules Loading rule 'no-multiple-empty-lines' (remaining=218) +4ms
  eslint:rules Loading rule 'quotes' (remaining=217) +3ms
  eslint:rules Loading rule 'camelcase' (remaining=216) +3ms
  eslint:rules Loading rule 'curly' (remaining=215) +3ms
  eslint:rules Loading rule 'comma-dangle' (remaining=214) +2ms
  eslint:rules Loading rule 'one-var' (remaining=213) +4ms
  eslint:rules Loading rule 'linebreak-style' (remaining=212) +4ms
  eslint:rules Loading rule 'no-multi-spaces' (remaining=211) +2ms
  eslint:rules Loading rule 'object-shorthand' (remaining=210) +2ms
  eslint:rules Loading rule 'quote-props' (remaining=209) +5ms
  eslint:rules Loading rule 'prefer-destructuring' (remaining=208) +6ms
  eslint:rules Loading rule 'prefer-template' (remaining=207) +4ms
  eslint:rules Loading rule 'space-before-blocks' (remaining=206) +2ms
  eslint:rules Loading rule 'space-infix-ops' (remaining=205) +3ms
  eslint:rules Loading rule 'func-call-spacing' (remaining=204) +2ms
  eslint:rules Loading rule 'key-spacing' (remaining=203) +3ms
  eslint:rules Loading rule 'dot-notation' (remaining=202) +6ms
  eslint:rules Loading rule 'brace-style' (remaining=201) +3ms
  eslint:rules Loading rule 'template-curly-spacing' (remaining=200) +2ms
  eslint:rules Loading rule 'no-console' (remaining=199) +3ms
  eslint:rules Loading rule 'no-restricted-syntax' (remaining=198) +2ms
  eslintrc:cascading-config-array-factory Configuration was determined: ConfigArray(12) [ { type: 'config', name: 'DefaultIgnorePattern', filePath: '', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', 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 » eslint:recommended', filePath: 'D:\\Users\\rodri\\AppData\\Roaming\\npm\\node_modules\\eslint\\conf\\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: { 'constructor-super': 'error', 'for-direction': 'error', 'getter-return': 'error', 'no-async-promise-executor': 'error', 'no-case-declarations': 'error', 'no-class-assign': 'error', 'no-compare-neg-zero': 'error', 'no-cond-assign': 'error', 'no-const-assign': 'error', 'no-constant-condition': 'error', 'no-control-regex': 'error', 'no-debugger': 'error', 'no-delete-var': 'error', 'no-dupe-args': 'error', 'no-dupe-class-members': 'error', 'no-dupe-else-if': 'error', 'no-dupe-keys': 'error', 'no-duplicate-case': 'error', 'no-empty': 'error', 'no-empty-character-class': 'error', 'no-empty-pattern': 'error', 'no-ex-assign': 'error', 'no-extra-boolean-cast': 'error', 'no-extra-semi': 'error', 'no-fallthrough': 'error', 'no-func-assign': 'error', 'no-global-assign': 'error', 'no-import-assign': 'error', 'no-inner-declarations': 'error', 'no-invalid-regexp': 'error', 'no-irregular-whitespace': 'error', 'no-misleading-character-class': 'error', 'no-mixed-spaces-and-tabs': 'error', 'no-new-symbol': 'error', 'no-obj-calls': 'error', 'no-octal': 'error', 'no-prototype-builtins': 'error', 'no-redeclare': 'error', 'no-regex-spaces': 'error', 'no-self-assign': 'error', 'no-setter-return': 'error', 'no-shadow-restricted-names': 'error', 'no-sparse-arrays': 'error', 'no-this-before-super': 'error', 'no-undef': 'error', 'no-unexpected-multiline': 'error', 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', 'no-unused-labels': 'error', 'no-unused-vars': 'error', 'no-useless-catch': 'error', 'no-useless-escape': 'error', 'no-with': 'error', 'require-yield': 'error', 'use-isnan': 'error', 'valid-typeof': 'error' }, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/eslint-recommended', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\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: undefined, settings: undefined }, { type: 'config', name: '.eslintrc.json » plugin:@typescript-eslint/eslint-recommended#overrides[0]', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\@typescript-eslint\\eslint-plugin\\dist\\index.js', criteria: { includes: [Array], excludes: null, basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences' }, 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 » ./configs/base', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\@typescript-eslint\\eslint-plugin\\dist\\configs\\base.js', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: { error: null, filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\@typescript-eslint\\parser\\dist\\index.js', id: '@typescript-eslint/parser', importerName: '.eslintrc.json » plugin:@typescript-eslint/recommended » ./configs/base', importerPath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\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: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\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: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\@typescript-eslint\\eslint-plugin\\dist\\configs\\eslint-recommended.js', criteria: { includes: [Array], excludes: null, basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences' }, 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: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\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', '@typescript-eslint/explicit-module-boundary-types': 'warn', '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', '@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', '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 » plugin:eqeqeq-fix/recommended', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\eslint-plugin-eqeqeq-fix\\eslint-plugin-eqeqeq-fix.js', criteria: null, env: undefined, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: { 'eqeqeq-fix': [Object] }, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: { eqeqeq: 'off', 'eqeqeq-fix/eqeqeq': 'warn' }, settings: undefined }, { type: 'config', name: '.eslintrc.json', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\.eslintrc.json', criteria: null, env: { browser: true }, globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' }, ignorePattern: undefined, noInlineConfig: false, parser: { error: null, filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\node_modules\\@typescript-eslint\\parser\\dist\\index.js', id: '@typescript-eslint/parser', importerName: '.eslintrc.json', importerPath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\.eslintrc.json' }, parserOptions: { ecmaVersion: 2021, project: './tsconfig.json' }, plugins: { '@typescript-eslint': [Object] }, processor: undefined, reportUnusedDisableDirectives: true, root: true, rules: { semi: [Array], 'no-multiple-empty-lines': [Array], quotes: [Array], camelcase: [Array], curly: [Array], eqeqeq: [Array], 'comma-dangle': [Array], 'one-var': 
[Array], 'linebreak-style': [Array], 'prefer-const': 'error', 'no-multi-spaces': 'error', 'object-shorthand': 'error', 'quote-props': [Array], 'prefer-destructuring': 'warn', 'prefer-template': 'warn', 'space-before-blocks': [Array], 'space-infix-ops': 'warn', 'func-call-spacing': [Array], 'key-spacing': [Array], 'dot-notation': 'error', 'no-case-declarations': 'error', 'brace-style': 'error', 'template-curly-spacing': 'warn', 'no-console': 'error', 'no-var': 'error', 'no-undef': 'off', 'no-restricted-syntax': [Array], '@typescript-eslint/no-explicit-any': 'error' }, settings: undefined 
}, { type: 'config', name: '.eslintrc.json#overrides[0]', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\.eslintrc.json', criteria: { includes: [Array], excludes: null, basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences' }, env: { node: true, mongo: true }, globals: undefined, ignorePattern: undefined, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: { '@typescript-eslint/no-non-null-assertion': 'off', 'no-console': 'off' }, settings: undefined }, { type: 'ignore', name: '.eslintignore', filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\.eslintignore', criteria: null, env: undefined, globals: undefined, ignorePattern: IgnorePattern { patterns: [Array], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: true }, noInlineConfig: undefined, parser: undefined, parserOptions: undefined, plugins: undefined, processor: undefined, reportUnusedDisableDirectives: undefined, root: undefined, rules: undefined, settings: undefined } ] on D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu +222ms 
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: false }, IgnorePattern { patterns: [ 'node_modules', '.vscode', '.npmrc', '.github', '*.js', '*.d.ts' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: true } ] +2s
  eslintrc:ignore-pattern   processed: { basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', patterns: [ '/**/node_modules/*', 'node_modules', '.vscode', '.npmrc', '.github', '*.js', '*.d.ts' ] } +1ms
  eslintrc:ignore-pattern Check {
  filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\websites\\E\\Ekrem İmamoğlu\\dist\\',
  dot: false,
  relativePath: 'websites/E/Ekrem İmamoğlu/dist/',
  result: false
} +3ms
  eslint:file-enumerator Enter the directory: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\dist +2s
  eslintrc:cascading-config-array-factory Load config files for D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\dist. +29ms
  eslintrc:cascading-config-array-factory No cache found: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\dist. +1ms
  eslintrc:config-array-factory Config file not found on D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\dist +254ms
  eslintrc:cascading-config-array-factory Cache hit: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu. +1ms
  eslint:file-enumerator Didn't match: metadata.json +3ms
  eslint:file-enumerator Leave the directory: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\dist +0ms
  eslintrc:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/**/node_modules/*' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: false }, IgnorePattern { patterns: [ 'node_modules', '.vscode', '.npmrc', '.github', '*.js', '*.d.ts' ], basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', loose: true } ] +4ms
  eslintrc:ignore-pattern   processed: { basePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences', patterns: [ '/**/node_modules/*', 'node_modules', '.vscode', '.npmrc', '.github', '*.js', '*.d.ts' ] } +1ms
  eslintrc:ignore-pattern Check {
  filePath: 'D:\\Users\\rodri\\Documents\\GitHub\\Presences\\websites\\E\\Ekrem İmamoğlu\\presence.ts',
  dot: false,
  relativePath: 'websites/E/Ekrem İmamoğlu/presence.ts',
  result: false
} +1ms
  eslint:file-enumerator Yield: presence.ts +3ms
  eslintrc:cascading-config-array-factory Load config files for D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu. +4ms
  eslintrc:cascading-config-array-factory Cache hit: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu. +0ms
  eslint:cli-engine Lint D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\presence.ts +0ms
  eslint:linter Linting code for D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\presence.ts (pass 1) +0ms
  eslint:linter Verify +0ms
  eslint:linter With ConfigArray: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\presence.ts +0ms
  eslint:linter Generating fixed text for D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu\presence.ts (pass 1) +10s
  eslint:source-code-fixer Applying fixes +0ms
  eslint:source-code-fixer shouldFix parameter was false, not attempting fixes +0ms
  eslint:file-enumerator Didn't match: tsconfig.json +10s
  eslint:file-enumerator Leave the directory: D:\Users\rodri\Documents\GitHub\Presences\websites\E\Ekrem İmamoğlu +1ms
  eslint:file-enumerator Complete iterating files: ["./websites/E/Ekrem İmamoğlu"] +0ms
  eslint:cli-engine Linting complete in: 11926ms +10s

Versions

package version
@typescript-eslint/parser 4.33.0
TypeScript 4.4.3
ESLint 7.32.0
node 16.10.0

(edited 2/24/2022 by @JoshuaKGoldberg to add summary tags)

@ImRodry ImRodry added package: parser Issues related to @typescript-eslint/parser triage Waiting for team members to take a look labels Oct 5, 2021
@bradzacher
Copy link
Member

can you run with DEBUG=typescript-eslint:* please?

@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party and removed triage Waiting for team members to take a look labels Oct 5, 2021
@ImRodry
Copy link
Author

ImRodry commented Oct 5, 2021

can you run with DEBUG=typescript-eslint:* please?

Hey I'm a bit confused, what would the command look like? I can't seem to get that to work, I think I'm doing something wrong

@bradzacher
Copy link
Member

It's en environment variable. Add it before the CLI command you're running.

VAR=foo my command here

@Bas950
Copy link

Bas950 commented Oct 5, 2021

It's en environment variable. Add it before the CLI command you're running.

VAR=foo my command here

Yea sorry me and rodry still don't get how to do that.
Tried:
DEBUG=typescript-eslint:* eslint ./
DEBUG=typescript-eslint:* eslint ./ --debug
Which returns The term 'DEBUG=typescript-eslint:*' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Also tried:
cross-env DEBUG=typescript-eslint:* && eslint ./websites DEBUG=typescript-eslint:*
cross-env DEBUG=typescript-eslint:* && eslint ./websites DEBUG=typescript-eslint:* --debug

@bradzacher
Copy link
Member

bradzacher commented Oct 5, 2021

I don't know how to do it on windows, sorry - you'd have to google how to set environment variables for a cli command on windows.


cross-env is not a separate command - it's a wrapper. You don't want or need the &&.

cross-env DEBUG=typescript-eslint:* eslint ./websites
https://www.npmjs.com/package/cross-env

@ImRodry
Copy link
Author

ImRodry commented Oct 5, 2021

I tried that and tried the windows cmd "set" command and neither of them seem to reproduce a different output than the one already included in the issue. Is there something I should be looking for or can we proceed without that?

@bradzacher
Copy link
Member

With the environment variable set it will outputting logs made by our tooling.
Logs which will help show me what's happening so I can understand and provide guidance.

Without those I can't help you at all.

@ImRodry
Copy link
Author

ImRodry commented Oct 5, 2021

Please try to reproduce this on your end with the file name I gave you. I've even tried running this on WSL and I just cannot get it to work. You cannot expect people to give you info if you don't know how to get that info yourself

@bradzacher
Copy link
Member

I am a volunteer maintainer. I don't have the time or inclination to manually build an entire repro for your issue, esp when it's an issue that has been reported only by you (and thus is isolated to you).

Hence I am asking you to do some legwork and provide some details up front - as I do from anyone and everyone that raises a non-trivial issue.

Logs will help me understand the issue. Additionally depending on the contents of the logs - I mightn't even need to take the time repro this myself on my machine as the logs could immediately show the issue.

Help me to help you.


I also only have access to a mac dev environment.
If you'd like to push up a repro repo that I can pull down to my mac and attempt a repro - I can do that.
But I don't have access to a windows dev machine - so I can only attempt to repro on a mac.


Here is an example of what the output will look like:
$ DEBUG=typescript-eslint:* yarn eslint . --ext .js,.ts
  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: Set(12) {
  '~/typescript-eslint/tsconfig.eslint.json',
  '~/typescript-eslint/tests/integration/utils/jsconfig.json',
  '~/typescript-eslint/packages/ast-spec/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin-internal/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin-tslint/tsconfig.json',
  '~/typescript-eslint/packages/experimental-utils/tsconfig.json',
  '~/typescript-eslint/packages/parser/tsconfig.json',
  '~/typescript-eslint/packages/scope-manager/tsconfig.json',
  '~/typescript-eslint/packages/types/tsconfig.json',
  '~/typescript-eslint/packages/typescript-estree/tsconfig.json',
  '~/typescript-eslint/packages/visitor-keys/tsconfig.json'
} +0ms
  typescript-eslint:typescript-estree:useProvidedProgram Retrieving ast for ~/typescript-eslint/.eslintrc.js from provided program instance(s) +0ms
  typescript-eslint:typescript-estree:parser Detected single-run/CLI usage, creating Program once ahead of time for project: ~/typescript-eslint/tsconfig.eslint.json +1ms
  typescript-eslint:parser:parser Resolved libs from program: [ 'es2017' ] +0ms
  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: Set(12) {
  '~/typescript-eslint/tsconfig.eslint.json',
  '~/typescript-eslint/tests/integration/utils/jsconfig.json',
  '~/typescript-eslint/packages/ast-spec/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin-internal/tsconfig.json',
  '~/typescript-eslint/packages/eslint-plugin-tslint/tsconfig.json',
  '~/typescript-eslint/packages/experimental-utils/tsconfig.json',
  '~/typescript-eslint/packages/parser/tsconfig.json',
  '~/typescript-eslint/packages/scope-manager/tsconfig.json',
  '~/typescript-eslint/packages/types/tsconfig.json',
  '~/typescript-eslint/packages/typescript-estree/tsconfig.json',
  '~/typescript-eslint/packages/visitor-keys/tsconfig.json'
} +589ms
  typescript-eslint:typescript-estree:useProvidedProgram Retrieving ast for ~/typescript-eslint/packages/ast-spec/src/ast-node-types.ts from provided program instance(s) +589ms
  typescript-eslint:typescript-estree:parser Detected single-run/CLI usage, creating Program once ahead of time for project: ~/typescript-eslint/tests/integration/utils/jsconfig.json +0ms

........

@ImRodry
Copy link
Author

ImRodry commented Oct 7, 2021

The repository is public and you can check out the folder here: https://github.com/PreMiD/Presences/tree/master/websites/E/Ekrem%20%C4%B0mamo%C4%9Flu
Please try to clone it and run it yourself to see if you can get those debug logs since I just can’t get them to work at all

@kompot

This comment was marked as off-topic.

@bradzacher bradzacher added triage Waiting for team members to take a look and removed awaiting response Issues waiting for a reply from the OP or another party labels Dec 20, 2021
@AngeloCore

This comment has been minimized.

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Feb 24, 2022

environment variable ... windows

Setting an environment variable on Windows with the cross-env package:

npx cross-env DEBUG=typescript-eslint:* yarn eslint ./websites

Here's the result from my Windows 10 machine: output.txt

C:\Code\Presences\websites\E\Ekrem İmamoğlu\presence.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: websites\E\Ekrem İmamoğlu\presence.ts.
The file must be included in at least one of the projects provided

C:\Code\Presences\websites\F\Full Programlar İndir\presence.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: websites\F\Full Programlar İndir\presence.ts.
The file must be included in at least one of the projects provided

C:\Code\Presences\websites\G\GAİN\presence.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: websites\G\GAİN\presence.ts.
The file must be included in at least one of the projects provided

will be glad to create a working and a failing repo if that helps

Yes please @kompot 🙂

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working and removed triage Waiting for team members to take a look labels Feb 24, 2022
@kompot

This comment was marked as off-topic.

@bradzacher

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: parser Issues related to @typescript-eslint/parser
Projects
None yet
Development

No branches or pull requests

6 participants