Skip to content
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

ESLint 6.3.0 require plugin&preset relative node_modules #12223

Closed
DemonCloud opened this issue Sep 5, 2019 · 3 comments
Closed

ESLint 6.3.0 require plugin&preset relative node_modules #12223

DemonCloud opened this issue Sep 5, 2019 · 3 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint

Comments

@DemonCloud
Copy link

DemonCloud commented Sep 5, 2019

MacOSX 10.14

node 12.9

npm 6.11.3 & yarn 1.17.3

my global eslintrc.js in hold on $HOME dir

/Users/yijun/.eslintrc.js

Screen Shot 2019-09-05 at 12 00 33 PM

Screen Shot 2019-09-05 at 11 56 12 AM

why the ESLint can not find global "google" config???

if I install node_module on $HOME dir, it can work!!

how the ESLint find the relative node_modules position??

@DemonCloud DemonCloud added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Sep 5, 2019
@DemonCloud
Copy link
Author

DemonCloud commented Sep 5, 2019

~/.eslintrc.js
module.exports = {
  root: true,
  env: {
    browser: true,
    commonjs: true,
    es6: true,
    node: true,
  },
  parser: '@typescript-eslint/parser',
  plugins: [
    '@typescript-eslint',
    'react'
  ],
  extends: [
    'eslint:recommended',
    'google',
    'plugin:@typescript-eslint/eslint-recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:react/recommended',
  ],
  globals: {
    wx: null,
    App: null,
    Page: null,
    getApp: null,
    Component: null,
  },
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
    ecmaVersion: 2019,
    sourceType: 'module',
  },
  rules: {
    '@typescript-eslint/no-explicit-any': 'off',
    'react/prop-types': 'off',
    'object-curly-spacing': 'off',
    'accessor-pairs': 'error'
  },
};

@DemonCloud DemonCloud reopened this Sep 5, 2019
@mysticatea
Copy link
Member

Thank you for your question.

ESLint 6 loads plugins relative to CWD. If you give --resolve-plugins-relative-to option, will load plugins from there.

I'm closing this issue as a duplicate of #11914.

@mysticatea mysticatea added question This issue asks a question about ESLint and removed bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Sep 5, 2019
@DemonCloud
Copy link
Author

@mysticatea thanks

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 4, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint
Projects
None yet
Development

No branches or pull requests

2 participants