Code Monkey home page Code Monkey logo

eslint-plugin-self's People

Contributors

adrieankhisbe avatar bpscott avatar duailibe avatar not-an-aardvark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eslint-plugin-self's Issues

'Failed to load plugin 'self' declared in '--config': enabledPluginName.replace is not a function' with v9 compatible add-on

When attempting to use this plugin with a v9 compatible add-on, a message such as this is produced:

TypeError: Failed to load plugin 'self' declared in '--config': enabledPluginName.replace is not a function
    at /Users/mark/dev/eslint-plugin-json/node_modules/eslint-plugin-self/index.js:38:53
    at Array.map (<anonymous>)
    at /Users/mark/dev/eslint-plugin-json/node_modules/eslint-plugin-self/index.js:38:10
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/mark/dev/eslint-plugin-json/node_modules/eslint-plugin-self/index.js:29:31)
    at Module._compile (/Users/mark/dev/eslint-plugin-json/test/packages/eslint-v7/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)

The new configuration format allows for a combination of:

{
  "configs": {
    "recommended-legacy": {
      "plugins": ["json"],
      "rules": {
        "json/*": "error",
      },
    },
    "recommended": {
      "plugins": { // object that refers to the plugin itself }
      "rules": {
        "json/*": "error",
      },
    }
  }

so this needs to be handled in some manner.

This is awesome.

Thanks for making this module ❤️ it's SUPER COOL.

We have our own "shared config" eslint plugin that we use to ensure code standards.
It uses several plugins, like eslint-plugin-node and eslint-plugin-mocha to expose a bunch of really useful rules.

So that every library that uses our eslint plugin doesn't have to also directly require those plugins, we export the plugins with prefixes as per this eslint issue.

Recently when I added a new global rule deprecating a module using eslint-plugin-node's "no-restricted-require" I got a bunch of errors because our existing method of linting ourself didn't get those prefixes.

Installed this module and it automatically just works.

Lifesaver!

I'll insta close this as I don't want anything, just wanted to say thank you and share how this is being used somewhere ❤️

Not working with pnpm

Hi there - I'm trying to use this project in a repo that uses pnpm rather than yarn/npm. pnpm installs packages differently so the assumption that ../.. will find the correct module breaks down. In my case, the installed is located at /path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/eslint-plugin-self/index.js.

Looks like #4 would likely fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.