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 96306

JavaScript Style Guide

airbnb/lottie-android 28879

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

airbnb/lottie-web 20896

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

airbnb/lottie-ios 19671

An iOS library to natively render After Effects vector animations

airbnb/hypernova 5534

A service for server-side rendering your JavaScript views

airbnb/css 5270

A mostly reasonable approach to CSS and Sass.

airbnb/polyglot.js 3290

Give your JavaScript the ability to speak many languages.

airbnb/prop-types 633

Custom React PropType validators that we use at Airbnb.

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

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

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

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

issue commentbenmosher/eslint-plugin-import

The development-environment doesn't work on windows

For presets, we should drop the argon one and instead use the env preset with proper targets.

Upgrading to Babel 7 is fine but it requires using stages in Travis since older nodes won’t be able to build, and i don’t know how to do stages in Appveyor. I have an example repo for Travis if that’s the direction we end up going.

That said, could you elaborate on exactly what issue is caused by being on an old Babel?

manuth

comment created time in 7 minutes

issue commenttc39/proposal-module-attributes

Unmixing type from other attributes

I very much agree that any new attribute needs to be fully thought out and go through the process - I’m not on board with the current host grab bag approach.

eemeli

comment created time in 9 minutes

delete branch EB-Forks/is-callable

delete branch : feat/use-reflect-apply

delete time in an hour

PR merged inspect-js/is-callable

Reviewers
[New] use `Reflect.apply`‑based callability detection enhancement

Based on the IsConstructor implementation in https://github.com/ljharb/es-abstract/pull/93 and https://github.com/tc39/ecma262/issues/1798#issuecomment-559914634.

This makes isCallable use Reflect.apply with a badArrayLike when Reflect.apply and accessor descriptors are supported.

This has the advantage of supporting proxies in environments that don’t implement https://github.com/tc39/ecma262/issues/664 (https://github.com/tc39/ecma262/pull/697).

+46 -13

0 comment

3 changed files

ExE-Boss

pr closed time in an hour

push eventinspect-js/is-callable

ExE Boss

commit sha 32e14cfd13f0cbb2ddd2cc613227b4e003745317

[New] use `Reflect.apply`‑based callability detection

view details

push time in an hour

push eventEB-Forks/is-callable

Jordan Harband

commit sha 664bed80e87b0d60d9bc884efcbe412b6e0d73b9

[Dev Deps] update `eslint`, `tape`

view details

Ansgar Grunseid

commit sha fcd6b0c6d4e65c22c9c7034e2bb7e9aa92e5a50c

[readme] add install instructions

view details

ExE Boss

commit sha 32e14cfd13f0cbb2ddd2cc613227b4e003745317

[New] use `Reflect.apply`‑based callability detection

view details

push time in an hour

push eventjulien1619/eslint-plugin-import

Filipp Riabchun

commit sha 3f46ccfe203fa5aad5767699df339a9b2f0294e3

Revert "[flow] `no-unused-modules`: add flow type support" This reverts commit 05085bbd

view details

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

Manuel Thalmann

commit sha 62b554bc5f5024695b40d8701fbd8267fb4eb73f

[New] `order`: Add support for TypeScript's "import equals"-expressions

view details

Manuel Thalmann

commit sha 8118170d6fc6d626829ccbedba4be10bd3b97c55

[Tests] Add fix for Windows Subsystem for Linux - Update appveyor-config to include wsl

view details

Julien Blatecky

commit sha 5cc31478a12c138b382e8efa97275db945b80562

[Fix] TypeScript: Add nested namespace handling

view details

push time in an hour

pull request commentbenmosher/eslint-plugin-import

Make `copy-metafiles` platform-independent

Oops, turns out fs.copyFileSync doesn't exist on node <= 6.

manuth

comment created time in an hour

PR merged inspect-js/is-callable

[readme] add install instructions
+9 -0

3 comments

1 changed file

gruns

pr closed time in 2 hours

push eventinspect-js/is-callable

Ansgar Grunseid

commit sha fcd6b0c6d4e65c22c9c7034e2bb7e9aa92e5a50c

[readme] add install instructions

view details

push time in 2 hours

push eventmanuth/eslint-plugin-import

Manuel Thalmann

commit sha 8118170d6fc6d626829ccbedba4be10bd3b97c55

[Tests] Add fix for Windows Subsystem for Linux - Update appveyor-config to include wsl

view details

Manuel Thalmann

commit sha a107e28c5591dd33dabb6b2e2b746f5856ee44e4

[meta] Make `copy-metafiles` platform-independent

view details

push time in 2 hours

PR merged benmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux bug package: utils

This PR will add support for Windows Subsystem for Linux.

Windows Subsystem for Linux seems to have quite a weird treatment with file and directory-names. While directories are case-sensitive (directory ./tests exists while ./TeSts doesn't), files don't seem to be (both reSOLVE.js and resolve.js exist).

This PR adds WSL-support by checking whether both directories and files are case-sensitive before setting CASE_SENSITIVE_FS.

+104 -40

18 comments

3 changed files

manuth

pr closed time in 2 hours

push eventbenmosher/eslint-plugin-import

Manuel Thalmann

commit sha 8118170d6fc6d626829ccbedba4be10bd3b97c55

[Tests] Add fix for Windows Subsystem for Linux - Update appveyor-config to include wsl

view details

push time in 2 hours

pull request commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

hmm, now all the native tests are failing - but on the coveralls step, all the tests are passing on node 10 and 12 (node 14 still fails with "Cannot find module 'C:\projects\eslint-plugin-import\node", and node 8 still fails with a ton of "Path must be a string. Received undefined" errors)

manuth

comment created time in 3 hours

issue commentjsx-eslint/eslint-plugin-jsx-a11y

control-has-associated-label error with label/input?

That's very strange; maybe Gatsby has some nonstandard way of applying an eslint config (it should be in package.json, or in .eslintrc, or .eslintrc.js, usually)

Accessibility is about many things; performance is one of the least important ones - and for development, the network effect is one of the most important.

I'll close this for now, but will be happy to reopen if there ends up being something actionable here.

leepowelldev

comment created time in 3 hours

push eventgruns/is-callable

Jordan Harband

commit sha 664bed80e87b0d60d9bc884efcbe412b6e0d73b9

[Dev Deps] update `eslint`, `tape`

view details

Ansgar Grunseid

commit sha fcd6b0c6d4e65c22c9c7034e2bb7e9aa92e5a50c

[readme] add install instructions

view details

push time in 3 hours

push eventinspect-js/is-callable

Jordan Harband

commit sha 664bed80e87b0d60d9bc884efcbe412b6e0d73b9

[Dev Deps] update `eslint`, `tape`

view details

push time in 3 hours

push eventljharb/eslint-plugin-jsx-a11y

Simon Podlipsky

commit sha a910d8344dbff0e690f146d829f8e95c91161a86

[Tests] `label-has-associated-control`: add test for <div><label /><input /></div>

view details

push time in 3 hours

issue closedairbnb/react-dates

An in-range update of babel7 is breaking the build 🚨


🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚

Find out how to migrate to Snyk at greenkeeper.io


There have been updates to the babel7 monorepo:

    • The devDependency @babel/cli was updated from 7.8.4 to 7.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

<details> <summary>Status Details</summary>

  • continuous-integration/travis-ci/push: The Travis CI build failed (Details). </details>

<details> <summary>FAQ and help</summary>

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper. </details>


Your Greenkeeper Bot :palm_tree:

closed time in 3 hours

greenkeeper[bot]

issue commentairbnb/react-dates

inline styling for tags without classes

Can you show a screenshot with which part of which component you want to restyle, and explain in what ways?

mostafa99mshk

comment created time in 3 hours

issue commentairbnb/react-dates

Can't seem to apply positioning/z-index to the calendar?

Nope. If you put up a codesandbox tho, i can see what i can do.

RichMatthews

comment created time in 3 hours

push eventjsx-eslint/eslint-plugin-jsx-a11y

Simon Podlipsky

commit sha a910d8344dbff0e690f146d829f8e95c91161a86

[Tests] `label-has-associated-control`: add test for <div><label /><input /></div>

view details

push time in 3 hours

issue commentbenmosher/eslint-plugin-import

[no-unused-modules] Improve for "import * as __ from __"

While I'd strongly suggest not relying on that syntax (for example, TS's module system is broken unless you enable synthetic imports and esModuleInterop, and once enabled, TS projects basically never need import * as ever again), if someone could increase the static analysis abilities of that rule, that'd be great.

