profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/TSMMark/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Mark Allen TSMMark @Vydia Greater NYC http://vydia.com Black Lives Matter. Dad, Co-founder & VP Engineering @Vydia, Empowering the next generation of creators. ❤️ React GraphQL JS Ruby.

APSL/react-native-keyboard-aware-scroll-view 4351

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.

kudago/smart-app-banner 509

Lightweight smart app banner with no jquery requirement

dannyvassallo/sernjs 22

React, Node, Express, Passport, and Material-ui boilerplate with live-reloading capability server and clientside. (Welcoming contributions!)

dannyvassallo/vine_dl 5

Auth a user in to vine and download the available videos to your computer or server.

cloworm/guess-that-gif 3

Guess that Gif

cloworm/regex-playground 2

RegEx Playground with examples built in React

cloworm/todo 2

Todo App built with Next.js and Tailwind CSS. Animated with Framer Motion

dannyvassallo/git-bash-profile 1

Tweaks on the bash setup from: http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt with instructions for OSX setup VS linux

TSMMark/fg2app 1

FanGate App v2.0

issue commentfernandopasik/react-children-utilities

groupByType support UppercaseComponent, not only lowercase like div + span

I think uglify / terser will shorten function names but I haven't confirmed yet. e.g. https://webpack.js.org/plugins/terser-webpack-plugin

TSMMark

comment created time in 3 hours

startedmysticatea/eslint-plugin-eslint-comments

started time in 18 hours

issue commentfernandopasik/react-children-utilities

groupByType support UppercaseComponent, not only lowercase like div + span

I think it's pretty common for production bundles with standard babel plugins.. Related examples I just found:

  • https://stackoverflow.com/q/61750233/2696867
  • https://www.albertgao.xyz/2017/10/31/why-this-react-code-not-work-in-production/

What we ended up resorting to is essentially manually grouping expected children by actual component class/function by object reference. E.g. child.type === SomeReactComponentFunction

Example snippet:

const groupedChildren = useMemo(() => {
  const groupedChildren = {
    ExtraRow: [],
    RowBanner: [],
    RowCell: [],
    SharedComponents: [],
  }

  Children.forEach(children, (child) => {
    switch (child.type) {
    case ExtraRow:
      groupedChildren.ExtraRow.push(child)
      break
    case RowCell:
      groupedChildren.RowCell.push(child)
      break
    case RowBanner:
      groupedChildren.RowBanner.push(child)
      break
    case SharedComponents:
      groupedChildren.SharedComponents.push(child)
      break
    default:
      break
    }
  })

  return groupedChildren
}, [children])

I think my OP request to rely on component names is not suitable for production unfortunately. Sorry about that.

It might be possible to generalize the above code snippet into a custom hook that will work with any components, and reduce some of the boilerplate in manually doing a big switch case...

Imagining it would have an interface similar to this (flow types included):

const groupedChildren = useGroupedChildren(children, {
  // This object is the `Name: ReactComponent` map
  RowBanner: RowBanner,
  RowCell: RowCell,
  SharedComponents: SharedComponents,
})

// groupedChildren would include the properties provided above, for example:
groupedChildren.RowBanner.length // => 1
groupedChildren.RowCell.length // => 5
groupedChildren.SharedComponents.length // => 0
// etc

Example usage including flow types, where useGroupedChildren is typed as a generic:

const groupedChildren = useGroupedChildren<{|
  RowBanner: React$Element<typeof RowBanner>,
  RowCell: React$Element<typeof RowCell>,
  SharedComponents: React$Element<typeof SharedComponents>,
|}>(children, {
  RowBanner: RowBanner,
  RowCell: RowCell,
  SharedComponents: SharedComponents,
})
TSMMark

comment created time in a day

issue openedeslint/eslint

Formatting rule for disable directive spacing

Please describe what the rule should do:

