Git Product home page Git Product logo

un-es / eslint-plugin-i Goto Github PK

View Code? Open in Web Editor NEW

This project forked from import-js/eslint-plugin-import

140.0 140.0 4.0 4.42 MB

A fork of `eslint-plugin-import` using `get-tsconfig` to replace `tsconfig-paths` and heavy `typescript` under the hood.

Home Page: https://github.com/import-js/eslint-plugin-import

License: MIT License

JavaScript 98.93% CoffeeScript 0.01% TypeScript 0.25% Shell 0.21% PowerShell 0.04% Batchfile 0.02% HTML 0.56%
eslint eslint-plugin eslint-plugin-import

eslint-plugin-i's People

Contributors

arcanemagus avatar benmosher avatar bmish avatar bradzacher avatar byteme980 avatar christophercurrie avatar danny-andrews avatar futpib avatar golopot avatar graingert avatar greenkeeperio-bot avatar j-f1 avatar jablko avatar jfmengels avatar josh avatar k15a avatar knpwrs avatar le0nik avatar ljharb avatar ljqx avatar lydell avatar manuth avatar millerized avatar rfermann avatar sheepsteak avatar singles avatar sompylasar avatar sosukesuzuki avatar tizmagik avatar yp avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

eslint-plugin-i's Issues

Performance benchmarks?

I'm interested in perhaps using this fork, but I'm curious what real-world performance improvements you've seen compared with the upstream project. It would be great to know how much faster I could expect this fork to be.

Release final version

Would it be possible to release a final version ? The last one is a pre-release one

Action is broken

I think the rebase action is broken for a while. Can you please fix it?

dependency resolve-pkg-maps is missing in 2.27.5-2

after the update from version 2.27.5-1 to 2.27.5-2 i get the error:

Oops! Something went wrong! :(

ESLint: 8.43.0

Error: Failed to load plugin 'import' declared in '.eslintrc.cjs': Cannot find module 'resolve-pkg-maps'

Manual rebase and sync upstream

@JounQin

eslint-plugin-i seems to be up of sync from upstream for months:

image

A manual rebase is required.


The object.groupby package can be replaced with this:

// This is a **non spec compliant** but works in practice replacement of `object.groupby` package.
const groupBy = (array, grouper) => array.reduce((acc, cur) => {
  const key = grouper(cur);
  (acc[key] = acc[key] || []).push(cur);
  return acc;
}, {});

And object.fromentries can be replaced with const { fromEntries } = Object;

How to install with yarn?

I tried to install this using the instructions as given in the README, but I'm using yarn.

~/c/s/s/code ❯❯❯ yarn add  eslint-plugin-import@npm:eslint-plugin-i                                                                                        next ✱
➤ YN0000: ┌ Resolution step
➤ YN0016: │ eslint-plugin-import@npm:eslint-plugin-i: Registry failed to return tag "eslint-plugin-i"

I'll keep looking into a possible solution and report back here if I'm able to find one.

`eslint-plugin-r`?

Hey there!

I thought I would follow the same path and create a fork of eslint-plugin-react, eslint-plugin-r, shaving off unnecessary polyfills. It's nowhere near as well done, as it lacks auto-release feature for example, but if anyone's interested, here it is:

https://github.com/wojtekmaj/eslint-plugin-r

Add missing dependencies

Trying to use this package for the first time, I got:

Error: Failed to load plugin 'import' declared in '.eslintrc.js': Cannot find module 'array.prototype.flatmap'

Looks like because 2.28.0 added dependencies on:

  • array.prototype.flatmap
  • array.prototype.findlastindex
  • object.fromentries

Which means they should be added to dependencies here too (unless they're being handled some other way).

Workaround is just to add the missing dependency as a dev dependency in my project.

Regression during upgrade from 2.26.0-2 to 2.27.5

Affected code:

export { DecodedIdToken } from 'firebase-admin/lib/auth/token-verifier';

Error: Unable to resolve path to module 'firebase-admin/lib/auth/token-verifier' import/no-unresolved

Versions before:

    "firebase-admin": "^11.5.0",
    "eslint-plugin-import": "npm:eslint-plugin-i@^2.26.0-2",

Versions after:

    "firebase-admin": "^11.5.0",
    "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5",

Drop all those unnecessary polyfills

"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flat": "^1.3.1",
"array.prototype.flatmap": "^1.3.1",
"debug": "^3.2.7",
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-module-utils": "^2.8.0",
"get-tsconfig": "^4.6.0",
"has": "^1.0.3",
"is-core-module": "^2.12.1",
"is-glob": "^4.0.3",
"minimatch": "^3.1.2",
"object.values": "^1.1.6",
"resolve": "^1.22.3",
"semver": "^6.3.0"
}

There are WAY TOO MANY polyfills in the dependencies. Let's target Node.js 14 and drop all of them!

support for `exports`

A major issue with eslint-plugin-import is that it doesn't support exports: import-js#1810

I was wondering if you might consider using resolve.exports or enhanced-resolve rather than the outdated resolve package in this library to address that

Rebase workflow fails because of branch protection

Since Sep 16, the rebase workflow fails to push. I think you may need to disable branch protection on GitHub UI for it to work again:

 Successfully rebased and updated refs/heads/fork-release.
remote: error: GH006: Protected branch update failed for refs/heads/fork-release.        
remote: error: Changes must be made through a pull request.        
To https://github.com/un-es/eslint-plugin-i
 ! [remote rejected] fork-release -> fork-release (protected branch hook declined)
error: failed to push some refs to 'https://github.com/un-es/eslint-plugin-i'

Does not recognize `i/extensions`

It seems the plugin does not recognize this:

settings:
  i/extensions: [".js", ".jsx", ".ts", ".tsx"]

It only worked after renaming to import/extensions.

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.