Note that if you wanted to cause more warnings (by warning on anything that's not statically knowable), it'd need to be an option, not on by default.

barbogast

comment created time in 3 hours

push eventmanuth/eslint-plugin-import

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

Manuel Thalmann

commit sha 62b554bc5f5024695b40d8701fbd8267fb4eb73f

[New] `order`: Add support for TypeScript's "import equals"-expressions

view details

Manuel Thalmann

commit sha 2b08280ce36332b0526c0e04bdc28a1cb74c033f

[meta] Make `copy-metafiles` platform-independent

view details

push time in 3 hours

push eventsimPod/eslint-plugin-jsx-a11y

Simon Podlipsky

commit sha a910d8344dbff0e690f146d829f8e95c91161a86

[Tests] `label-has-associated-control`: add test for <div><label /><input /></div>

view details

push time in 3 hours

issue commentjsx-eslint/eslint-plugin-jsx-a11y

control-has-associated-label error with label/input?

No, the Airbnb config (which i maintain) did that because there's some devices that only work with nesting, and others that only work with linking, so in order to reach 100% of human beings, you have to always do both.

Yes, I'm suggesting that example shouldn't warn on any configuration. Can you provide the output of eslint --print-config path/to/file for the file that has that warning?

leepowelldev

comment created time in 3 hours

pull request commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

Looks like node 8 and 14 "Native" tests are still failing. I've rebased this (and squashed and added a changelog entry), so let's see what happens.

manuth

comment created time in 3 hours

push eventmanuth/eslint-plugin-import

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

Manuel Thalmann

commit sha 62b554bc5f5024695b40d8701fbd8267fb4eb73f

[New] `order`: Add support for TypeScript's "import equals"-expressions

view details

Manuel Thalmann

commit sha 8118170d6fc6d626829ccbedba4be10bd3b97c55

[Tests] Add fix for Windows Subsystem for Linux - Update appveyor-config to include wsl

view details

push time in 3 hours

PR merged benmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions semver-minor typescript

This PR will add support for TypeScript's import =-syntax.

TypeScript not only allows you to import modules using import path = require("path"), but also to import entities for easier access:

import { Rule } from "eslint";
import RuleContext = Rule.RuleContext;

As the 2nd sort of import doesn't refer to a module, the name of this import will be set to null. The sorting-functions for alphabetized imports has been updated according to this change.

Object-imports (which have their name set to null) will be forced to be put at the end of the group.

This PR fixes #1244

+98 -22

4 comments

4 changed files

manuth

pr closed time in 3 hours

issue closedbenmosher/eslint-plugin-import

Support TypeScript `import = require` syntax

Currently this project only parses regular import statements as import statements. However, TypeScript also supports another syntax:

// TSImportEqualsDeclaration
import foo = require('bar')
//           ^^^^^^^^^^^^^^
// TSExternalModuleReference

Would it be possible for the plugin to check these imports as well?

closed time in 3 hours

j-f1

push eventbenmosher/eslint-plugin-import

Manuel Thalmann

commit sha 62b554bc5f5024695b40d8701fbd8267fb4eb73f

[New] `order`: Add support for TypeScript's "import equals"-expressions

view details

push time in 3 hours

delete branch tc39/agendas

delete branch : robpalme-scheduling-june

delete time in 3 hours

PR merged tc39/agendas

Add slides for meeting schedule

And update future meeting details to match.

+6 -6

0 comment

1 changed file

robpalme

pr closed time in 3 hours

push eventtc39/agendas

Rob Palmer

commit sha 7d6ba4f6c52061725f8ce2e9ad9da31331e9b983

Add slides for meeting schedule And update future meeting details to match.

view details

push time in 3 hours

issue commentjsx-eslint/eslint-plugin-jsx-a11y

control-has-associated-label error with label/input?

@balibebas in general, you need the input to both be inside the label and also linked to it with htmlFor. I'm not sure why that default eslint setup would have it configured that way - the airbnb config has it set to require both, though.

leepowelldev

comment created time in 4 hours

pull request commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

Yes, that would be amazing, thanks. I don't have any Windows machines to test, so Appveyor is the only validation this project really has.

manuth

comment created time in 4 hours

issue closedbenmosher/eslint-plugin-import

upgrade eslint

I get the warning message

warning " > eslint-plugin-import@2.20.2" has incorrect peer dependency "eslint@2.x - 6.x"

when using latest eslint version.

closed time in 4 hours

rubiin

issue commentbenmosher/eslint-plugin-import

upgrade eslint

That's because it doesn't support eslint 7 yet, which means you have to downgrade to eslint 6 until the next release of eslint-plugin-import.

When npm ls exits nonzero, your dependency graph is invalid, and you can't rely on anything working.

rubiin

comment created time in 4 hours

push eventmanuth/eslint-plugin-import

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

Manuel Thalmann

commit sha 62b554bc5f5024695b40d8701fbd8267fb4eb73f

[New] `order`: Add support for TypeScript's "import equals"-expressions

view details

push time in 4 hours

pull request commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

Yes, that sounds like a great idea.

manuth

comment created time in 4 hours

issue commentnpm/cli

Does pm2 copy the source code to a different location?

Probably in memory? That’s really a question for pm2 tho, not for npm.

RohithKilaparthi

comment created time in 6 hours

pull request commentnpm/rfcs

RFC: Add npm diff

In general it’d be nice if it could defer to git diff - and all its options.

ruyadorno

comment created time in 9 hours

issue commenttc39/proposal-module-attributes

Unmixing type from other attributes

@littledan this entire proposal is for the request’s side, not the response’s?

eemeli

comment created time in 9 hours

push eventmanuth/eslint-plugin-import

Jordan Harband

commit sha 3266be6bf73d67e6e256a783e590d90c5d1944a1

fixup

view details

push time in 18 hours

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         var index = require('./');       `,     }),+    // Export equals expressions should be on top alongside with ordinary import-statements.+    ...getTSParsers().map(parser => (+      test({+        code: `+          import async, {foo1} from 'async';+          import relParent2, {foo2} from '../foo/bar';+          import sibling, {foo3} from './foo';+          var fs = require('fs');+          var util = require("util");+          var relParent1 = require('../foo');+          var relParent3 = require('../');+          var index = require('./');+        `,+        parser,+      }),+    )),

oops, my bad!

      })
    )),
manuth

comment created time in 19 hours

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         message: '`Bar` import should occur before import of `bar`',       }],     }),+    ...getTSParsers().map(parser => (+        test({+          code: `+            import sync = require('sync');+            import async, {foo1} from 'async';++            import index from './';+          `,+          output: `+            import async, {foo1} from 'async';+            import sync = require('sync');++            import index from './';+          `,+          options: [{+            groups: ['external', 'index'],+            alphabetize: {order: 'asc'},+          }],+          parser,+          errors: [{+            message: '`async` import should occur before import of `sync`',+          }],+        ))+      },+    ),
    ...getTSParsers().map(parser => (
        test({
          code: `
            import sync = require('sync');
            import async, {foo1} from 'async';

            import index from './';
          `,
          output: `
            import async, {foo1} from 'async';
            import sync = require('sync');

            import index from './';
          `,
          options: [{
            groups: ['external', 'index'],
            alphabetize: {order: 'asc'},
          }],
          parser,
          errors: [{
            message: '`async` import should occur before import of `sync`',
          }],
        })
      ),
manuth

comment created time in 18 hours

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         message: '`fs` import should occur after import of `../foo/bar`',       }],     }),+    ...getTSParsers().map(parser => (+      test({+        code: `+          var fs = require('fs');+          import async, {foo1} from 'async';+          import bar = require("../foo/bar");+        `,+        output: `+          import async, {foo1} from 'async';+          import bar = require("../foo/bar");+          var fs = require('fs');+        `,+        parser,+        errors: [{+          message: '`fs` import should occur after import of `../foo/bar`',+        }],+      }),+    )),
      })
    )),
manuth

comment created time in 19 hours

issue commenttc39/proposal-module-attributes

Unmixing type from other attributes

My understanding, though, is that the actual thing the web is interested in is what "declarative" does - ensuring that something that has no effects when you type the code, can't suddenly start having effects later.

eemeli

comment created time in 19 hours

PR merged benmosher/eslint-plugin-import

[Docs] `order`: fix bad inline config docs

alphabetize option in order rule, does not permit boolean

+9 -6

4 comments

2 changed files

nickofthyme

pr closed time in 19 hours

push eventbenmosher/eslint-plugin-import

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

push time in 19 hours

issue closedbenmosher/eslint-plugin-import

Snowpack resolver

I'm using snowpack and because of the web_modules folder eslint-plugin-import is not happy.

I read about writing a resolver, but I'm a tat bit lost.

How would I write a resolver for snowpack? Any push in the right direction is much appreciated.

closed time in a day

stefanfrede

issue commentbenmosher/eslint-plugin-import

Snowpack resolver

I’d take a look at the two resolvers in this repo for inspiration - https://github.com/benmosher/eslint-plugin-import/tree/master/resolvers

stefanfrede

comment created time in a day

issue commenttc39/proposal-module-attributes

Unmixing type from other attributes

Sure, but timeout only really makes sense for dynamic import, as you said.

If “declarative” is a thing, why is the type needed at all?

eemeli

comment created time in a day

issue commentmmkal/proposal-multi-backtick-templates

What about syntax for template tag composition, instead of only solving dedent?

Something like compose(dedent, gql, thirdThing), where each one would get the output of the previous one, and the same frozen template object, since any template tag is callable as a function as long as you give it the right arguments.

ljharb

comment created time in a day

issue openedmmkal/proposal-multi-backtick-templates

What about syntax for template tag composition, instead of only solving dedent?

It seems like if there was syntax to make template tags composable, then you could easily use dedent, gql, etc without them needing to be changed - and then you’d be solving the general problem instead of one specific one.

created time in a day

pull request commentljharb/es-abstract

[Feat] `GetIntrinsic`: Cache accessed intrinsics

iow i think a hardcoded lookup for all the non-dotted ones to directly map to dotted ones, and then falling into the normal dotted lookup, seems good to me.

ExE-Boss

comment created time in a day

pull request commentljharb/es-abstract

[Feat] `GetIntrinsic`: Cache accessed intrinsics

hmm, i feel like i'd rather manually specify/hardcode those values in that case, rather than trying to derive that they're the same?

ExE-Boss

comment created time in a day

Pull request review commentljharb/es-abstract

[Feat] `GetIntrinsic`: Cache accessed intrinsics

 var stringToPath = function stringToPath(string) { }; /* end adaptation */ -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {-	if (!(name in INTRINSICS)) {-		throw new SyntaxError('intrinsic ' + name + ' does not exist!');-	}+var getBaseIntrinsic = function getBaseIntrinsic(baseNames, allowMissing) {+	var intrinsicName;++	for (var i = baseNames.length - 1; i >= 0; i--) {+		var name = baseNames[i];+		intrinsicName = '%' + name + '%';+		if (hasOwn(INTRINSICS, intrinsicName)) {+			var value = INTRINSICS[intrinsicName];+			if (typeof value === 'undefined' && !allowMissing) {+				throw new $TypeError('intrinsic ' + intrinsicName + ' exists, but is not available. Please file an issue!');+			} -	// istanbul ignore if // hopefully this is impossible to test :-)-	if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {-		throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');+			return {+				name: name,+				nextIndex: i + 1,+				value: value+			};+		} 	} -	return INTRINSICS[name];+	throw new SyntaxError('intrinsic ' + intrinsicName + ' does not exist!'); }; +// eslint-disable-next-line max-lines-per-function, max-statements

ah, ok then this is fine :-)

ExE-Boss

comment created time in a day

pull request commentinspect-js/is-callable

Add install instructions.

There's a large image at the top of the readme that contains the text npm install is-callable. Was that not sufficient?

gruns

comment created time in a day

issue commentopenjs-foundation/standards

OpenJS Foundation Standards Working Group Meeting 2020-06-02

TC39 is next week, so I'll be unable to attend.

mhdawson

comment created time in a day

issue commentyannickcr/eslint-plugin-react

`detect` does not consider `NODE_PATH` environment variable

That it's not officially deprecated doesn't mean it's not widely discouraged. I'm not aware of any valid use cases for it; node modules you require should always be in the local node_modules folder.

shanemcquillan

comment created time in a day

issue commentbenmosher/eslint-plugin-import

newline-after-import ignoring angular annotations.

What is an "anchor annotation"? That looks like decorators syntax, a stage 2 proposal that's on its 4th syntax/semantics iteration.

Are you saying you expect a newline above the decorator, below the imports, and it's not forcing one? If so, that is indeed a bug.

eestein

comment created time in a day

issue commentbenmosher/eslint-plugin-import

The development-environment doesn't work on windows

Deprecation warnings aren't important, but breaking on node 14 is.

Happy to take a PR to tweak the copy-metafiles script.

manuth

comment created time in a day

issue commentbenmosher/eslint-plugin-import

Allow enforcement of import-specifiers

Related to #1577, #1670.

manuth

comment created time in a day

issue closedbenmosher/eslint-plugin-import

eslint rule 'import-order' was not found

image when i has setting eslint rules with "import/order" in , but it error, how i config this rule this is my eslintrc file image

closed time in a day

cc616
CommitCommentEvent
CommitCommentEvent

push eventnickofthyme/eslint-plugin-import

Nick Partridge

commit sha 2e72af5a99211d3994dba3465fe2567c9335c150

[Docs] `order`: fix bad inline config `alphabetize` option does not permit boolean

view details

push time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         message: '`Bar` import should occur before import of `bar`',       }],     }),+    ...getTSParsers().map(parser => {+        return test({+          code: `+            import sync = require('sync');+            import async, {foo1} from 'async';++            import index from './';+          `,+          output: `+            import async, {foo1} from 'async';+            import sync = require('sync');++            import index from './';+          `,+          options: [{+            groups: ['external', 'index'],+            alphabetize: {order: 'asc'},+          }],+          parser,+          errors: [{+            message: '`async` import should occur before import of `sync`',+          }],+        })+      },+    ),
    ...getTSParsers().map(parser => (
        test({
          code: `
            import sync = require('sync');
            import async, {foo1} from 'async';

            import index from './';
          `,
          output: `
            import async, {foo1} from 'async';
            import sync = require('sync');

            import index from './';
          `,
          options: [{
            groups: ['external', 'index'],
            alphabetize: {order: 'asc'},
          }],
          parser,
          errors: [{
            message: '`async` import should occur before import of `sync`',
          }],
        ))
      },
    ),
manuth

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         message: '`fs` import should occur after import of `../foo/bar`',       }],     }),+    ...getTSParsers().map(parser => +      test({+        code: `+          var fs = require('fs');+          import async, {foo1} from 'async';+          import bar = require("../foo/bar");+        `,+        output: `+          import async, {foo1} from 'async';+          import bar = require("../foo/bar");+          var fs = require('fs');+        `,+        parser,+        errors: [{+          message: '`fs` import should occur after import of `../foo/bar`',+        }],+      }),+    ),
    ...getTSParsers().map(parser => (
      test({
        code: `
          var fs = require('fs');
          import async, {foo1} from 'async';
          import bar = require("../foo/bar");
        `,
        output: `
          import async, {foo1} from 'async';
          import bar = require("../foo/bar");
          var fs = require('fs');
        `,
        parser,
        errors: [{
          message: '`fs` import should occur after import of `../foo/bar`',
        }],
      }),
    )),
manuth

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 module.exports = {           )         }       },+      TSImportEqualsDeclaration: function handleImports(node) {+        let name+        if (node.moduleReference.type === 'TSExternalModuleReference') {+          name = node.moduleReference.expression.value+        }+        else {
        } else {
manuth

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 ruleTester.run('order', rule, {         var index = require('./');       `,     }),+    // Export equals expressions should be on top alongside with ordinary import-statements.+    ...getTSParsers().map(parser => +      test({+        code: `+          import async, {foo1} from 'async';+          import relParent2, {foo2} from '../foo/bar';+          import sibling, {foo3} from './foo';+          var fs = require('fs');+          var util = require("util");+          var relParent1 = require('../foo');+          var relParent3 = require('../');+          var index = require('./');+        `,+        parser,+      }),+    ),
    ...getTSParsers().map(parser => (
      test({
        code: `
          import async, {foo1} from 'async';
          import relParent2, {foo2} from '../foo/bar';
          import sibling, {foo3} from './foo';
          var fs = require('fs');
          var util = require("util");
          var relParent1 = require('../foo');
          var relParent3 = require('../');
          var index = require('./');
        `,
        parser,
      }),
    )),
