profile
viewpoint
Jordan Harband ljharb Hillsborough, CA software engineer/nerd/teacher/will try anything once; surgeon with git rebase. @tc39, ex @airbnb @twitter @MobBase @tripit. Fav punctuation ⸮, scent petrichor

airbnb/javascript 118417

JavaScript Style Guide

airbnb/lottie-android 32296

Render After Effects animations natively on Android and iOS, Web, and React Native

airbnb/lottie-web 26116

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/

airbnb/lottie-ios 22387

An iOS library to natively render After Effects vector animations

airbnb/css 6114

A mostly reasonable approach to CSS and Sass.

airbnb/hypernova 5779

A service for server-side rendering your JavaScript views

airbnb/polyglot.js 3490

Give your JavaScript the ability to speak many languages.

airbnb/prop-types 670

Custom React PropType validators that we use at Airbnb.

airbnb/babel-plugin-dynamic-import-node 546

Babel plugin to transpile import() to a deferred require(), for node

airbnb/babel-plugin-dynamic-import-webpack 495

Babel plugin to transpile import() to require.ensure, for Webpack

issue commenteslint/eslint

Bug: "use strict" should not trigger strict mode in ES3

As for running the file twice - that's never been required in all of eslint's history. If i run it in ecmaVersion 5, it works in every later ecmaVersion, and the same has been true if i run it in ecmaVersion 3, because of this strict mode behavior. This change means that for the first time ever for eslint, you can't set the ecmaVersion to your lowest target, and run eslint once. This feels like a breaking change to me.

fasttime

comment created time in 4 hours

pull request commentyannickcr/eslint-plugin-react

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link`

I also filed #3180 to track updating the implementation - I think now that we have "pairs", and good test cases, it'd be worth rewriting it from scratch.

Primajin

comment created time in 4 hours

pull request commentyannickcr/eslint-plugin-react

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link`

Heads up that I did need to land https://github.com/yannickcr/eslint-plugin-react/commit/5f49f51dd237dd4c6758bc0c3e5b300a28770966, due to array destructuring and spread syntax not working on node 4 and 5.

Primajin

comment created time in 4 hours

issue commentimport-js/eslint-plugin-import

import/ignore does not handle symlinked path?

Actually, I think there is a real issue here. We're using resolve v1, which preserves symlinks by default, but node (and resolve v2) follows them by default.

What happens if you set your import/resolver settings so the node resolver is node: { preserveSymlinks: false }?

dgolant

comment created time in 5 hours

issue commentnvm-sh/nvm

Cant install on ubuntu 20.0.4

Those “failed to download” messages are the issue.

Are you able to connect to GitHub on the command line?

Also, please answer every question on the template - especially the last one.

augchan42

comment created time in 5 hours

issue commentsubstack/tape

Feature Request: --no-only flag for tape CLI command

No, both is ideal. However, for each, if an env var is specified a command line flag should overwrite it.

EarthyOrange

comment created time in 8 hours

issue commentljharb/get-intrinsic

Firefox still complains about CSP

If Firefox is going to warn on never-executed Function usage, then there’s not much i can do about it.

you may want to file a bug for Firefox.

andrewbrock-sahmri

comment created time in 9 hours

issue commenteslint/eslint

Bug: "use strict" should not trigger strict mode in ES3

Is it out of the question to add an option on ecmaVersion 3, to restore this behavior that's probably been there forever?

fasttime

comment created time in 9 hours

issue commenteslint/eslint

Bug: `indent` is not reporting on wrong indentation

Awesome, an option sounds great too!

As soon as I get a pointer and the go-ahead I'd be happy to take a crack at a PR.

ljharb

comment created time in 10 hours

push eventljharb/eslint-plugin-react

Jordan Harband

commit sha 5f49f51dd237dd4c6758bc0c3e5b300a28770966

[Fix] `no-invalid-html-attribute`: avoid breaking syntax from #3174

view details

push time in 11 hours

push eventyannickcr/eslint-plugin-react

Jordan Harband

commit sha 5f49f51dd237dd4c6758bc0c3e5b300a28770966

