Skip to content
This repository has been archived by the owner on Apr 15, 2018. It is now read-only.

Stopped reading .eslintrc.js for some reason #22

Open
ivancuric opened this issue May 25, 2017 · 5 comments
Open

Stopped reading .eslintrc.js for some reason #22

ivancuric opened this issue May 25, 2017 · 5 comments

Comments

@ivancuric
Copy link

Not sure what happened today, but prettier-eslint stopped inheriting rules from .eslintrc.js — everything worked fine yesterday. Reinstalling the extension didn't help, I had to put these two in manually in vscode's config:

"prettier.singleQuote": true,
"prettier.trailingComma": "all",

Eslint still shows errors as usual (when single quotes get converted to double quotes, and missing trailing commas). This is my config file:

module.exports = {
  env: {
    browser: true,
    node: true,
    commonjs: true,
    es6: true,
  },
  globals: {
    _: true,
    sleep: 1,
  },
  plugins: ['json', 'react'],
  parser: 'babel-eslint',
  parserOptions: {
    sourceType: 'module',
    ecmaVersion: 8,
    allowImportExportEverywhere: true,
    jsx: true,
    ecmaFeatures: {
      jsx: true,
      modules: true,
    },
  },
  settings: {
    react: {
      pragma: 'h',
    },
  },
  extends: ['eslint:recommended'],
  rules: {
    'react/jsx-no-bind': [2, { ignoreRefs: true }],
    'react/jsx-no-duplicate-props': 2,
    'react/self-closing-comp': 2,
    'react/prefer-es6-class': 2,
    'react/no-string-refs': 2,
    'react/require-render-return': 2,
    'react/no-find-dom-node': 2,
    'react/no-is-mounted': 2,
    'react/jsx-no-comment-textnodes': 2,
    'react/jsx-curly-spacing': 2,
    'react/jsx-no-undef': 2,
    'react/jsx-uses-react': 2,
    'react/jsx-uses-vars': 2,
    'no-empty': 0,
    'no-console': 0,
    'no-empty-pattern': 0,
    'no-cond-assign': 1,
    semi: 2,
    camelcase: 0,
    'comma-style': 2,
    'comma-dangle': [2, 'always-multiline'],
    indent: [2, 2, { SwitchCase: 1 }],
    // 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
    'no-trailing-spaces': [2, { skipBlankLines: true }],
    'max-nested-callbacks': [2, 3],
    // 'no-eval': 2,
    'no-implied-eval': 2,
    'no-new-func': 2,
    // 'guard-for-in': 2,
    eqeqeq: 1,
    'no-else-return': 2,
    'no-redeclare': 2,
    'no-dupe-keys': 2,
    radix: 2,
    strict: [2, 'never'],
    'no-shadow': 0,
    'no-delete-var': 2,
    'no-undef-init': 2,
    'no-shadow-restricted-names': 2,
    'handle-callback-err': 0,
    'no-lonely-if': 2,
    'keyword-spacing': 2,
    'constructor-super': 2,
    'no-this-before-super': 2,
    'no-dupe-class-members': 2,
    'no-const-assign': 2,
    'prefer-spread': 2,
    'no-useless-concat': 2,
    'no-var': 2,
    'object-shorthand': 2,
    'prefer-arrow-callback': 2,
    'no-multiple-empty-lines': [2, { max: 2 }],
    quotes: [1, 'single', { allowTemplateLiterals: true }],
    'no-unused-vars': [
      2,
      {
        vars: 'all',
        args: 'after-used',
        argsIgnorePattern: '(^reject$|^_$|^req$)',
        varsIgnorePattern: '(^_$)',
      },
    ],
    'no-unused-expressions': [
      2,
      {
        allowTaggedTemplates: true,
        allowShortCircuit: true,
        allowTernary: false,
      },
    ],
  },
};

These are my deps:

"prettier": "^1.3.1",
"prettier-eslint": "^6.2.3",
"prettier-eslint-cli": "^4.0.1",

Running vscode 1.12.2
Sorry for the vague "ehmagerd it no worky" issue.

@oieduardorabelo
Copy link

same here, in my case, I use a .eslintrc.js, I've tried .json, re-installed the Editor and everything else :P

there's any way to debug it?

@oieduardorabelo
Copy link

oieduardorabelo commented May 31, 2017

I've removed my node_modules again and installed via npm@5 and yarn@24.5, and re-installed my prettier-eslint-code plugin, and now, I can see this error in the VSCode console:

screen shot 2017-05-31 at 7 59 53 pm

@ivancuric you see the same error? cc @lukaszmoroz @RobinMalfait

@RobinMalfait
Copy link
Owner

I have no idea why it suddenly stopped working. On that note, I might deprecated this extension because there are other extensions that do exactly the same as this extension.

https://github.com/esbenp/prettier-vscode

@GollyJer
Copy link

GollyJer commented Jun 2, 2017

@RobinMalfait
Makes sense. No need to duplicate work. I like your icon better though. :-)

@oieduardorabelo I was able to track down the problem. You can get the details here.

@oieduardorabelo
Copy link

oieduardorabelo commented Jun 6, 2017

Interesting, both plugins for me wasn't working...and, I think the problem is actually another one:

Before the latest update (node/VSCode) my ~/Library/Application Support/Code/User folder was symlinked to my ~/.dotfiles/vscode/User,

If I remove the symlink, everything works again (both plugins),

@GollyJer @RobinMalfait

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

4 participants