Skip to content

Commit 26b2aa9

Browse files
bestanderFacebook Github Bot 6
authored andcommitted
Removed eslint rule that checks modules
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 facebook#6403 Differential Revision: D3038039 Pulled By: martinbigio fb-gh-sync-id: b8a00c093768a318487dcb89e433859825a08b2c shipit-source-id: b8a00c093768a318487dcb89e433859825a08b2c
1 parent 7da65a8 commit 26b2aa9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.eslintrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@
147147
"wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default)
148148
"yoda": 1, // require or disallow Yoda conditions
149149

150-
// Strict Mode
151-
// These rules relate to using strict mode.
152-
153-
"strict": [2, "global"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)
154-
155150
// Variables
156151
// These rules have to do with variable declarations.
157152

Examples/UIExplorer/UIExplorerList.android.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
'use strict';
1717

18+
const React = require('react-native');
19+
1820
export type UIExplorerExample = {
1921
key: string;
2022
module: React.Component;

0 commit comments

Comments
 (0)