profile
viewpoint
Mohsen Azimi mohsen1 @airbnb San Francisco, CA https://azimi.me ♥ Open Source 👨🏽‍💻Airbnb https://twitter.com/mohsen____

startedswc-project/swc

started time in 10 days

startedfacebook/jscodeshift

started time in 25 days

issue openednewrelic/node-newrelic

if an error is thrown in `newrelic.js`, the error is swollen

make a simple newrelic.js with following contents:

throw new Error('Error from "newrelic.js`)

now run node -e "require('newrelic')"

Resulting output does not include the actual error.

New Relic for Node.js is disabled due to an error:
....

created time in a month

started1995parham/github-do-not-ban-us

started time in a month

startednikersify/jay

started time in a month

startedhshoff/vx

started time in a month

issue commentQuramy/typed-css-modules

Issues when generated empty files

an export {} can fix this

DavidBabel

comment created time in a month

startedzertosh/nullthrows

started time in a month

Pull request review commentDefinitelyTyped/DefinitelyTyped

webpack: fix FmModule.reasons typing

 declare namespace webpack {             prefetched: boolean;             profile: any; // TODO             providedExports?: any; // TODO-            reasons: {+            reasons: [{

if it can be an object like this or an array of objects like this then you need to put this type into a type reference or interface and then use it here. Something like:

type Reason = {
    explanation: string | undefined;
    // ...
};

            reasons: Reason[] | Reason
Yavanosta

comment created time in a month

issue commentmicrosoft/TypeScript

Move TextEncoder out of lib.dom.d.ts.

Folks at Deno also depend on TextEncoder.

/cc @ry @piscisaureus

MicahZoltu

comment created time in a month

issue commentmohsen1/vscode-prettify-json

Bug: corrupts big ints (int64)

oh I see. Thanks for pointing it out. For a formatter it makes sense to not be JS specific. I am not actively maintaining this package but if I go back to it I might support this as well .

buhrmann

comment created time in 2 months

issue commentmohsen1/vscode-prettify-json

Bug: corrupts big ints (int64)

JSON.parse('822215679726100480') returns 822215679726100500. Where do you see in JSON spec that "big ints are valid in JSON"? JavaScript has bigInts but they have a different literal like 1n but that is not supported in JSON

buhrmann

comment created time in 2 months

PR opened bcherny/flow-to-typescript

Add link for exact types
+1 -1

0 comment

1 changed file

pr created time in 2 months

push eventmohsen1/flow-to-typescript

Mohsen Azimi

commit sha 0211eb460b98d220d5d3aa57f811b50ab150c312

Add link for exact types

view details

push time in 2 months

fork mohsen1/flow-to-typescript

Convert Flow-annotated files to TypeScript

fork in 2 months

issue commentmohsen1/json-formatter-js

Add an optional function for custom formatting

@aj599t with the proposed API it should be possible. What I'm thinking is this:

function format(type: string, value: string, node: HTMLSpanElement): HTMLSpanElement {
  // Here you can apply styles or append classes to the element
  // or even inject new elements inside the span

  node.classList.add('myClass');
  node.style.fontSize = '12px'
  const span = document.createElement('span');
  span.innerText = 'hi';
  node.appendChild(span);
  return node;
}
ChrisCinelli

comment created time in 2 months

issue closedmohsen1/json-formatter-js

Could not find a declaration file for module 'json-formatter-js'

Hello. I use json-formatter-js in my Angular6 project. After updating to version 2.2.1 I started getting this typescript error:

Error:(9, 29) TS7016: Could not find a declaration file for module 'json-formatter-js'. '/node_modules/json-formatter-js/dist/json-formatter.js' implicitly has an 'any' type.
Try `npm install @types/json-formatter-js` if it exists or add a new declaration (.d.ts) file containing `declare module 'json-formatter-js';`

Downgrading back to 2.2.0 fixes it.

closed time in 2 months

ghost

issue commentmohsen1/json-formatter-js

Could not find a declaration file for module 'json-formatter-js'

I believe this is fixed.

ghost

comment created time in 2 months

issue closedmohsen1/json-formatter-js

is there anyway to hide root object?

so instead of displaying Object {...} it will display directly the content of the json object

closed time in 2 months

uraymeiviar

issue closedmohsen1/json-formatter-js

An FYI not an issue actually :)

Howdy

Just an FYI that I've packaged up your json-formatter into a Ruby gem with an example usage.

https://rubygems.org/gems/json-formatter-rails and https://github.com/jayjlawrence/json-formatter-rails.git

Thank you for your good work!

Jay

closed time in 2 months

jayjlawrence

issue closedmohsen1/json-formatter-js

Please do not publish backwards incompatible versions with only patch update

You made a patch update from 2.2.0 to 2.2.1 where you removed dist and added src to npm ignore. This now breaks the build on older NPM versions which do not build files automatically.

Patch versions should not be misused like this. This is not even a backward compatible change so you should change major version.

Can you please provide 2.2.2 version where you keep src and dist, and then if you want publish a new version 2.3.0 or even 3.0.0?

closed time in 2 months

mitar

issue commentmohsen1/json-formatter-js

Please do not publish backwards incompatible versions with only patch update

Sorry about this. I can't unpublish it anymore. Moving forward I will be more thoughtful. Lock files are making this kind of issue happening less.

mitar

comment created time in 2 months

issue closedmohsen1/json-formatter-js

Option to not link URL-looking values

I have JSON with invalid or potentially unsafe URLs I don't want users to click. What do you think about an option to turn off this library's a[href] elements? Or perhaps a hook into node creation?

closed time in 2 months

john-kurkowski

issue commentmohsen1/json-formatter-js

Option to not link URL-looking values

I think this use case is out of scope of this project. It's open source, so feel free to fork and add that custom behavior! ❤️

john-kurkowski

comment created time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha dc17985b4a8a677f17c57d596e99052cb9bbea52

add apollo-cache apollo-server-core apollo-server-env to fix tsc See https://github.com/yarnpkg/berry/issues/271

view details

push time in 2 months

issue commentyarnpkg/berry

[Bug] yarn pnpify tsc can not resolve some graphql types

It is advised that packages never depend to their @types/* packages as a direct or a peer dependency because of various issues that sort of dependency causes.

Since Apollo packages don't require a type dependency it's a bit different. I am not sure what is the right thing to do here.

Installing apollo-server-core as a direct dependency in my TypeScript compiled package will solve my issue. But this is a bad DX. It took a while to find this out.

Maybe TypeScript should have a concept of "type dependencies" and Yarn can install those if TypeScript is involved...

/cc @DanielRosenwasser

mohsen1

comment created time in 2 months

fork mohsen1/apollo-server

🌍 GraphQL server for Express, Connect, Hapi, Koa and more

https://www.apollographql.com/docs/apollo-server/

fork in 2 months

issue openedapollographql/apollo-server

apollo-server-plugin-base depends on apollo-server-core but doesn't include it as a dependency

As it was discovered here:

https://github.com/yarnpkg/berry/issues/271#issuecomment-507407938

I see in package.json apollo-server-core is a dev dependency. is this a bug or was it intended?

created time in 2 months

issue commentyarnpkg/berry

[Bug] yarn pnpify tsc can not resolve some graphql types

How this was working before? 🤔

mohsen1

comment created time in 2 months

issue openedyarnpkg/berry

Node 12 Experimental Loader hooks and Yarn P'n'P

I couldn't find any resources for how Yarn P'n'P will work with Node 12 Experimental Loader hooks. With that all of the hacks to fs module to make pnp work would be unnecessary. Has design for this started yet?

created time in 2 months

issue openedyarnpkg/berry

[Bug] yarn pnpify tsc can not resolve some graphql types

Describe the bug

See my PR trying to use P'n'P on this simple project that uses TypeScript and Webpack:

https://github.com/mohsen1/apollo-react-async-ssr/pull/3

I get errors like the following.

note

What's significant about Apollo packages is that they ship their own types.

.yarn/cache/apollo-server-plugin-base-npm-0.5.6-cc277148df89efcb60033ea282a14f7c47f09911109e741cf6c7c6ccce45bc57.zip/node_modules/apollo-server-plugin-base/dist/index.d.ts:1:95 - error TS2307: Cannot find module 'apollo-server-core/dist/requestPipelineAPI'.

1 import { GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse } from 'apollo-server-core/dist/requestPipelineAPI';
                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.yarn/cache/graphql-extensions-npm-0.7.4-c0f20210a7443737d662bd6d508e284683a78027a2816cb42cade84f293591da.zip/node_modules/graphql-extensions/dist/index.d.ts:2:25 - error TS2307: Cannot find module 'apollo-server-env'.

2 import { Request } from 'apollo-server-env';
                          ~~~~~~~~~~~~~~~~~~~

To Reproduce

The minimal information needed to reproduce your issue (ideally a package.json with a single dep). Note that bugs without minimal reproductions might be closed.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment if relevant (please complete the following information):

  • OS: Linux
  • Node version 10
  • Yarn version 2

Additional context

tsc does pass with the code in master.

created time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 7c43504240dde48712ffc8af544befd340dcfa24

Add webpack config plugin

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 898400ee0548507058a26efcf55692b93dcc6f8b

Update .travis.yml

view details

Mohsen Azimi

commit sha ead07711a5cbc38afe53a6d07181828abaf86f9e

Merge branch 'master' of github.com:mohsen1/apollo-react-async-ssr into try-pnp

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha ee97503b6a6ba557c879fcb62bdd06e479cf9c55

Add test script

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha f0d28cda53ff85ad2bef3084820cc81edc7331a0

Add test script

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 5b04cd0ee2aaac93858c8a5bec4afaa009b22ce8

Use Yarn pnp

view details

push time in 2 months

PR opened mohsen1/apollo-react-async-ssr

Use Yarn P'n'P
+181189 -6166

0 comment

1086 changed files

pr created time in 2 months

create barnchmohsen1/apollo-react-async-ssr

branch : try-pnp

created branch time in 2 months

startedarcanis/pnp-webpack-plugin

started time in 2 months

issue commentsmooth-code/loadable-components

react-loadable compatibility component

@theKashey can we make it detect import()s inside the parameters of a Loadable component as well?

import { Loadable } from '@loadable/component'

export default Loadable({ loader: () => import('./Component') });

Can you explain what the Babel transform actually does? I am reading the tests but can't exactly follow what's going on

mohsen1

comment created time in 2 months

issue commentsmooth-code/loadable-components

react-loadable compatibility component

ok I think this is a bigger task then. The Babel transform should also account for importing the react-loadable Loadable compatibility component from @loadable/component module. It's not too bad though, I might hack on it today.

on a somehow related note: I think putting all of related packages into a monorepo makes doing work like this easier.

mohsen1

comment created time in 2 months

issue commentremy/nodemon

High severity vulnerabilities found in dependency: chokidar

@rossanthony yes

rossanthony

comment created time in 2 months

issue commentsmooth-code/loadable-components

react-loadable compatibility component

is the Babel plugin looking for specific syntax? should the call to loadable() not get abstracted for it to work?

mohsen1

comment created time in 2 months

Pull request review commentDefinitelyTyped/DefinitelyTyped

yet other fixes for swagger types

 export interface Response { }  // ------------------------------ Schema --------------------------------------export interface BaseSchema {+export type BaseSchema = {+  type?: ParameterType;   format?: string;   title?: string;   description?: string;-  default?: string | boolean | number | {};+  default?: any[] | boolean | number | null | object | string;

is it any at this point?

XVincentX

comment created time in 2 months

startedshopsys/monorepo-tools

started time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 898400ee0548507058a26efcf55692b93dcc6f8b

Update .travis.yml

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 4a15195806ecdc092dab19177ff8ca1831cf0a4e

Add travis

view details

push time in 2 months

PR opened mohsen1/apollo-react-async-ssr

Try to make a React-Loadable compat component

context https://github.com/smooth-code/loadable-components/issues/369

+182 -1

0 comment

4 changed files

pr created time in 2 months

create barnchmohsen1/apollo-react-async-ssr

branch : loadable-compat

created branch time in 2 months

issue commentsmooth-code/loadable-components

react-loadable compatibility component

I am playing with this idea:

⚠️ TypeScript!

import React from "react";
import ReactLoadable from "react-loadable";
import loadable from "@loadable/component";
import pMinDelay from "p-min-delay";
import { timeout, TimeoutError } from "promise-timeout";

/**
 * Error boundary component
 */
class ErrorBoundary extends React.Component<
  { onError: (error: Error) => void },
  { error?: Error }
> {
  static getDerivedStateFromError(error: Error) {
    return { error };
  }

  componentDidCatch(error: Error, info: React.ErrorInfo) {
    this.props.onError(error);
  }

  render() {
    if (this.state.error) {
      return null;
    }

    return this.props.children;
  }
}

/**
 * react-loadable compatibility layer
 *
 * The options.loader prop is required, the rest is optional
 */
export default function Loadable<
  Props,
  Exports extends React.FunctionComponent<Props>
>(
  options: Partial<ReactLoadable.Options<Props, Exports>> &
    Pick<ReactLoadable.Options<Props, Exports>, "loader">
): React.ComponentType<Props> & ReactLoadable.LoadableComponent {
  /**
   * General component for handling errors and loading state
   */
  const Fallback: React.FC<ReactLoadable.LoadingComponentProps> = props => {
    if (options.loading) {
      return React.createElement(options.loading, props);
    }
    return null;
  };

  /**
   * Component we return
   */
  class InnerLoadable extends React.Component<
    Props & ReactLoadable.LoadableComponent,
    { error?: Error }
  > {
    static preload() {
      // not implemented
    }

    onError = error => {
      this.setState({ error });
    };

    retry = () => {
      this.setState({ error: undefined }, () => this.forceUpdate());
    };

    render() {
      const { error } = this.state;
      const { delay = 200, timeout } = options;
      if (error) {
        if (error instanceof TimeoutError) {
          return (
            <Fallback
              error={undefined}
              isLoading={false}
              timedOut={true}
              pastDelay={false}
              retry={this.retry}
            />
          );
        }
        return (
          <Fallback
            error={error}
            isLoading={false}
            timedOut={false}
            pastDelay={false}
            retry={this.retry}
          />
        );
      }
      return (
        <ErrorBoundary onError={this.onError}>
          {React.createElement(
            loadable(
              timeout(
                pMinDelay(options.loader, delay === false ? 0 : delay),
                timeout === false ? 0 : timeout
              ),
              {
                fallback: (
                  <Fallback
                    isLoading
                    timedOut={false}
                    pastDelay={false}
                    retry={this.retry}
                    error={undefined}
                  />
                )
              }
            )
          )}
        </ErrorBoundary>
      );
    }
  }

  return InnerLoadable;
}
mohsen1

comment created time in 2 months

issue openedsmooth-code/loadable-components

react-loadable compatibility component

🚀 Feature Proposal

For easier migrating from react-loadable this library can offer a Loadable HoC that wraps error handling, timeout and retries automatically. This component should conform to react-loadable API so users can easily switch to this component by simply aliasing the dependencies.

Motivation

To migrate our large repo we had to do a large refactoring change. We also lost automatic handling of timeouts and retry functionality. We had a global <Loading /> component that was consuming react-loadable props.

Pitch

This will make adopting the component framework super easy

created time in 2 months

startedmicro/micro

started time in 2 months

startedstaylor/react-helmet-async

started time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 0495705934f8ddc9ae0f3f367a7688e862ec506b

Use JSON.parse for speed https://twitter.com/mathias/status/1143551692732030979

view details

push time in 2 months

issue commentnetlify/netlify-lambda

Webpack entrypoint collection and warning is assuming a default set of file extensions

after you merged webpack configs, construct a regex from config.resolve.extensions list

mohsen1

comment created time in 2 months

delete branch mohsen1/apollo-react-async-ssr

delete branch : @loadable/component

delete time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha c35263abee1a947f19c58dbf5012ac8a4fe2059d

Switch from react-loadable to @loadable packages

view details

Mohsen Azimi

commit sha a320bafafd0b0ff82dd61487483f13e43c304f62

Merge pull request #1 from mohsen1/@loadable/component Switch from react-loadable to @loadable packages

view details

push time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha c35263abee1a947f19c58dbf5012ac8a4fe2059d

Switch from react-loadable to @loadable packages

view details

push time in 2 months

create barnchmohsen1/apollo-react-async-ssr

branch : @loadable/component

created branch time in 2 months

issue closedapollographql/react-apollo

getDataFromTree leaves components in loading state

I had this issue at work and thought it's because my app is too complicated I must be doing something wrong so I built a whole new app from scratch with the same set of tools:

https://github.com/mohsen1/apollo-react-async-ssr

As you can see here I'm calling getDataFromTree.

Intended outcome: My understanding is that, after calling getDataFromTree, rendering components like <Query /> should result in data in callback and loading be false.

Actual outcome: if you start and run this app, you'll see the server is rendering the <Query /> component at the loading phase.

How to reproduce the issue: Clone repo and run the server here: https://github.com/mohsen1/apollo-react-async-ssr

Version 2.5.8

closed time in 2 months

mohsen1

issue commentapollographql/react-apollo

getDataFromTree leaves components in loading state

It took me putting this al together to see the issue

I should pass result of React.createElement to getDataFromTree not a component


--- a/src/server/render.tsx
+++ b/src/server/render.tsx
@@ -24,7 +24,7 @@ const render: express.Handler = async (req, res, next) => {
     const apolloClient = getApolloClient();
     const routerContext: StaticContext = {};
 
-    const Contents = () => (
+    const contentsTree = (
       <ServerAppContents
         req={req}
         client={apolloClient}
@@ -34,9 +34,9 @@ const render: express.Handler = async (req, res, next) => {
     );
 
     await Loadable.preloadAll();
-    await getDataFromTree(Contents);
+    await getDataFromTree(contentsTree);
     const appContents = ReactDOMServer.renderToString(
-      sheet.collectStyles(<Contents />)
+      sheet.collectStyles(contentsTree)
     );
     const initialState = apolloClient.extract();
     const styleTags = sheet.getStyleElement();
mohsen1

comment created time in 2 months

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 97b8fbcada0002df01bc43f409b29f2300dfeba9

Fix get data on server

view details

push time in 2 months

issue openedapollographql/react-apollo

getDataFromTree leaves components in loading state

I had this issue at work and thought it's because my app is too complicated I must be doing something wrong so I built a whole new app from scratch with the same set of tools:

https://github.com/mohsen1/apollo-react-async-ssr

As you can see here I'm calling getDataFromTree.

Intended outcome: My understanding is that, after calling getDataFromTree, rendering components like <Query /> should result in data in callback and loading be false.

Actual outcome: if you start and run this app, you'll see the server is rendering the <Query /> component at the loading phase.

How to reproduce the issue: Clone repo and run the server here: https://github.com/mohsen1/apollo-react-async-ssr

Version 2.5.8

created time in 2 months

issue openednetlify/netlify-lambda

Webpack entrypoint collection and warning is assuming a default set of file extensions

even if I extend the webpack config with more extensions, entry files are not picked up. I believe default .wasm extension is not supported here either:

https://github.com/netlify/netlify-lambda/blob/80bcdd851c47a999c425d6a47e6731d0f5f1af9e/lib/build.js#L115-L124

created time in 2 months

PublicEvent

startedsmooth-code/loadable-components

started time in 2 months

issue commentremy/nodemon

High severity vulnerabilities found in dependency: chokidar

if you are using Yarn chokidar@3 is compatible

"resolutions": {
    "chokidar": "3"
  }
rossanthony

comment created time in 2 months

pull request commentmohsen1/posthtml-favicons

Fix: creating nested directories. ENOENT error.

updated the fix to use mkdirp. it is published to 1.3.0. Thanks!

anein

comment created time in 2 months

created tagmohsen1/posthtml-favicons

tagv1.3.0

PostHTML Favicon generator

created time in 2 months

push eventmohsen1/posthtml-favicons

Mohsen Azimi

commit sha 6fb487484da1965a734dc6c7c3b0fac97c29a714

use mkdirp

view details

Mohsen Azimi

commit sha 145575fa7d931d196bc457b88d49a8b293addc17

v1.3.0

view details

push time in 2 months

push eventmohsen1/posthtml-favicons

Alexander N

commit sha be6d15d8a8f20e0a1aaec64490a4df9f443c2e0c

Fix: creating nested directories. ENOENT error. (#7) * chore: update version of type definitions for node * ref: remove repeated code * fix: the creation of nested dirs * ref: remove unused code * chore: update packages * test: add a test of directory creation * chore(travis): update node version

view details

push time in 2 months

PR merged mohsen1/posthtml-favicons

Fix: creating nested directories. ENOENT error.

Hi there!

I'm faced with a problem when the plugin has not created a nested directory for icons. Here is a bug fix with the appropriate test.

Screenshot from 2019-06-17 23-31-34

+1434 -1309

0 comment

6 changed files

anein

pr closed time in 2 months

PR opened zoejessica/fuckingifcaseletsyntax.com

Support dark/light color scheme

How

It uses the newly introduced prefers-color-scheme media query to apply dark mode if user has that preference

Will CSS Variables break this website?

Yes. But we should not care. Not many developers are running IE11 or Opera Mini

https://caniuse.com/#feat=css-variables

Color choices

I'm no color theory expert. Please feel free to adjust the colors.

Screen Shot 2019-06-18 at 12 01 46 AM

+40 -18

0 comment

1 changed file

pr created time in 2 months

push eventmohsen1/fuckingifcaseletsyntax.com

Mohsen Azimi

commit sha 77ead8e28dd5c50a38237e7b545b1affa23f590c

Support dark/light color scheme

view details

push time in 2 months

push eventmohsen1/fuckingifcaseletsyntax.com

Mohsen Azimi

commit sha 410b1a4689d1b74d38512855f57d1c3bb827c6fa

Support dark/light color scheme

view details

push time in 2 months

create barnchmohsen1/fuckingifcaseletsyntax.com

branch : light-mode

created branch time in 2 months

create barnchmohsen1/cypress-ts-issue

branch : master

created branch time in 2 months

created repositorymohsen1/cypress-ts-issue

created time in 2 months

pull request commentlyft/lyft.github.io

[WIP] try to fix build

Maybe the token was rotated? Try generating a new token and encrypting it using travisci CLI

ecdavis

comment created time in 2 months

issue commentneuroo/json-ast

AST Printer with comments?

I would like to maintain comment locations as much as possible. I will try using the visitor to print. Do you have an example of printer written with the visitor?

mohsen1

comment created time in 2 months

push eventmohsen1/vscode-prettify-json

Mohsen Azimi

commit sha b5d98419c7a4af6b1dd77b98c310fc00e39e02f3

v0.0.5

view details

push time in 2 months

push eventmohsen1/vscode-prettify-json

Mohsen Azimi

commit sha 77f06d441630945537a8a6146079b1051e9bd1eb

Add yarn.lock

view details

push time in 2 months

issue openedneuroo/json-ast

AST Printer with comments?

created time in 2 months

push eventmohsen1/vscode-prettify-json

Colin Ray

commit sha a1e07833c5bf9e2393a54129d806d603791cf847

Update deprecated fields in launch.json

view details

Colin Ray

commit sha b6682b7f8e6a6d378b66fa3a28663a75849bc980

Import strip-json-comments using require instead of ES6 import

view details

Colin Ray

commit sha 7721d04b029dafd9949bdc14bf85d615cdc4d6c0

Use editor.tabSize for JSON spacing

view details

Mohsen Azimi

commit sha 8288e153d9855a3244b927f8fa54829a87d86a2b

Merge pull request #4 from rcolinray/master Use editor.tabSize config for JSON spacing

view details

push time in 2 months

PR merged mohsen1/vscode-prettify-json

Use editor.tabSize config for JSON spacing

Some other options I considered:

  • Use the tab size of the file that is being edited. It wasn't obvious how to get that information using the API.
  • Add a new configuration for this extension. I could see it being annoying to have to configure a second tab size. I could also see there being users who want to have one tab size for their code, and another tab size for their JSON.

Using editor.tabSize seems like a reasonable default.

Thank you for considering my pull request 😄

+9 -6

5 comments

2 changed files

rcolinray

pr closed time in 2 months

issue commentfacebookincubator/idx

DeepRequiredObject causing issues in Typescript 3.5.1

Can you make a pull request that upgrades the TypeScript version in this repo and adds a test case that fails? We can go from there.

amwill04

comment created time in 3 months

Pull request review commentQuramy/typed-css-modules

Make src TypeScript

 const traceKeySorter = ( a, b ) => {   } }; +export type Dictionary<T> = {+  [key: string]: T | undefined;+};+ export default class FileSystemLoader {-  constructor( root, plugins ) {+  private root: string;+  private sources: Dictionary<string>;

Record<string, string>

gdelmas

comment created time in 3 months

issue commentmicrosoft/TypeScript

JavaScript Property Suggestions Do not Pick Up Type From JSDoc Comment

Yes the import("webpack").Configuration works now.

mjbvz

comment created time in 3 months

more