Skip to content

Commit

Permalink
Removed eslint rule that checks modules
Browse files Browse the repository at this point in the history
Summary:Removed eslint rule that checks modules

After we updated to ESLint 2.x, ESLint started complaining `'use strict' is unnecessary inside of modules  strict`.
This is correct behaviour because according to spec modules are strict.
The problem is that our transforms don't transpile strict mode so we still need to have this pragma in all our code.

I did not find a way to make eslint require "use strict" for ES6 modules: eslint/eslint#2785
So I am removing this.

What stops us from automatically adding strict mode with babel?

Need your feedback, frantic martinbigio
David said that you Martin looked into this.
Closes #6403

Differential Revision: D3038039

Pulled By: martinbigio

fb-gh-sync-id: b8a00c093768a318487dcb89e433859825a08b2c
shipit-source-id: b8a00c093768a318487dcb89e433859825a08b2c
  • Loading branch information
bestander authored and Facebook Github Bot 6 committed Mar 10, 2016
1 parent 7da65a8 commit 26b2aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@
"wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default)
"yoda": 1, // require or disallow Yoda conditions

// Strict Mode
// These rules relate to using strict mode.

"strict": [2, "global"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)

// Variables
// These rules have to do with variable declarations.

Expand Down
2 changes: 2 additions & 0 deletions Examples/UIExplorer/UIExplorerList.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
'use strict';

const React = require('react-native');

export type UIExplorerExample = {
key: string;
module: React.Component;
Expand Down

0 comments on commit 26b2aa9

Please sign in to comment.