manuth

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 function makeOutOfOrderReport(context, imported) {   reportOutOfOrder(context, imported, outOfOrder, 'before') } -function importsSorterAsc(importA, importB) {-  if (importA < importB) {-    return -1-  }--  if (importA > importB) {-    return 1-  }+function getSorter(ascending) {+  let multiplier = (ascending ? 1 : -1); -  return 0-}+  return function importsSorter(importA, importB) {+    let result -function importsSorterDesc(importA, importB) {-  if (importA < importB) {-    return 1-  }+    if ((importA < importB) || importB === null) {+      result = -1+    }+    else if ((importA > importB) || importA === null) {+      result = 1+    }+    else {
    } else if ((importA > importB) || importA === null) {
      result = 1
    } else {

always cuddle your elses :-)

manuth

comment created time in a day

issue commenttc39/proposal-module-attributes

Unmixing type from other attributes

  • async would prevent importing anything that used TLA?
  • I don't understand declarative. can you elaborate?
  • timeout seems like something you can do with Promise.race; can you help me understand why it would need to be part of the module system?
eemeli

comment created time in a day

delete branch tc39/agendas

delete branch : ptomato-patch-1

delete time in a day

PR merged tc39/agendas

Change Temporal presentation link

Moved to the same home as previous Temporal presentations

+1 -1

0 comment

1 changed file

ptomato

pr closed time in a day

push eventtc39/agendas

Philip Chimento

commit sha cb3496e23e7cbeaf912a978ad7fb42d71fd865a0

2020.06: Change Temporal presentation link Moved to the same home as previous Temporal presentations

view details

push time in a day

push eventtc39/agendas

Shu-yu Guo

commit sha bb29331c82742f9ca41debbb3081679375ce1d49

Add slides for .item()

view details

Jordan Harband

commit sha 3b73576933cf7417172c7f8b1f9da7b0ab181da5

2020.06: fix whitespace, sorting

view details

Philip Chimento

commit sha cb3496e23e7cbeaf912a978ad7fb42d71fd865a0

2020.06: Change Temporal presentation link Moved to the same home as previous Temporal presentations

view details

push time in a day

pull request commentnathanhleung/install-peerdeps

set the default registry to the official registry.npmjs.org

Version bumps are typically never done in PRs.

cdierkens

comment created time in a day

Pull request review commentljharb/es-abstract

[Feat] `GetIntrinsic`: Add ES201x function intrinsics

  var undefined; +var $Function = Function; var $TypeError = TypeError;+var $SyntaxError = SyntaxError;++var getESNextFunction = function (name, syntax) {+	try {+		return $Function("'use strict'; return " + syntax + ';')();+	} catch (e) {+		if (!(e instanceof $SyntaxError)) {+			try {+				// This will also prevent bundlers from naively including these files in the bundle:+				// eslint-disable-next-line global-require+				return require('./GetIntrinsic/' + name + '.js');

I'm not concerned with node flags, lots of code breaks when those are used.

Are you saying it's a common/practical approach to automatically factor out CJS modules that use eval so they're in a separate bundle from the rest of app code?

ExE-Boss

comment created time in a day

issue commenttc39/proposal-record-tuple

Collect developer feedback about the ergonomics of `#{ }`/`#[ ]`

@youbastard this doesn't mean you can have a Record/Tuple that isn't immutable all the way down, it's a syntax error to not provide the # at every level.

littledan

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

 matrix: #   - x86 #   - x64 -# Install scripts. (runs after repo cloning)-install:-  # Get the latest stable version of Node.js or io.js-  - ps: Install-Product node $env:nodejs_version--  # install modules-  - ps: >--      if ($env:nodejs_version -eq "4") {-        npm install -g npm@3;-      }-      if ($env:nodejs_version -in @("8", "10", "12")) {-        npm install -g npm@6.10.3;-      }-  - npm install--  # fix symlinks-  - cmd: git config core.symlinks true-  - cmd: git reset --hard--  # todo: learn how to do this for all .\resolvers\* on Windows-  - cd .\resolvers\webpack && npm install && cd ..\..-  - cd .\resolvers\node && npm install && cd ..\..--# Post-install test scripts.-test_script:--  # Output useful info for debugging.-  - node --version-  - npm --version--  # core tests-  - npm run tests-only--  # resolver tests-  - cd .\resolvers\webpack && npm test && cd ..\..-  - cd .\resolvers\node && npm test && cd ..\..--on_success:-  - npm run coveralls+for:+-+  matrix:+    only:+      - configuration: Native+  # Install scripts. (runs after repo cloning)+  install:+    # Get the latest stable version of Node.js or io.js+    - ps: Install-Product node $env:nodejs_version++    # install modules+    - ps: >-+        if ($env:nodejs_version -eq "4") {+          npm install -g npm@3;+        }+        if ($env:nodejs_version -in @("8", "10", "12")) {+          npm install -g npm@6.10.3;+        }+    - npm install++    # fix symlinks+    - cmd: git config core.symlinks true+    - cmd: git reset --hard++    # todo: learn how to do this for all .\resolvers\* on Windows+    - cd .\resolvers\webpack && npm install && cd ..\..+    - cd .\resolvers\node && npm install && cd ..\..++  # Post-install test scripts.+  test_script:++    # Output useful info for debugging.+    - node --version+    - npm --version++    # core tests+    - npm run tests-only++    # resolver tests+    - cd .\resolvers\webpack && npm test && cd ..\..+    - cd .\resolvers\node && npm test && cd ..\..++  on_success:+    - npm run coveralls+-+  matrix:+    only:+      - configuration: WSL+  # Install scripts. (runs after repo cloning)+  install:+    # Get the latest stable version of Node.js or io.js+    - ps: $env:WSL_ENV += ":nodejs_version"+    - ps: >-+      wsl curl -sL 'https://deb.nodesource.com/setup_${nodejs_version$}.x' `| sudo -E bash -+      wsl sudo apt install -y nodejs

this line seems to trigger a parsing error?

manuth

comment created time in a day

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat(es‑abstract): Use script to generate `GetIntrinsics`

+#!/usr/bin/env ts-node --script-mode+/// <reference types="node"/>+import path = require('path');+import fs = require('fs');++const OUT_FILE_PATH = path.resolve(__dirname, '..', 'GetIntrinsic.d.ts');++const hasSymbols = true;+const { getPrototypeOf: getProto, getOwnPropertyDescriptor: $gOPD } = Reflect as {+    getPrototypeOf(target: object): any;+    getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(+        target: T,+        propertyKey: P,+    ): (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor) | undefined;+};++function isObject(value: unknown): value is object {+    if (value === undefined || value === null) return false;+    return typeof value === 'object' || typeof value === 'function';+}++// tslint:disable: only-arrow-functions space-before-function-paren+const ThrowTypeError = (function () {+    return $gOPD(arguments, 'callee')!.get;+})();++// tslint:disable: no-async-without-await+const generator = function* () {};+const asyncFn = async function () {};+const asyncGen = async function* () {};+// tslint:enable++const generatorFunction = generator ? /** @type {GeneratorFunctionConstructor} */ generator.constructor : undefined;+const generatorFunctionPrototype = generatorFunction ? generatorFunction.prototype : undefined;+const generatorPrototype = generatorFunctionPrototype ? generatorFunctionPrototype.prototype : undefined;++const asyncFunction = asyncFn ? /** @type {FunctionConstructor} */ asyncFn.constructor : undefined;++const asyncGenFunction = asyncGen ? /** @type {AsyncGeneratorFunctionConstructor} */ asyncGen.constructor : undefined;+const asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;+const asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;++const TypedArray: any = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);++interface BaseIntrinsic {+    getterType?: string;+    get?: string;+    overrides?: { [property: string]: string | Override | null };+}++interface Override extends BaseIntrinsic {+    type?: string;+}++interface Intrinsic extends Override {+    type: string;+}++const $ObjectPrototype = Object.prototype;++// prettier-ignore+const BASE_INTRINSICS: { [intrinsic: string]: object | undefined; } = {+    '%Array%': Array,+    '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,+    '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,+    '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,+    '%ArrayPrototype%': Array.prototype,+    '%ArrayProto_entries%': Array.prototype.entries,+    '%ArrayProto_forEach%': Array.prototype.forEach,+    '%ArrayProto_keys%': Array.prototype.keys,+    '%ArrayProto_values%': Array.prototype.values,+    '%AsyncFromSyncIteratorPrototype%': undefined,+    '%AsyncFunction%': asyncFunction,+    '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,+    '%AsyncGenerator%':  asyncGenFunctionPrototype,+    '%AsyncGeneratorFunction%': asyncGenFunction,+    '%AsyncGeneratorPrototype%': asyncGenPrototype,+    '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,+    '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,+    '%Boolean%': Boolean,+    '%BooleanPrototype%': Boolean.prototype,+    '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,+    '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,+    '%Date%': Date,+    '%DatePrototype%': Date.prototype,+    '%decodeURI%': decodeURI,+    '%decodeURIComponent%': decodeURIComponent,+    '%encodeURI%': encodeURI,+    '%encodeURIComponent%': encodeURIComponent,+    '%Error%': Error,+    '%ErrorPrototype%': Error.prototype,+    '%eval%': eval, // eslint-disable-line no-eval+    '%EvalError%': EvalError,+    '%EvalErrorPrototype%': EvalError.prototype,+    '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,+    '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,+    '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,+    '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,+    '%Function%': Function,+    '%FunctionPrototype%': Function.prototype,+    '%Generator%':  generatorFunctionPrototype,+    '%GeneratorFunction%': generatorFunction,+    '%GeneratorPrototype%': generatorPrototype,+    '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,+    '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,+    '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,+    '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,+    '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,+    '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,+    '%isFinite%': isFinite,+    '%isNaN%': isNaN,+    '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,+    '%JSON%': typeof JSON === 'object' ? JSON : undefined,+    '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,+    '%Map%': typeof Map === 'undefined' ? undefined : Map,+    '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),+    '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,+    '%Math%': Math,+    '%Number%': Number,+    '%NumberPrototype%': Number.prototype,+    '%Object%': Object,+    '%ObjectPrototype%': $ObjectPrototype,+    '%ObjProto_toString%': $ObjectPrototype.toString,+    '%ObjProto_valueOf%': $ObjectPrototype.valueOf,+    '%parseFloat%': parseFloat,+    '%parseInt%': parseInt,+    '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,+    '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,+    '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,+    '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,+    '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,+    '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,+    '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,+    '%RangeError%': RangeError,+    '%RangeErrorPrototype%': RangeError.prototype,+    '%ReferenceError%': ReferenceError,+    '%ReferenceErrorPrototype%': ReferenceError.prototype,+    '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,+    '%RegExp%': RegExp,+    '%RegExpPrototype%': RegExp.prototype,+    '%Set%': typeof Set === 'undefined' ? undefined : Set,+    '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),+    '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,+    '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,+    '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,+    '%String%': String,+    '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,+    '%StringPrototype%': String.prototype,+    '%Symbol%': hasSymbols ? Symbol : undefined,+    '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,+    '%SyntaxError%': SyntaxError,+    '%SyntaxErrorPrototype%': SyntaxError.prototype,+    '%ThrowTypeError%': ThrowTypeError,+    '%TypedArray%': TypedArray,+    '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,+    '%TypeError%': TypeError,+    '%TypeErrorPrototype%': TypeError.prototype,+    '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,+    '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,+    '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,+    '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,+    '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,+    '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,+    '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,+    '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,+    '%URIError%': URIError,+    '%URIErrorPrototype%': URIError.prototype,+    '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,+    '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,+    '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,+    '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype+};++let override: Intrinsic;+const BASE_INTRINSIC_DATA: { [intrinsic: string]: string | Intrinsic } = {+    '%Array%': { type: 'ArrayConstructor', get: 'typeof Array' },+    '%ArrayBuffer%': {+        type: 'ArrayBufferConstructor',+        get: 'typeof ArrayBuffer',+        overrides: {+            prototype: override = { type: 'ArrayBuffer', get: 'typeof ArrayBuffer.prototype' },+        },+    },+    '%ArrayBufferPrototype%': override,+    '%ArrayIteratorPrototype%': 'IterableIterator<any>',
    '%ArrayIteratorPrototype%': 'IterableIterator<unknown>',
ExE-Boss

comment created time in a day

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat(es‑abstract): Use script to generate `GetIntrinsics`

+#!/usr/bin/env ts-node --script-mode+/// <reference types="node"/>+import path = require('path');+import fs = require('fs');++const OUT_FILE_PATH = path.resolve(__dirname, '..', 'GetIntrinsic.d.ts');++const hasSymbols = true;+const { getPrototypeOf: getProto, getOwnPropertyDescriptor: $gOPD } = Reflect as {+    getPrototypeOf(target: object): any;+    getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(+        target: T,+        propertyKey: P,+    ): (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor) | undefined;+};++function isObject(value: unknown): value is object {+    if (value === undefined || value === null) return false;+    return typeof value === 'object' || typeof value === 'function';+}++// tslint:disable: only-arrow-functions space-before-function-paren+const ThrowTypeError = (function () {+    return $gOPD(arguments, 'callee')!.get;+})();++// tslint:disable: no-async-without-await+const generator = function* () {};+const asyncFn = async function () {};+const asyncGen = async function* () {};+// tslint:enable++const generatorFunction = generator ? /** @type {GeneratorFunctionConstructor} */ generator.constructor : undefined;+const generatorFunctionPrototype = generatorFunction ? generatorFunction.prototype : undefined;+const generatorPrototype = generatorFunctionPrototype ? generatorFunctionPrototype.prototype : undefined;++const asyncFunction = asyncFn ? /** @type {FunctionConstructor} */ asyncFn.constructor : undefined;++const asyncGenFunction = asyncGen ? /** @type {AsyncGeneratorFunctionConstructor} */ asyncGen.constructor : undefined;+const asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;+const asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;++const TypedArray: any = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);++interface BaseIntrinsic {+    getterType?: string;+    get?: string;+    overrides?: { [property: string]: string | Override | null };+}++interface Override extends BaseIntrinsic {+    type?: string;+}++interface Intrinsic extends Override {+    type: string;+}++const $ObjectPrototype = Object.prototype;++// prettier-ignore+const BASE_INTRINSICS: { [intrinsic: string]: object | undefined; } = {+    '%Array%': Array,+    '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,+    '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,+    '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,+    '%ArrayPrototype%': Array.prototype,+    '%ArrayProto_entries%': Array.prototype.entries,+    '%ArrayProto_forEach%': Array.prototype.forEach,+    '%ArrayProto_keys%': Array.prototype.keys,+    '%ArrayProto_values%': Array.prototype.values,+    '%AsyncFromSyncIteratorPrototype%': undefined,+    '%AsyncFunction%': asyncFunction,+    '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,+    '%AsyncGenerator%':  asyncGenFunctionPrototype,+    '%AsyncGeneratorFunction%': asyncGenFunction,+    '%AsyncGeneratorPrototype%': asyncGenPrototype,+    '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,+    '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,+    '%Boolean%': Boolean,+    '%BooleanPrototype%': Boolean.prototype,+    '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,+    '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,+    '%Date%': Date,+    '%DatePrototype%': Date.prototype,+    '%decodeURI%': decodeURI,+    '%decodeURIComponent%': decodeURIComponent,+    '%encodeURI%': encodeURI,+    '%encodeURIComponent%': encodeURIComponent,+    '%Error%': Error,+    '%ErrorPrototype%': Error.prototype,+    '%eval%': eval, // eslint-disable-line no-eval+    '%EvalError%': EvalError,+    '%EvalErrorPrototype%': EvalError.prototype,+    '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,+    '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,+    '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,+    '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,+    '%Function%': Function,+    '%FunctionPrototype%': Function.prototype,+    '%Generator%':  generatorFunctionPrototype,+    '%GeneratorFunction%': generatorFunction,+    '%GeneratorPrototype%': generatorPrototype,+    '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,+    '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,+    '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,+    '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,+    '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,+    '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,+    '%isFinite%': isFinite,+    '%isNaN%': isNaN,+    '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,+    '%JSON%': typeof JSON === 'object' ? JSON : undefined,+    '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,+    '%Map%': typeof Map === 'undefined' ? undefined : Map,+    '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),+    '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,+    '%Math%': Math,+    '%Number%': Number,+    '%NumberPrototype%': Number.prototype,+    '%Object%': Object,+    '%ObjectPrototype%': $ObjectPrototype,+    '%ObjProto_toString%': $ObjectPrototype.toString,+    '%ObjProto_valueOf%': $ObjectPrototype.valueOf,+    '%parseFloat%': parseFloat,+    '%parseInt%': parseInt,+    '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,+    '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,+    '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,+    '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,+    '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,+    '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,+    '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,+    '%RangeError%': RangeError,+    '%RangeErrorPrototype%': RangeError.prototype,+    '%ReferenceError%': ReferenceError,+    '%ReferenceErrorPrototype%': ReferenceError.prototype,+    '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,+    '%RegExp%': RegExp,+    '%RegExpPrototype%': RegExp.prototype,+    '%Set%': typeof Set === 'undefined' ? undefined : Set,+    '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),+    '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,+    '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,+    '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,+    '%String%': String,+    '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,+    '%StringPrototype%': String.prototype,+    '%Symbol%': hasSymbols ? Symbol : undefined,+    '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,+    '%SyntaxError%': SyntaxError,+    '%SyntaxErrorPrototype%': SyntaxError.prototype,+    '%ThrowTypeError%': ThrowTypeError,+    '%TypedArray%': TypedArray,+    '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,+    '%TypeError%': TypeError,+    '%TypeErrorPrototype%': TypeError.prototype,+    '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,+    '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,+    '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,+    '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,+    '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,+    '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,+    '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,+    '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,+    '%URIError%': URIError,+    '%URIErrorPrototype%': URIError.prototype,+    '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,+    '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,+    '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,+    '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype+};++let override: Intrinsic;+const BASE_INTRINSIC_DATA: { [intrinsic: string]: string | Intrinsic } = {+    '%Array%': { type: 'ArrayConstructor', get: 'typeof Array' },+    '%ArrayBuffer%': {+        type: 'ArrayBufferConstructor',+        get: 'typeof ArrayBuffer',+        overrides: {+            prototype: override = { type: 'ArrayBuffer', get: 'typeof ArrayBuffer.prototype' },+        },+    },+    '%ArrayBufferPrototype%': override,+    '%ArrayIteratorPrototype%': 'IterableIterator<any>',+    '%ArrayPrototype%': 'typeof Array.prototype',+    '%ArrayProto_entries%': 'typeof Array.prototype.entries',+    '%ArrayProto_forEach%': 'typeof Array.prototype.forEach',+    '%ArrayProto_keys%': 'typeof Array.prototype.keys',+    '%ArrayProto_values%': 'typeof Array.prototype.values',+    '%AsyncFromSyncIteratorPrototype%': 'AsyncIterableIterator<any>',
    '%AsyncFromSyncIteratorPrototype%': 'AsyncIterableIterator<unknown>',
ExE-Boss

comment created time in a day

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat(es‑abstract): Use script to generate `GetIntrinsics`

+#!/usr/bin/env ts-node --script-mode+/// <reference types="node"/>+import path = require('path');+import fs = require('fs');++const OUT_FILE_PATH = path.resolve(__dirname, '..', 'GetIntrinsic.d.ts');++const hasSymbols = true;+const { getPrototypeOf: getProto, getOwnPropertyDescriptor: $gOPD } = Reflect as {+    getPrototypeOf(target: object): any;+    getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(+        target: T,+        propertyKey: P,+    ): (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor) | undefined;+};++function isObject(value: unknown): value is object {+    if (value === undefined || value === null) return false;+    return typeof value === 'object' || typeof value === 'function';+}++// tslint:disable: only-arrow-functions space-before-function-paren+const ThrowTypeError = (function () {+    return $gOPD(arguments, 'callee')!.get;+})();++// tslint:disable: no-async-without-await+const generator = function* () {};+const asyncFn = async function () {};+const asyncGen = async function* () {};+// tslint:enable++const generatorFunction = generator ? /** @type {GeneratorFunctionConstructor} */ generator.constructor : undefined;+const generatorFunctionPrototype = generatorFunction ? generatorFunction.prototype : undefined;+const generatorPrototype = generatorFunctionPrototype ? generatorFunctionPrototype.prototype : undefined;++const asyncFunction = asyncFn ? /** @type {FunctionConstructor} */ asyncFn.constructor : undefined;++const asyncGenFunction = asyncGen ? /** @type {AsyncGeneratorFunctionConstructor} */ asyncGen.constructor : undefined;+const asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;+const asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;++const TypedArray: any = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);

why does this need any?

ExE-Boss

comment created time in a day

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat(es‑abstract): Use script to generate `GetIntrinsics`

+#!/usr/bin/env ts-node --script-mode+/// <reference types="node"/>+import path = require('path');+import fs = require('fs');++const OUT_FILE_PATH = path.resolve(__dirname, '..', 'GetIntrinsic.d.ts');++const hasSymbols = true;+const { getPrototypeOf: getProto, getOwnPropertyDescriptor: $gOPD } = Reflect as {+    getPrototypeOf(target: object): any;
    getPrototypeOf(target: object): null | object;
ExE-Boss

comment created time in a day

push eventtc39/ecma262

bterlson

commit sha c50513ea30ac6a62f1b0b9c56b4f06779815db51

Update gh-pages [skip ci]

view details

push time in a day

pull request commenttc39/ecma262

Editorial: Make numeric values and operations default to mathematical values

I prefer the shorthand of ±, but some of the editors preferred the long form, so it's likely that's what we'll stick with.

caiolima

comment created time in a day

PR merged tc39/ecma262

Editorial: Unify text about refining grammars editorial change

Unified both wording and formatting.

+42 -10

0 comment

1 changed file

marjakh

pr closed time in a day

push eventtc39/ecma262

Marja Hölttä

commit sha b25c59273f407974e0c7d9372a2c9f71bb1f21c4

Editorial: Unify text about refining grammars (#2020) Unified both wording and formatting.

view details

push time in a day

push eventmarjakh/ecma262

Kevin Gibbons

commit sha d6ee7dd76f875335e3c2651084f919faffee8488

Editorial: use Oxford spelling for behaviour (#2016)

view details

Kevin Gibbons

commit sha fe4f9abaec3bd1a1c93fdca464f64e05611eb2ac

Editorial: empty String, not empty string (#2016)

view details

Kevin Gibbons

commit sha 95e5e77fc29df087ad895659870aee36292bbef5

Editorial: *this* value, not *this* object (#2016)

view details

Kevin Gibbons

commit sha a57942283c7f722ca088a395c23c3bdca61fed2d

Editorial: add missing space in abstract operation header (#2016)

view details

Kevin Gibbons

commit sha 3f104be6ccb6447e75412c33f420b5bca8009c5b

Meta: bump ecmarkup (#2016)

view details

Michael Ficarra

commit sha 32fe1a621c485080f6e1a1c0cc13a772b3f601bd

Editorial: fix inconsistent phrase "the empty String value" (#2017)

view details

Michael Dyck

commit sha 5e33f80bf375612e2be756656abb805670f2f8fd

Editorial: Remove unused steps from definitions of Contains (#1519) ... specifically, steps of the form: If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*. Resolves issue #831. As @allenwb points out, the intended use case for such steps does not occur in the spec. And as I point out, these steps are semantically problematic. If the intended use case ever *does* occur, I'm guessing we'll find a different way to handle it.

view details

Michael Dyck

commit sha 9e48030ca8c696a7137fdd533fc4bf4db16b7685

Editorial: simplify definitions of Contains (#1519) ... after previous commit. Specifically, when code says: ``` 1. If <something>, return *false*. 1. Return *false*. ``` we can drop the first step, because the result is `*false*` either way.

view details

Marja Hölttä

commit sha b25c59273f407974e0c7d9372a2c9f71bb1f21c4

Editorial: Unify text about refining grammars (#2020) Unified both wording and formatting.

view details

push time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 function makeOutOfOrderReport(context, imported) {   reportOutOfOrder(context, imported, outOfOrder, 'before') } -function importsSorterAsc(importA, importB) {-  if (importA < importB) {-    return -1-  }--  if (importA > importB) {-    return 1-  }--  return 0-}+function getSorter(ascending) {+  return function importsSorter(importA, importB) {+    let result -function importsSorterDesc(importA, importB) {-  if (importA < importB) {-    return 1-  }+    if ((importA < importB) || importB === null) {+      result = -1+    }+    else if ((importA > importB) || importA === null) {+      result = 1+    }+    else {+      result = 0+    } -  if (importA > importB) {-    return -1+    return result * (ascending ? 1 : -1)   }--  return 0 }

the intention was to avoid the ascending check every time - ie, for performance.

manuth

comment created time in a day

issue commenttc39/proposal-class-fields

Interaction with Integrity Levels?

This is already the case with a number things in the spec - you can't make Maps/Sets/WeakMaps/WeakSets immutable, nor Promises.

Additionally, the common desugaring of your code would be:

const x = new WeakMap();
class B extends class { constructor(o) { return o; } } {
  constructor(...args) {
    super(...args);
    x.set(this, 'stamped');
  }
  static gx(o) {
    if (!x.has(o)) { throw new TypeError(); }
    return x.get(o);
  }
}

var obj = {};
Object.seal(obj);
new B(obj);
print(B.gx(obj));
mgaudet

comment created time in a day

issue openedtc39/proposal-private-fields-in-in

Path to Stage 4!

Stage 4

  • [ ] class fields is stage 4
  • [ ] committee approval
  • [ ] implement in two browsers
  • [ ] significant in-the-field experience
  • [ ] ecma262 PR approved
  • [ ] prepare ecma262 PR
  • [ ] merge test262 tests
  • [ ] write test262 tests

Stage 3

  • [ ] committee approval
  • [ ] spec editor signoff
  • [ ] spec reviewer signoff
  • [ ] receive implementor feedback

Stage 2

  • [ ] receive developer feedback
  • [ ] committee approval
  • [ ] spec reviewers selected
  • [x] spec text written

Stage 1

  • [x] committee approval

created time in a day

pull request commentbenmosher/eslint-plugin-import

Add fix for Windows Subsystem for Linux

ahhh so the existing tests do cover it, but we're not actually running tests on WSL - just on normal windows.

If you already know how to add that to appveyor or travis, then that would be amazing, but if not, that is also OK and we can punt it to later.

manuth

comment created time in a day

Pull request review commentbenmosher/eslint-plugin-import

[New] `order`: Add support for TypeScript's "import equals"-expressions

 function makeOutOfOrderReport(context, imported) {   reportOutOfOrder(context, imported, outOfOrder, 'before') } -function importsSorterAsc(importA, importB) {-  if (importA < importB) {-    return -1-  }--  if (importA > importB) {-    return 1-  }--  return 0-}+function getSorter(ascending) {+  return function importsSorter(importA, importB) {+    let result -function importsSorterDesc(importA, importB) {-  if (importA < importB) {-    return 1-  }+    if ((importA < importB) || importB === null) {+      result = -1+    }+    else if ((importA > importB) || importA === null) {+      result = 1+    }+    else {+      result = 0+    } -  if (importA > importB) {-    return -1+    return result * (ascending ? 1 : -1)   }--  return 0 }

can you elaborate on why you prefer this approach, to the current one of a separate function?

manuth

comment created time in a day

push eventljharb/agendas

Chris Garrett

commit sha 76cede1664ea11cc762889d7d685bdbf018ec872

Update Decorators agenda item Add slides, and scheduling constraints

view details

Shu-yu Guo

commit sha bb29331c82742f9ca41debbb3081679375ce1d49

Add slides for .item()

view details

Jordan Harband

commit sha 3b73576933cf7417172c7f8b1f9da7b0ab181da5

2020.06: fix whitespace, sorting

view details

push time in a day

push eventtc39/agendas

Jordan Harband

commit sha 3b73576933cf7417172c7f8b1f9da7b0ab181da5

2020.06: fix whitespace, sorting

view details

push time in a day

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat(es‑abstract): Update to v1.17

 declare namespace GetIntrinsic {         '%SyntaxError%': SyntaxErrorConstructor;         '%SyntaxErrorPrototype%': SyntaxError;         '%ThrowTypeError%': () => never;-        '%TypedArray%': unknown;-        '%TypedArrayPrototype%': unknown;+        '%TypedArray%': any;+        '%TypedArrayPrototype%': any;

i can see why it'd be nice to have the typings overload on the literal string input, and return the proper type - but i'm still not understanding any any is better than unknown, and if you're using jsdoc in your JS, the whole point is to force the types to be correct.

ExE-Boss

comment created time in a day

more