[Fix] `no-invalid-html-attribute`: avoid breaking syntax from #3174

view details

push time in 11 hours

push eventyannickcr/eslint-plugin-react

Jordan Harband

commit sha 6a902ecb9b928bbd4cfdd10117b8246e27999e3a

[Fix] `no-invalid-html-attribute`: avoid breaking syntax from #3174

view details

push time in 11 hours

push eventljharb/eslint-plugin-react

Jordan Harband

commit sha 6a902ecb9b928bbd4cfdd10117b8246e27999e3a

[Fix] `no-invalid-html-attribute`: avoid breaking syntax from #3174

view details

push time in 11 hours

PR closed nvm-sh/nvm

SWIXECOINFUNDS

A cryptocurrency investment company

+1 -0

1 comment

1 changed file

JSONENCODE112

pr closed time in 11 hours

pull request commentnvm-sh/nvm

SWIXECOINFUNDS

Please don't spam.

JSONENCODE112

comment created time in 11 hours

pull request commentnodejs/node

esm: handle extension-less "bin" files

@arcanis it is a fact that node can be made to be package manager agnostic, but it is also a fact that it currently is not, by default. Please don't make attacks on my character merely because you disagree with my claims; we do have a code of conduct here.

JakobJingleheimer

comment created time in 12 hours

push eventyannickcr/eslint-plugin-react

Jordan Harband

commit sha 2445dbb041b9a5025edba6c156cbcd5ff78d7d17

[Tests] `no-invalid-html-attribute`: fix test cases

view details

push time in 12 hours

push eventljharb/eslint-plugin-react

Jordan Harband

commit sha 2445dbb041b9a5025edba6c156cbcd5ff78d7d17

[Tests] `no-invalid-html-attribute`: fix test cases

view details

push time in 12 hours

issue openedyannickcr/eslint-plugin-react

`no-invalid-html-attribute`: redo implementation

The implementation needs to be rewritten from scratch to handle possible pairs or singles, and to trim all leading and trailing whitespace, and to collapse all whitespace segments into a single space.

created time in 12 hours

push eventljharb/eslint-plugin-react

Jordan Harband

commit sha 4c3d00f8c31c556ff234fc3c1a876236a6db1ad5

[Tests] `no-invalid-html-attribute`: add some more tests

view details

Jannis Hell

commit sha e0af60b1e38c4dc236128fe95bc8723a4c46d67d

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link` Fixes #3172

view details

push time in 12 hours

PR merged yannickcr/eslint-plugin-react

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link`

Closes #3172

Description

For historical reasons, the icon keyword may be preceded by the keyword "shortcut".

https://html.spec.whatwg.org/multipage/links.html#rel-icon (last sentence before the next paragraph about license)

Intentions

  1. First of all I'm checking if there are pairs registered for the given attribute name after all.
  2. Now I'm splitting the attribute value(s) into overlapping pairs. If you want to check on the funky regex: https://regex101.com/r/aJXAEz/1
  3. now I'm iterating pair by pair
  4. on each pair I check what are the possible siblings for my current item - currently there is only 1:1 but potentially there could be a pair where foo can go with bar OR baz but NEVER qux
  5. now I check if my pair is separated by a single space or multiple in between
  6. Check if the first value has a corresponding pairing
  7. Get the last value as this is the "real" second one
  8. Check if this is not one of the anticipated siblings
  9. set message and message id based on, if the second value is truthy
    1. if it is the attribute was not paired with the right one
    2. if its not it stands alone which makes it invalid.
  10. report the issue
  11. check if there is only one option what the sibling could be, if there is only one anyways let's autofix it for the user! 🎉

Demo

This introduces two new messages:

<link rel="shortcut"></link>

Reports: “shortcut” must be directly followed by “icon”.

<br><br>

<link rel="shortcut manifest"></link>

Reports: “shortcut” can not be directly followed by “manifest” without “icon”.<br>

+226 -7

6 comments

3 changed files

Primajin

pr closed time in 12 hours

push eventyannickcr/eslint-plugin-react

Jordan Harband

commit sha 4c3d00f8c31c556ff234fc3c1a876236a6db1ad5

