Sosuke Suzuki
3628c52867
Do not throw an error for optional binding pattern params in function declaration ( #12085 )
2020-09-21 09:14:13 -05:00
fisker Cheung
18d13d0032
Fix invalid setter parse ( #12076 )
...
* Fix invalid `setter` parse
* estree
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-19 10:03:35 +02:00
Sosuke Suzuki
ae18f9c0d9
Throw a syntax error for a declare function with a body ( #12054 )
2020-09-19 00:35:37 +02:00
Sosuke Suzuki
7028a14c7f
fix: throw for constructors with type parameters ( #12065 )
...
* Throw a syntax error for a constructor with type parameters
* Modify to match error location with TypeScript
* Update typescript parser tests
Update allowlist.txt
2020-09-17 13:03:33 -04:00
Sosuke Suzuki
bbe0cf09fc
Throw a syntax error for a parameter properties in not constructor ( #12061 )
2020-09-14 16:28:06 -05:00
Huáng Jùnliàng
af64ccb2b0
v7.11.5
2020-08-31 15:54:06 -04:00
Huáng Jùnliàng
2c60595342
fix: ExpressionBody should respect [In] parameter ( #11931 )
2020-08-26 13:24:44 -04:00
Huáng Jùnliàng
3fad7eab9b
Use Yarn 2 ( #11962 )
...
* chore: use yarn 2
* chore: remove redundant yarn locks
* chore: remove publishEslintPkg
* chore: remove redundant make bootstrap
* Update .yarnrc.yml
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
* chore: use workspace protocol for eslint packages in the root
Co-Authored-By: merceyz <merceyz@users.noreply.github.com>
* chore: pin caniuse-lite versions
Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie
depends on specific caniuse-lite versions. We pinned the version here
so we don't have to deal with fixture different in e2e-tests
where all deps will be updated and tested.
* chore: resolve yarn install warnings
* chore: update yarn cache path on circle/travis
* chore: add yarn deduplicate plugin
* chore: deduplicate lock files
* chore: move devDependencies to leaf packages
* chore: remove @yarnpkg/plugin-constraints
* chore: remove unused dedupe options
* test: fix unwanted self reference
* chore: remove output-file-sync dependency
* chore: update browserify to 16.5.2
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-25 14:37:30 -04:00
Brian Ng
941f610275
Set generator to true during error recovery of accessor ( #11987 )
2020-08-21 14:37:52 -05:00
Huáng Jùnliàng
90b1989569
v7.11.4
2020-08-20 14:51:38 -04:00
Brian Ng
84ea6e4501
Throw error on invalid flow async generic arrow syntax ( #11979 )
2020-08-19 16:11:17 -05:00
Brian Ng
96cc8292b7
Fix parsing type casted generic flow arrow exprs ( #11955 )
2020-08-19 14:15:01 -05:00
Huáng Jùnliàng
cdada5800d
fix: do not transform ClassPrivateMethods in estree ( #11973 )
...
* fix: do not transform ClassPrivateMethods in estree
* fix: use MethodDefinition as ClassPrivateMethod visitor keys
2020-08-18 11:18:38 -04:00
Huáng Jùnliàng
66c6b3b949
Add more parser test cases ( #11923 )
...
* remove unused codes
* refactor: remove unused parseAccessModifier
* refactor: remove redundant async function checks
* refactor: remove redundant class check in checkExport
* add more parser test cases
* Update packages/babel-parser/src/parser/statement.js
Co-authored-by: Brian Ng <bng412@gmail.com>
* chore: add sourceType: unambiguous test
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-08-14 11:53:17 -04:00
Huáng Jùnliàng
df9ee2c7cd
Simplify tokenizer update context ( #11944 )
...
* replace lineBreak.test by hasPrecedingLingBreak
* refactor: simplify updateContext
2020-08-11 13:43:03 -04:00
Huáng Jùnliàng
3995160fc7
fix: push new token context when braceHashL is seen ( #11941 )
...
* fix: push new token context when braceHashL is seen
* Update packages/babel-parser/src/tokenizer/context.js
2020-08-11 09:55:13 -04:00
Huáng Jùnliàng
008fe25ae2
fix: reset EndLocation for catch param ( #11943 )
2020-08-10 17:06:34 -04:00
Huáng Jùnliàng
a3893129ec
chore: enable flowcheck on CI ( #11945 )
...
* chore: enable flowcheck on CI
* fix: flow errors
2020-08-10 16:57:29 -04:00
Huáng Jùnliàng
4bb1e164da
Refactor [In] production parameter tracking ( #11930 )
...
* refactor: track [In] parameter in prodParam
* Apply suggestions from code review
2020-08-10 07:32:38 -04:00
Huáng Jùnliàng
57b658c4d8
v7.11.3
2020-08-08 15:59:38 -04:00
Huáng Jùnliàng
a827ca41f3
refactor: simplify smart pipeline parsing ( #11919 )
2020-08-05 21:15:42 -04:00
Huáng Jùnliàng
76f033f8c7
simplify isLookaheadRelational method ( #11922 )
...
* refactor: move isLookaheadRelational to flow plugins
* refactor: simplify isLookaheadRelational to isLookaheadToken_lt
2020-08-05 20:21:35 -04:00
Huáng Jùnliàng
cd577eedfd
refactor: add recoverable error on accessorIsGenerator ( #11921 )
...
* refactor: add recoverable error on accessorIsGenerator
* Update packages/babel-parser/src/parser/error-message.js
Co-authored-by: Brian Ng <bng412@gmail.com>
* Apply suggestions from code review
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-08-05 17:52:13 -04:00
Brian Ng
c0f6f0394d
Support ConditionalExpressions in dry-error-messages rule ( #11917 )
...
* Support ConditionalExpressions in dry-error-messages rule
* tests
2020-08-05 16:28:35 -04:00
Huáng Jùnliàng
50b3262063
refactor: avoid unnecessary property access ( #11918 )
...
* refactor: avoid unnecessary property access
* refactor: `else` is redundant because keyName is const
2020-08-05 15:39:45 -04:00
Huáng Jùnliàng
bc7a811fce
v7.11.2
2020-08-05 10:15:43 -04:00
Huáng Jùnliàng
92434269af
fix: do not eat get/set after async is parsed ( #11916 )
2020-08-05 08:19:59 -05:00
Huáng Jùnliàng
953ae82159
v7.11.1
2020-08-04 17:58:35 -04:00
Huáng Jùnliàng
a1eabb84ea
rescan gt/lt token after TsAsExpression is parsed ( #11912 )
...
* refactor: move inType checks to flow plugin
* polish: replace hardcoded char codes
* fix: rescan greater/less token after asExpression is parsed
2020-08-04 17:00:21 -04:00
Huáng Jùnliàng
a4ebe29b3f
Parser refactoring ( #11871 )
...
* refactor: parseMaybeUnary => parseUnary
* refactor: extract shouldExitDescending method
* refactor: add parseUpdate
* refactor: avoid comparing with hardcoded token value
* refactor: add ParseNewOrNewTarget
* refactor: add parseCoverCallAndAsyncArrowHead
* add parseBind
* refactor: polish parseTaggedTemplateExpression interface
* refactor: add parseMember method
* refactor: add parseSuper method
* refactor: add parseAsyncArrowUnaryFunction method
* fix: disallow line break before async binding arrow
* refactor: simplify tt.name logic
* refactor: add parseDo method
* refactor: misc
* refactor: rename parseObjectMember by parsePropertyDefinition
* refactor: unify set/get/async keyword parsing in ObjectMethod
* refactor: misc
* refactor: add parseArrayLike method
* refactor: move fsharp epilogure and prologue inside parseObjectLike
* fixup
* refactor: rename parseFunctionExpression to parseFunctionOrFunctionSent
* refactor: remove redundant logic
* refactor: rename parseClassPropertyName by parseClassElementName
* refactor: avoid unecessary lookahead when parsing tt._export
* fix: export-default-from should support escaped async as export binding
* address review comments
* parseUnary -> parseMaybeUnary
2020-07-31 20:36:04 -04:00
Huáng Jùnliàng
45fdb87747
v7.11.0
2020-07-30 17:12:07 -04:00
Huáng Jùnliàng
01d4625412
Correctly check reserved word for PropertyDefinition: IdentifierReference ( #11862 )
...
* fix: check IdentifierReference in PropertyDefinition
* chore: add more test cases
* fix: incorrect test title
2020-07-29 19:40:52 -04:00
Vahagn Aharonian
b651a6f6ab
Enable logical assignment by default in @babel/parser ( #11860 ) ( #11869 )
2020-07-29 18:32:12 -04:00
Huáng Jùnliàng
0e985fb287
feat: enable numericSeparator parsing support ( #11863 )
2020-07-29 18:32:12 -04:00
Nicolò Ribaudo
eba4c3b6ed
TypeScript 4.0: Support labeled tuple elements ( #11754 )
...
* TypeScript 4.0: Support labeled tuple elements
* More tests
* Disallow mixing labeled and unlabeled elements
* Update AST shape
* Enable test after rebase
* Allow labeled spread types
* Fix flow
* Add types and generator suport
* Update packages/babel-parser/src/plugins/typescript/index.js
* Prettier
2020-07-29 16:51:48 -04:00
Huáng Jùnliàng
9e6663f125
Follow-up on initial TS4 catch param support ( #11767 )
...
* refactor: align with AST shape convention
* feat: print catch param type annotations
* test: add test case on transform
2020-07-29 16:51:48 -04:00
Brian Ng
8a1d7e41f2
Allow unknown/any in TS catch clause param ( #11755 )
2020-07-29 16:51:48 -04:00
Nicolò Ribaudo
5b4b3a3e4a
TypeScript 4.0: Allow spread in the middle of tuples ( #11753 )
2020-07-29 16:51:48 -04:00
Huáng Jùnliàng
d7347fb8bd
eslint-parser: ES2020 features ( #11815 )
...
* chore: update espree test on nullish coalescing
* feat: add optional chaining support
* fix: adapt to estree AST shape
* chore: update lockfile
* add estree optional-chaining test fixtures
* address review comments
* chore: simplify smoke test
* export * support
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-07-29 16:46:29 -04:00
Huáng Jùnliàng
059e9124ff
Add decimal parsing support ( #11640 )
...
* docs: add DecimalLiteral to AST spec
* add decimal support
* fix: throw invalid decimal on start
* add DecimalLiteral type definitions
* update parser typings
* add generator support
* add syntax-decimal plugin
* Add syntax-decimal to babel-standalone
* add syntax-decimal to missing plugin helpers
* fix incorrect test macro
2020-07-29 16:43:15 -04:00
Huáng Jùnliàng
2bf38fb914
fix: disallow \8, \9 in strict mode string ( #11852 )
2020-07-21 09:44:56 -04:00
Huáng Jùnliàng
3680f019d7
fix: allow 09.1_1 and 09e1_1 in sloppy mode ( #11854 )
...
* fix: allow 09.1_1 and 09e1_1 in sloppy mode
* polish: avoid extra input source scanning
* chore: move comment [skip ci]
2020-07-21 09:44:28 -04:00
Huáng Jùnliàng
f4eeff947d
fix: correctly set innerEndPos in CoverParenthesizedExpressionAndArrowParameterList ( #11847 )
2020-07-16 17:11:06 -05:00
Huáng Jùnliàng
8f191ead92
chore: fix typo in codebase ( #11846 )
2020-07-16 16:01:20 -05:00
Huáng Jùnliàng
f7964a9ac5
v7.10.5
2020-07-14 14:10:36 -04:00
Huáng Jùnliàng
02c8fd92bd
fix: add optional: false to chained optional call expression ( #11814 )
2020-07-09 20:33:50 -04:00
Huáng Jùnliàng
d67629b114
fix: throw expect jsx plugin error when an idStart or > is seen ( #11774 )
...
* fix: throw expect jsx plugin error when an idStart or > is seen
* fix: avoid throwing undefined
* add test case
2020-07-01 15:17:05 -04:00
Huáng Jùnliàng
b1b21e5c03
docs: add AST spec on optional chain [skip ci] ( #11729 )
2020-07-01 14:20:17 -04:00
Huáng Jùnliàng
7fd40d86a0
v7.10.4
2020-06-30 09:04:22 -04:00
Kai Cataldo
75c2300c28
Add @babel/eslint-plugin-development-internal ( #11376 )
...
* Add @babel/eslint-plugin-internal
* Add dry-error-messages rule
* Address feedback
* Enable new rule
* fix author field
* Fix errors
* Add readme
* Add example configuration
* Handle directories
* run make bootstrap
* More updates!
* Fix errors
* Update tests
* Fix CI race condition
2020-06-22 19:43:29 -04:00