0

Reland "Add cr.exportPath() to ESLint banned properties"

This reverts commit 87042ab605.

Reason for revert:

Clean up CLs have now landed and support for cr.exportPath() is
being removed from Closure Compiler's --chrome_pass.

It'll still have runtime effects, but the compiler wont understand
that cr.exportPath('a.b.c') translates to window.a.b.c.

Original change's description:
> Revert "Add cr.exportPath() to ESLint banned properties"
> 
> This reverts commit 6f69db7bdc.
> 
> Reason for revert:
> 
> The cleanup CLs haven't landed yet cuz the tree is borked
> (ex: https://crrev.com/c/1995802)
> 
> NOTREECHECKS=true
> NOTRY=true
> 
> Original change's description:
> > Add cr.exportPath() to ESLint banned properties
> > 
> > R=​dpapad@chromium.org
> > 
> > Bug: 1028829
> > Change-Id: I6ff5518a178bd86a5ab13b8ef7d8bce52b9588fd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1995947
> > Commit-Queue: Dan Beam <dbeam@chromium.org>
> > Auto-Submit: Dan Beam <dbeam@chromium.org>
> > Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#730348}
> 
> TBR=dbeam@chromium.org,dpapad@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 1028829
> Change-Id: I57cca1d4367794050cbd571382b30f11e650d429
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999549
> Reviewed-by: Dan Beam <dbeam@chromium.org>
> Commit-Queue: Dan Beam <dbeam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#730990}

TBR=dbeam@chromium.org,dpapad@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1028829
Change-Id: I50af2fb35ab9ea9a7a73533499c5876f4a44d05f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003920
Reviewed-by: Dan Beam <dbeam@chromium.org>
Commit-Queue: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732201}
This commit is contained in:
Dan Beam
2020-01-16 00:40:41 +00:00
parent 38cabdccff
commit 1aa00a12bc

@ -44,6 +44,11 @@ module.exports = {
'property': '__defineSetter__',
'message': 'Use Object.defineProperty',
},
{
'object': 'cr',
'property': 'exportPath',
'message': 'Use ES modules or cr.define() instead',
},
],
'no-var': 'error',
'prefer-const': 'error',