Giter VIP home page Giter VIP logo

Comments (8)

curran avatar curran commented on May 18, 2024 1

@micahstubbs ESLint is actually not running due to missing the eslint-plugin-jsx-a11y package and another React-related one.

I did some digging and discovered the package airbnb-base, which is the subset of the Airbnb ESLint config that applies to JavaScript only, not JSX, which is exactly what we need here. Using this, these extraneous React-related packages will not be necessary.

Adopting airbnb-base went fairly well, and it simplified the customizations you had introduced in .eslintrc. If you have time, would you be able to review these changes in #78?

from d3-component.

curran avatar curran commented on May 18, 2024

Also just noticed this warning:

npm WARN [email protected] requires a peer of eslint-plugin-jsx-a11y@^1.2.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-react@^5.0.1 but none was installed.

Gathering my thoughts on potential tasks here:

EITHER

  • Add eslint-plugin-jsx-a11y as a devDependency
  • Add eslint-plugin-react as a devDependency

OR

  • Remove the following devDependencies, and make linting more of a personal/optional activity
    "eslint": "^2.9.0",
    "eslint-config-airbnb": "^9.0.1",
    "eslint-plugin-import": "^1.10.2",

I'm not sure if it's better to have +5 devDependencies just for linting, or to have fewer devDependencies for the sake of simplicity.

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

@curran think those warnings can be safely ignored so long as the project doesn't contain react or jsx

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

@curran linting of course is up to you. many of the eslint rules are about correctness rather than code style, so help prevent errors and ambiguous code that could lead to a human error later.

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

@curran to run eslint, say eslint --fix component.js

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

an npm script like this is a common way to make linting easier to do:
"lint": "eslint index.js src --fix"
as used at this other project: https://github.com/micahstubbs/drift/blob/master/package.json#L9

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

nice, will have a look now. thanks for teaching me about airbnb-base 😄

from d3-component.

micahstubbs avatar micahstubbs commented on May 18, 2024

made some comments on #78

looks like a nice improvement 👍

from d3-component.

Related Issues (20)

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.