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

False dependency when using ESLint vue plugin #239

Closed
Milad opened this issue Jan 27, 2018 · 6 comments
Closed

False dependency when using ESLint vue plugin #239

Milad opened this issue Jan 27, 2018 · 6 comments

Comments

@Milad
Copy link
Contributor

Milad commented Jan 27, 2018

Usage of eslint-plugin-vue in .eslintrc.js

module.exports = {
    'extends': [
        'plugin:vue/essential',
        'plugin:vue/recommended',
        'plugin:vue/strongly-recommended'
    ],
    parser: 'vue-eslint-parser',
    parserOptions: {
        ecmaFeatures: {jsx: true},
        ecmaVersion: 6,
        sourceType: 'module'
    },
    env: {
        browser: true,
        es6: true,
        // jquery: true,
        node: true
    },
    globals: {module: false},
    plugins: ['vue'],
    rules: {}
};

depcheck --json output:

{
  "missing": {
    "eslint-config-plugin:vue": [
      ".eslintrc.js"
    ]
  },
}
@aecz
Copy link

aecz commented Feb 22, 2018

Same error here with this config:

{
  "env": {
    "browser": false,
    "es6": true,
    "node": true,
    "mocha": true
  },
  "parserOptions": {
    "ecmaVersion": 2017,
    "sourceType": "module"
  },
  "plugins": ["security"],
  "extends": ["eslint:recommended", "plugin:security/recommended"],
  "rules": {
    "no-console": "warn"
  }
}

Result:

$ npx depcheck
Missing dependencies
* eslint-config-plugin:security

depcheck version: 0.6.8

@aecz
Copy link

aecz commented Feb 23, 2018

I found a workaround. We can use the relative/absolute path syntax in the extends array and add the specific rules to activated them.

  "extends": [
    "eslint:recommended",
    "./node_modules/eslint-plugin-security/rules/detect-new-buffer.js",
    "./node_modules/eslint-plugin-security/rules/detect-non-literal-fs-filename.js,"
    "./node_modules/eslint-plugin-security/rules/detect-object-injection.js"
  ],
  "rules": {
    "security/detect-new-buffer": "warn",
    "security/detect-non-literal-fs-filename": "warn",
    "security/detect-object-injection": "warn",
  }

@NetOpWibby
Copy link

The year is half over and this is still an issue. Shame.

@stale
Copy link

stale bot commented Nov 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 2, 2019
@VincentLanglet
Copy link
Contributor

VincentLanglet commented Nov 3, 2019

@rumpl This issue is fixed, I just tested it
Fixed by #309

Edit: BTW I can check others PR/issue if you want. Tell me if you want I stop pinging you

@stale stale bot removed the wontfix label Nov 3, 2019
@rumpl
Copy link
Member

rumpl commented Nov 3, 2019

Go ahead yeah. Thanks!

@rumpl rumpl closed this as completed Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants