Giter Site home page Giter Site logo

eslint-config's People

Contributors

rtritto avatar scottagirs avatar valoricde 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

Watchers

 avatar  avatar

eslint-config's Issues

Remove `prettier` from dependencies

prettier dependency is a peerDependencies of eslint-plugin-prettier.
eslint-plugin-prettier plugin can be disabled changing .eslintrc.yml file as follow:

rules:
  prettier/prettier: 0

So prettier dependency is useless in dependencies of package.json file and, to prevent its install, it should be removed from dependencies and become optional.

Changes in package.json file:

  • remove prettier dependency from dependencies (run yarn remove prettier)
  • add manually (I don't know if there are yarn commands to update/create these fields):
  "peerDependencies": {
    ...
    "prettier": ">= 2.x.x" // OR exact version; it should be equal/compatible/maintained with peerDependency.prettier version value of eslint-plugin-prettier
  },
  "peerDependenciesMeta": {
    "prettier": {
      "optional": true
    }
  }

PS: these changes must be tested

ESLint v8 Support @ijsto/eslint-config

eslint version 8 was released and I got warning on install step.

Step to reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn add eslint @ijsto/eslint-config

Result

Actual

...
➤ YN0060: │ test-eslint@workspace:. provides eslint (p05a5b) with version 8.0.0, which doesn't satisfy what @ijsto/eslint-config and some of its descendants request
...

Expect

No warning in log

Versions

eslint: 8.0.0
@ijsto/eslint-config: 4.1.6

⚠️ UPDATE:

This issue is confirmed and is a composite issue which requires for a wider ecosystem support for ESLint v8.

We are aware of this, we will monitor and update the codebase to provide support to ESLint v8 as soon as it's possible.

Please see below for a tracker of the current progress (will be updated incrementally).

ESLint couldn't determine the plugin "import" uniquely

This issue, using yarn version >= 3.2.0-rc.7, is related to a conflict with 2 different ESLint config of eslint-plugin-import:

  • eslint-config-next
  • @ijsto/eslint-config » eslint-config-airbnb » eslint-config-airbnb-base

Steps to reproduce

  1. yarn init -y
  2. yarn set version canary (currently install yarn v3.2.0-rc.9)
  3. yarn add @ijsto/eslint-config eslint eslint-config-next next react react-dom
  4. Create .eslintrc.yml file :
extends:
  - '@ijsto'
  - next
  1. Create an empty index.js file
  2. Run 1 or both commands below
  • yarn eslint index.js --> output:
Oops! Something went wrong! :(

ESLint: 8.4.1

ESLint couldn't determine the plugin "import" uniquely.

- C:\test-eslint\.yarn\__virtual__\eslint-plugin-import-virtual-2a929f9851\0\cache\eslint-plugin-import-npm-2.25.3-f5faefaae3-8bdf4b1faf.zip\node_modules\eslint-plugin-import\lib\index.js (loaded in ".eslintrc.yml » eslint-config-next")
- C:\test-eslint\.yarn\__virtual__\eslint-plugin-import-virtual-c11863593e\0\cache\eslint-plugin-import-npm-2.25.3-f5faefaae3-8bdf4b1faf.zip\node_modules\eslint-plugin-import\lib\index.js (loaded in ".eslintrc.yml » @ijsto/eslint-config » eslint-config-airbnb » C:\test-eslint\.yarn\__virtual__\eslint-config-airbnb-base-virtual-daa201a79f\0\cache\eslint-config-airbnb-base-npm-15.0.0-802837dd26-38626bad2c.zip\node_modules\eslint-config-airbnb-base\index.js » C:\test-eslint\.yarn\__virtual__\eslint-config-airbnb-base-virtual-daa201a79f\0\cache\eslint-config-airbnb-base-npm-15.0.0-802837dd26-38626bad2c.zip\node_modules\eslint-config-airbnb-base\rules\imports.js")

Please remove the "plugins" setting from either config or remove either plugin installation.

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team
  • yarn next lint index.js --> output:
Error: Plugin "import" was conflicted between ".eslintrc.yml » eslint-config-next" and ".eslintrc.yml » @ijsto/eslint-config » eslint-config-airbnb » C:\test-eslint\.yarn\__virtual__\eslint-config-airbnb-base-virtual-daa201a79f\0\cache\eslint-config-airbnb-base-npm-15.0.0-802837dd26-38626bad2c.zip\node_modules\eslint-config-airbnb-base\index.js » C:\test-eslint\.yarn\__virtual__\eslint-config-airbnb-base-virtual-daa201a79f\0\cache\eslint-config-airbnb-base-npm-15.0.0-802837dd26-38626bad2c.zip\node_modules\eslint-config-airbnb-base\rules\imports.js"

VSCode Extensions

I know it seems silly, but you might want to add in the instructions that you need to have these extensions installed in VSCode:

ESLint (dbaeumer.vscode-eslint)
Prettier - Code formatter (esbenp.prettier-vscode)

Typescript support

Hi @ijsto, I see in my code some errors which might be related to typescript syntax:

Screenshot 2021-06-16 at 17 42 09

I'm not quite certain because I read that the used babel parser should understand (or rather skip) typescript syntax.
So I'm also not quite sure if it is necessary to introduce the @typescript-eslint/parser instead.

I would be willing to work on that but of course only if it is actually needed.
Do you know more about this topic?

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.