[Tests] `no-invalid-html-attribute`: add some more tests

view details

Jannis Hell

commit sha e0af60b1e38c4dc236128fe95bc8723a4c46d67d

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link` Fixes #3172

view details

push time in 12 hours

issue closedyannickcr/eslint-plugin-react

`react/no-invalid-html-attribute` seems to report false positives

Hey there, I've got an automatic lint bump in my repo that introduces react/no-invalid-html-attribute as a new rule and it fails with two/three errors:

https://github.com/Primajin/eyesbound/runs/4760311505?check_suite_focus=true

Error - “home” is never a valid “rel” attribute value.

By adding rel="home" to a hyperlink, a page indicates that the destination of that hyperlink is the homepage of the site [...] https://microformats.org/wiki/rel-home This is a draft from 2005... Not sure if it was ever official?

Error - “shortcut” is never a valid “rel” attribute value.

If I read https://mathiasbynens.be/notes/rel-shortcut-icon correctly this is not according to specification but older IE need it when the file is not exactly called favicon.ico, is that correct?

So are these arguably false positives, or instead everyone is just using it wrong and it was never a specification - thus I still wonder if everyone uses it kind of makes it a default 🤔 😅 Thanks for looking into it folks.

closed time in 12 hours

Primajin

pull request commentnodejs/node

esm: handle extension-less "bin" files

@JakobJingleheimer no, it's not, corepack is disabled by default and still experimental; but separately, imo it'd take another 10 years of being package agnostic to invalidate the last 10 years of having one defacto standard set of behavior.

JakobJingleheimer

comment created time in 12 hours

issue openednpm/rfcs

[RRFC] remove `npm-shrinkwrap.json` from the list of unignorable files

Motivation ("The Why")

I have npm-shrinkwrap.json in both .gitignore and .npmignore on basically all of my repos. However, I unknowingly broke ls-engines when I published it, not realizing that the npm-shrinkwrap.json i'd been playing with would be published despite being explicitly ignored.

Possible solutions

  • allow npm-shrinkwrap.json to be npmignored
  • fail a publish when an unignorable file is explicitly ignored, via "files" or ".npmignore" or ".gitignore"

The upsides

  • it would be much harder to accidentally break consumers by publishing a shrinkwrap (something that's a long-standing bad practice anyways)

The downsides

  • someone who wants to publish a shrinkwrap would only be able to do so if they weren't already explicitly ignoring it.

Can anyone provide any scenario where making one of the above changes would pose problems for someone?

created time in 12 hours

push eventPrimajin/eslint-plugin-react

Jordan Harband

commit sha 4c3d00f8c31c556ff234fc3c1a876236a6db1ad5

[Tests] `no-invalid-html-attribute`: add some more tests

view details

Jannis Hell

commit sha e0af60b1e38c4dc236128fe95bc8723a4c46d67d

[Fix] `no-invalid-html-attribute`: allow 'shortcut icon' on `link` Fixes #3172

view details

push time in 12 hours

issue commentpkgjs/parseargs

Is `strict` actually a goal?

Must we support every possible use case? Or perhaps it’d be better to establish good defaults, since nobody is forced to use this solution, and it’s perfectly fine if not everyone can.

shadowspawn

comment created time in 14 hours

pull request commentnodejs/node

esm: handle extension-less "bin" files

Do all the major package managers do that?

npm does that, which means that any alternative that doesn’t is broken ¯\_(ツ)_/¯

JakobJingleheimer

comment created time in 14 hours

pull request commentnodejs/node

v17.4.0 release proposal

tape should be fixed in https://github.com/substack/tape/commit/b9959f8c132874eff32497b9189d0a7cf74e8c14, assuming you're using the latest commit and not the latest release.

targos

comment created time in 17 hours

push eventljharb/tape

Jordan Harband

commit sha b9959f8c132874eff32497b9189d0a7cf74e8c14

[meta] fix `prelint` so it does not fail outside of a git repo per https://github.com/nodejs/node/pull/41557#issuecomment-1014664887

view details

push time in 17 hours

more