Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Invalid position given by 'semi' #1312

Closed
dschuan opened this issue Jan 4, 2020 · 4 comments
Closed

Invalid position given by 'semi' #1312

dschuan opened this issue Jan 4, 2020 · 4 comments

Comments

@dschuan
Copy link

dschuan commented Jan 4, 2020

ESLint returned a point that did not exist in the document being edited.
Rule: semi
Requested start point: 8:3 - 8:5

import React from 'react';

const EmployerManager = () => {
  return (
    <div>
      EmployerManager
    </div>
  )
};

export default EmployerManager;

Debug information:

{
  "atomVersion": "1.42.0",
  "linterEslintVersion": "8.5.5",
  "linterEslintConfig": {
    "scopes": [
      "source.js",
      "source.jsx",
      "source.js.jsx",
      "source.flow",
      "source.babel",
      "source.js-semantic"
    ],
    "lintHtmlFiles": false,
    "autofix": {
      "fixOnSave": false,
      "ignoreFixableRulesWhileTyping": false,
      "rulesToDisableWhileFixing": []
    },
    "global": {
      "useGlobalEslint": false,
      "eslintrcPath": "",
      "globalNodePath": ""
    },
    "disabling": {
      "disableWhenNoEslintConfig": true,
      "rulesToSilenceWhileTyping": []
    },
    "advanced": {
      "disableEslintIgnore": false,
      "disableFSCache": false,
      "showRuleIdInMessage": true,
      "eslintRulesDirs": [],
      "localNodeModules": ""
    }
  },
  "eslintVersion": "6.8.0",
  "hoursSinceRestart": 0,
  "platform": "win32",
  "eslintType": "local project",
  "eslintPath": "C:\\Users\\DeSheng\\Documents\\GitHub\\chapati-employers\\node_modules\\eslint",
  "editorScopes": [
    "source.js",
    "keyword.control"
  ]
}
@Arcanemagus
Copy link
Member

What is your ESLint configuration? Can you create a Gist/sample repository with a minimal reproduction case? This looks like JSX code so you must be using a processor of some sort in ESLint.

@npdev453
Copy link

npdev453 commented Jan 20, 2020

@Arcanemagus, problem caused by this eslint update (rollback fix a problem):
eslint/eslint@41a78fd

And have 100% repeat with fresh eslint and "semi": enabled rule

@Arcanemagus
Copy link
Member

Can you please report this as a bug to ESLint then? It looks like the person writing that might have confused 0 and 1 based indexing. I'll try to get some time to verify it with the reproduction from #1315 (since the example provided here is incomplete).

@mdjermanovic
Copy link

This is probably fixed by eslint/eslint#13275

(#1342 too).

@UziTech UziTech closed this as completed Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@UziTech @Arcanemagus @npdev453 @dschuan @mdjermanovic and others