Comments (8)
@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.
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.
@curran think those warnings can be safely ignored so long as the project doesn't contain react or jsx
from d3-component.
@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.
@curran to run eslint, say eslint --fix component.js
from d3-component.
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.
nice, will have a look now. thanks for teaching me about airbnb-base
😄
from d3-component.
made some comments on #78
looks like a nice improvement 👍
from d3-component.
Related Issues (20)
- document context object
- Update examples to 2.0
- Return merged selection
- Destroy potentially called with old datum HOT 1
- More efficient context handling HOT 1
- Accept DOM Node HOT 2
- Update Airport Clocks for Daylight Savings
- Upgrade examples to v2.2.0
- Optimize children selection HOT 1
- Upgrade examples to v3 HOT 4
- Add links to es2015 examples in README
- v3 API Changes HOT 6
- document tests HOT 2
- Create React Interop Examples HOT 2
- Idempotence
- Datum passed to destroy should be most recent
- Performance & clarity concerns with context object
- Make a Small Multiples Example
- Make a Linked Views example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-component.