Giter Site home page Giter Site logo

Comments (4)

rtritto avatar rtritto commented on July 26, 2024

Conflict is generated because eslint-plugin-import is a dependency in:

  • @ijsto/eslint-config (needed by peerDependencies of eslint-config-airbnb)
  • eslint-config-next

Probably, a possible solution in @ijsto/eslint-config is to add eslint-config-next and to remove eslint-config-airbnb.

FYI

  • Next.js ESLint:

    ... Next.js will automatically install eslint and eslint-config-next as development dependencies in your application ...

from eslint-config.

ScottAgirs avatar ScottAgirs commented on July 26, 2024

@rtritto interesting, thank you for providing these details! I wonder how would this work outside of a Next.js project.

from eslint-config.

rtritto avatar rtritto commented on July 26, 2024

Some duplicated dependencies in eslint-config-next to remove in @ijsto/eslint-config (they should conflict after removing eslint-plugin-import):

  • eslint-plugin-jsx-a11y
  • eslint-plugin-react
  • eslint-plugin-react-hooks

Another interesting feature, gained with eslint-config-next, is the import resolver of TypeScript (eslint-import-resolver-typescript).

from eslint-config.

rtritto avatar rtritto commented on July 26, 2024

By this way, @ijsto/eslint-config must install all peerDependencies of eslint-config-next:

  • next and (maybe) typescript from eslint-config-next
  • react and react-dom from next

FYI

  • Recommended Plugin Ruleset:

    If you already have ESLint configured in your application and any of the following conditions are true:
    You have one or more of the following plugins already installed (either separately or through a different config such as airbnb or react-app): react, react-hooks, jsx-a11y, import ...
    Then we recommend either removing these settings if you prefer how these properties have been configured within eslint-config-next or extending directly from the Next.js ESLint plugin instead: ...

  • ESLint config:

    If you would like to use eslint-config-next along with other ESLint configurations, refer to the Additional Configurations section to learn how to do so without causing any conflicts.


Or, maybe, install and use only eslint-plugin-next instead of eslint-config-next; source:

  • ESLint Plugin:

    Next.js provides an ESLint plugin, eslint-plugin-next...
    If you already have ESLint configured in your application, we recommend extending from this plugin directly instead of including eslint-config-next unless a few conditions are met. Refer to the Recommended Plugin Ruleset to learn more.

from eslint-config.

Related Issues (6)

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.