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

Linter stuck, only opening and closing file resolves error #1151

Closed
3 tasks done
samblyon opened this issue Jul 21, 2018 · 1 comment
Closed
3 tasks done

Linter stuck, only opening and closing file resolves error #1151

samblyon opened this issue Jul 21, 2018 · 1 comment

Comments

@samblyon
Copy link

samblyon commented Jul 21, 2018

Issue Type

Bug

Issue Description

As I code, I frequently get Parsing Error: Unexpected token, expected "}" (fatal). This error makes sense if I haven't closed a closure, etc. The issue is even after I complete my closure, the error persists. Running the eslint cli shows no errors, and closing and reopening the file clears the error. This is a recent problem.. my guess is eslint is overwhelmed with linting files, however I'm not sure how to debug that. There doesn't seem to be a way to "re-lint" as a way to check.

E.g.

import {

Wait a second, lint error shows up.

import map from 'lodash/map';

Error still says unexpected token. Running eslint cli shows no error. Close file, open file, error disappears.

I've noticed even after I close a file, the atom lint status still shows that file under "Current"

Bug Checklist

  • Restart Atom
  • Verify the eslint CLI gives the proper result, while linter-eslint does not
  • Paste the output of the Linter Eslint: Debug command from the Command Palette below
Atom version: 1.28.2
linter-eslint version: 8.4.1
ESLint version: 3.3.0
Hours since last Atom restart: 9.7
Platform: darwin
Using local project ESLint from: /srv/nerdwallet/react-local-dev/packages/my-nerdwallet/node_modules/eslint
Current file's scopes: [
  "source.js.jsx",
  "meta.class.js",
  "entity.other.inherited-class.js"
]
linter-eslint configuration: {
  "fixOnSave": true,
  "lintHtmlFiles": false,
  "useGlobalEslint": false,
  "showRuleIdInMessage": true,
  "disableWhenNoEslintConfig": true,
  "eslintrcPath": "",
  "globalNodePath": "",
  "advancedLocalNodeModules": "",
  "eslintRulesDirs": [],
  "disableEslintIgnore": false,
  "disableFSCache": false,
  "scopes": [
    "source.js",
    "source.jsx",
    "source.js.jsx",
    "source.babel",
    "source.js-semantic"
  ],
  "rulesToSilenceWhileTyping": [],
  "rulesToDisableWhileFixing": [],
  "ignoreFixableRulesWhileTyping": false
}

.eslintrc

{
  "extends": ["@company/eslint-config", "airbnb", "plugin:jsx-control-statements/recommended"],
  "extends": ["@company/eslint-config", "airbnb"],
  "plugins": ["jsx-control-statements"],
  "rules": {
    "react/jsx-no-bind": "off",
    "no-return-assign": "off",
    "react/sort-comp": "off",
    "react/no-multi-comp": "off",
    "react/no-find-dom-node": "off",
    "jsx-a11y/img-has-alt": "off",
    "jsx-a11y/label-has-for": "off",
    "jsx-a11y/heading-has-content": "off",
    "jsx-control-statements/jsx-jcs-no-undef": "error",
    "jsx-control-statements/jsx-use-if-tag": "off",
    "no-script-url": "off",
    "import/no-named-as-default": "off",
    "import/no-extraneous-dependencies": "off",
    "prettier/prettier": "off"
  },
  "settings": {
    "import/resolver": {
      "webpack": {
        "config": "webpack.browser.config.js"
      }
    }
  }
}
@skylize
Copy link
Contributor

skylize commented Nov 2, 2018

Are you still having this issue? Seems like it may be sort-of a duplicate of #927.

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

3 participants