erikdesjardins / eslint-plugin-dollar-sign

Enforce $varName for jQuery assignment.
https://www.npmjs.com/package/eslint-plugin-dollar-sign
MIT License
3 stars 1 forks source link

not working on eslint: "^4.16.0" #11

Open marcelmokos opened 6 years ago

marcelmokos commented 6 years ago

Error: Failed to load plugin dollar-sign: Cannot find module 'eslint-plugin-dollar-sign'

.eslint.yml

---
extends:
  - airbnb-base/legacy
  - prettier

env:
  amd: true
  browser: true
  jasmine: true
  jquery: true
  es6: false

parserOptions:
  ecmaVersion: 5
  ecmaFeatures:
    globalReturn: false

plugins:
  - import
  - prettier
  - dollar-sign

rules:
  dollar-sign/dollar-sign:
    - error
    - ignoreProperties
erikdesjardins commented 6 years ago

What does npm ls eslint-plugin-dollar-sign output?

marcelmokos commented 6 years ago

I am sure that did npm i --save-dev eslint-plugin-dollar-sign and I did check the node_modules and everything seemed fine.

npm ls eslint-plugin-dollar-sign
project
└── eslint-plugin-dollar-sign@1.0.1 
erikdesjardins commented 6 years ago

With that out of the way, I can't debug any further without an example repo.

marcelmokos commented 6 years ago

I found the problem, It was caused by setting in IDE the eslint was taken from another directory and It caused the issue in that directory node_modules were missing eslint-plugin-dollar-sign. Cannot find module 'eslint-plugin-dollar-sign' you can close the issue.

diegocr commented 2 years ago

@erikdesjardins is this plugin abandoned? it was kinda handy :)

Perhaps you can talk with @4dvn-hieu about his fork since he seems to have fixed it for ESLint 8+