19 Commits

Author SHA1 Message Date
Daniel Tschinder
b32d271fee
Migrate some duplicate binding tests to traverse (#9532)
* Migrate try-catch duplicate error

* Remove exception for functions and let in the same scope

* Migrate duplicate bindings tests to traverse

* Add test for subscope and let/const

* Add more test cases
2019-02-19 21:25:49 -08:00
Chaitanya Kumar Kamatham
daf0ca8680 Rename "babylon" to "@babel/parser" (#7937) 🎉 2018-05-19 00:03:05 -04:00
Rubén Norte
bc6f0f989d Re-add support for local Flow bindings (TypeAlias, OpaqueTypeAlias and Interface) (#7900) 2018-05-17 10:54:14 -07:00
Deven Bansod
8b57a3e3b9 Migrate a few packages' tests to use Jest Expect (see below)
* Migrate the following packages' tests:
    * babel-helper-annotate-as-pure
    * babel-helper-module-imports
    * babel-helper-transform-fixture-test-runner
    * babel-highlight
    * babel-node
    * babel-plugin-transform-modules-commonjs
    * babel-preset-env-standalone
    * babel-preset-env
    * babel-preset-es2015
    * babel-preset-react
    * babel-standalone
    * babel-template
    * babel-traverse
    * babel-types
2018-03-24 16:22:10 +05:30
Nicolò Ribaudo
9a231c5671 Remove support for flow bindings (#6528)
Flow bindings have been deprecated for a while.
The reason behind this change is that `declare var foo`
doesn't introduce a new local binding, but it represents
a global one.
2017-11-09 12:29:04 -08:00
Ruben Verborgh
6560a29c36 Redeclaring a variable counts as a modification (#6219)
* Redeclaring a variable counts as a modification.

Fixes #6217.

* Remove "existing" logic from Binding.

Was added in #5745, but no longer triggered since 6536e605a.
2017-09-08 23:02:26 -04:00
Daniel Tschinder
44f6ff5e85 Update prettier, eslint + plugins, flow, husky and lint-staged (#6183) 2017-08-31 22:56:29 +02:00
Ash
960e1708a1 babel-traverse: Mark appropriate template literals as pure (#5914)
* Identify pure template literals

* Mark template literals as pure where possible

* Changes based on code review

* nit
2017-07-11 17:42:34 -04:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Mauro Bringolf
c142bbc429 Remove duplicated getStatementParent and refactor requires to imports in tests (#5746)
* Additional testcase and require->import refactorings

* Removed duplicated getStatementParent function. Refactored all babel-traverse tests to use ESmodules
2017-05-31 15:33:25 -04:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Jason Laster
ff2c24eed2 Add test for reference paths (#5296) 2017-02-15 15:05:31 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Juriy Zaytsev
beda884f41 Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel (#4758)
* Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel

* generateUid: account for labels again
2016-10-21 17:19:59 -04:00
Andrew Levine
9f8ab29213 Change usage of "suite"/"test" in unit-tests to "describe"/"it" (#4734)
Fixes #4733
2016-10-15 18:45:35 -04:00
Andrew Levine
c0038221d7 Run ESLint on test files, and fix lint errors in test files (#4732) 2016-10-15 18:27:48 -04:00
Amjad Masad
2a2cb4f160 Support ObjectProperty in purity check 2015-12-09 16:49:16 -08:00
Sebastian McKenzie
e72d4508de only use outer bindings when registering a binding to prevent retreiving function params - fixes #2615 2015-11-03 03:00:27 +00:00