warn about (and ideally fix) spacing in eslint-disable and eslint-enable comments.

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem) [X] Suggests an alternate way of doing something (suggestion) [ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

Bad:

/* eslint-disable   some-rule */
/* eslint-enable   some-rule */
/* eslint-disable some-rule,   other-rule    */
//    eslint-disable-next-line   some-rule,   other-rule
// eslint-disable-line   some-rule   ,   other-rule

Good:

/* eslint-disable some-rule */
/* eslint-enable some-rule */
/* eslint-disable some-rule, other-rule */
// eslint-disable-next-line some-rule, other-rule */
// eslint-disable-line some-rule, other-rule */

Why should this rule be included in ESLint (instead of a plugin)?

#14617 introduces fixable disable directives, which have the potential to be formatted with awkward spacing, so @mdjermanovic recommended opening this new issue

Are you willing to submit a pull request to implement this rule?

Potentially

created time in a day

pull request commenteslint/eslint

Breaking: Fixable disable directives (fixes #11815)

Tested this branch on a medium sized codebase, and it seems to work beautifully. So far I've only noticed one minor issue:

I don't know if this is in-scope, or if there's another lint rule that will report/fix this, but I noticed when eslint-disable rules are removed, there's a possibility to end up with multiple adjacent spaces in the disable comment.

Example:

Screen Shot 2021-08-03 at 3 24 05 PM

Thanks again for your work on this

JoshuaKGoldberg

comment created time in 2 days

startedyujinakayama/transpec

started time in 2 days

issue commentfernandopasik/react-children-utilities

groupByType support UppercaseComponent, not only lowercase like div + span

Amazing! We actually ran into a gotcha with this approach in React production mode, when we tried my original proposal of:

groupBy(Children.toArray(children), (child) => child.type.name)

I'm sure you are aware but child.type.name seems to become minified in production transpile.


I will try to test your version soon. Thank you!

TSMMark

comment created time in 2 days

startedbuildkite/image-builder

started time in 3 days

startedjest-community/jest-extended

started time in 3 days

startedrubocop/rubocop-ast

started time in 8 days

startednot-an-aardvark/eslint-rule-composer

started time in 12 days

pull request commentSeinopSys/eslint-plugin-import-newlines

Reproduce type keyword stripped related issue #4

Implementation was actually a breeze and I added more test cases as well. @SeinopSys PTAL when you have time and thanks again for this library !

TSMMark

comment created time in 12 days

push eventTSMMark/eslint-plugin-import-newlines

TSMMark

commit sha 0b1284b7a06688bcbd5a53176e1e46378a9f8164

support type imports when --fix ing

view details

push time in 12 days

PR opened SeinopSys/eslint-plugin-import-newlines

Reproduce type keyword stripped related issue #4

This is not ready to merge.

I got started by reproducing the issue in a test. If I have time soon I might be able to tackle actually fixing this, but I haven't looked into the source code yet. Any pointers would be appreciated to help me out.

Thanks for this library!

+1065 -40

0 comment

3 changed files

pr created time in 13 days

fork TSMMark/eslint-plugin-import-newlines

ESLint plugin for enforcing newlines in ES6 import statements past a certain number of items with automatic fixes

fork in 13 days

issue openedSeinopSys/eslint-plugin-import-newlines

--fix strips type keyword from import declaration

This eslint rule removes the type keyword when autofixing imports

import type { A, B } from './file'

Should fix to:

import type {
A,
B
} from './file'

But instead type is removed and the result is:

import {
A,
B
} from './file'

#2 touches on this issue, but this bug does not appear to be related to consistent-type-imports or any other rule. I think this eslint rule just removes the type keyword when autofixing.

created time in 13 days

startedSeinopSys/eslint-plugin-import-newlines

started time in 13 days

startedsindresorhus/git-remote-origin-url

started time in 19 days

issue openedfernandopasik/react-children-utilities

groupByType support UppercaseComponent, not only lowercase like div + span

Feature Request

Problem to solve

Be able to use groupByType on custom components. Currently only works on native/lowercase react elements/nodes like div, span, p, li, etc.

Consider

<MyComponent>
  <MyTab />
  <MyTab />
  <MyButton />
  <p />
  <p />
</MyComponent>

groupByType(children) inside MyComponent could return:

{
  MyTab: [<MyTab />, <MyTab />],
  MyButton: [<MyButton />],
  p: [<p />, <p />],
}

Possible implementation

Currently you can easily use lodash.groupBy and React.Children.toArray to accomplish this:

groupBy(Children.toArray(children), (child) => child.type.name)

Footnote

Any caveats or reasons this wouldn't work or shouldn't be implemented? I could probably try implementing and submit PR if it would be accepted

created time in 23 days

startedjavierhonduco/server_timing_middleware

started time in 24 days

startedgoogle/brotli

started time in a month

startedquicktype/quicktype-vscode

started time in a month

issue commentformulahendry/vscode-auto-rename-tag

Breaks Undo History

Please fix this. As is, the extension is unusable as it ruins your undo ability.

AverTry

comment created time in a month

pull request commenteslint/eslint

Breaking: Fixable disable directives (fixes #11815)

As an eslint user I'm really looking forward to this. I ran lint with --report-unused-disable-directives at work on our codebase and there were several hundred offenses. We're holding off on making those fixes manually, knowing this new feature is around the corner, and we'll soon be able to easily autofix everything for free! Thanks for your efforts @JoshuaKGoldberg and eslint core team!

JoshuaKGoldberg

comment created time in a month

startedrickhanlonii/jest-silent-reporter

started time in a month

startedbuildkite/trigger-pipeline-action

started time in a month

startedgajus/eslint-plugin-sql

started time in a month

issue commentbuildkite-plugins/ecr-buildkite-plugin

ECR login hangs forever – sporadically

Paula from buildkite support helped me solve this.

it suggests this could happen in an Out Of Memory situation https://github.com/moby/moby/issues/42437

We reduced number of agents per instance (aws stack) and now we don't seem to have the issue.

TSMMark

comment created time in a month

startedrails/execjs

started time in a month