mirror of
https://github.com/status-im/react-native.git
synced 2025-01-20 06:18:57 +00:00
26b2aa91b6
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: https://github.com/eslint/eslint/issues/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 https://github.com/facebook/react-native/pull/6403 Differential Revision: D3038039 Pulled By: martinbigio fb-gh-sync-id: b8a00c093768a318487dcb89e433859825a08b2c shipit-source-id: b8a00c093768a318487dcb89e433859825a08b2c
188 lines
4.0 KiB
JavaScript
188 lines
4.0 KiB
JavaScript
/**
|
|
* The examples provided by Facebook are for non-commercial testing and
|
|
* evaluation purposes only.
|
|
*
|
|
* Facebook reserves all rights not expressly granted.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
|
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*
|
|
* @flow
|
|
*/
|
|
'use strict';
|
|
|
|
const React = require('react-native');
|
|
|
|
export type UIExplorerExample = {
|
|
key: string;
|
|
module: React.Component;
|
|
};
|
|
|
|
var ComponentExamples: Array<UIExplorerExample> = [
|
|
{
|
|
key: 'ImageExample',
|
|
module: require('./ImageExample'),
|
|
},
|
|
{
|
|
key: 'ListViewExample',
|
|
module: require('./ListViewExample'),
|
|
},
|
|
{
|
|
key: 'PickerAndroidExample',
|
|
module: require('./PickerAndroidExample'),
|
|
},
|
|
{
|
|
key: 'ProgressBarAndroidExample',
|
|
module: require('./ProgressBarAndroidExample'),
|
|
},
|
|
{
|
|
key: 'RefreshControlExample',
|
|
module: require('./RefreshControlExample'),
|
|
},
|
|
{
|
|
key: 'ScrollViewSimpleExample',
|
|
module: require('./ScrollViewSimpleExample'),
|
|
},
|
|
{
|
|
key: 'StatusBarExample',
|
|
module: require('./StatusBarExample'),
|
|
},
|
|
{
|
|
key: 'SwitchExample',
|
|
module: require('./SwitchExample'),
|
|
},
|
|
{
|
|
key: 'TextExample',
|
|
module: require('./TextExample'),
|
|
},
|
|
{
|
|
key: 'TextInputExample',
|
|
module: require('./TextInputExample'),
|
|
},
|
|
{
|
|
key: 'ToolbarAndroidExample',
|
|
module: require('./ToolbarAndroidExample'),
|
|
},
|
|
{
|
|
key: 'TouchableExample',
|
|
module: require('./TouchableExample'),
|
|
},
|
|
{
|
|
key: 'ViewExample',
|
|
module: require('./ViewExample'),
|
|
},
|
|
{
|
|
key: 'ViewPagerAndroidExample',
|
|
module: require('./ViewPagerAndroidExample'),
|
|
},
|
|
{
|
|
key: 'WebViewExample',
|
|
module: require('./WebViewExample'),
|
|
},
|
|
];
|
|
|
|
const APIExamples = [
|
|
{
|
|
key: 'AccessibilityAndroidExample',
|
|
module: require('./AccessibilityAndroidExample'),
|
|
},
|
|
{
|
|
key: 'AlertExample',
|
|
module: require('./AlertExample').AlertExample,
|
|
},
|
|
{
|
|
key: 'AppStateExample',
|
|
module: require('./AppStateExample'),
|
|
},
|
|
{
|
|
key: 'BorderExample',
|
|
module: require('./BorderExample'),
|
|
},
|
|
{
|
|
key: 'CameraRollExample',
|
|
module: require('./CameraRollExample'),
|
|
},
|
|
{
|
|
key: 'ClipboardExample',
|
|
module: require('./ClipboardExample'),
|
|
},
|
|
{
|
|
key: 'DatePickerAndroidExample',
|
|
module: require('./DatePickerAndroidExample'),
|
|
},
|
|
{
|
|
key: 'GeolocationExample',
|
|
module: require('./GeolocationExample'),
|
|
},
|
|
{
|
|
key: 'ImageEditingExample',
|
|
module: require('./ImageEditingExample'),
|
|
},
|
|
{
|
|
key: 'LayoutEventsExample',
|
|
module: require('./LayoutEventsExample'),
|
|
},
|
|
{
|
|
key: 'LinkingExample',
|
|
module: require('./LinkingExample'),
|
|
},
|
|
{
|
|
key: 'LayoutExample',
|
|
module: require('./LayoutExample'),
|
|
},
|
|
{
|
|
key: 'NavigationExperimentalExample',
|
|
module: require('./NavigationExperimental/NavigationExperimentalExample'),
|
|
},
|
|
{
|
|
key: 'NetInfoExample',
|
|
module: require('./NetInfoExample'),
|
|
},
|
|
{
|
|
key: 'PanResponderExample',
|
|
module: require('./PanResponderExample'),
|
|
},
|
|
{
|
|
key: 'PointerEventsExample',
|
|
module: require('./PointerEventsExample'),
|
|
},
|
|
{
|
|
key: 'TimePickerAndroidExample',
|
|
module: require('./TimePickerAndroidExample'),
|
|
},
|
|
{
|
|
key: 'TimerExample',
|
|
module: require('./TimerExample'),
|
|
},
|
|
{
|
|
key: 'ToastAndroidExample',
|
|
module: require('./ToastAndroidExample'),
|
|
},
|
|
{
|
|
key: 'VibrationExample',
|
|
module: require('./VibrationExample'),
|
|
},
|
|
{
|
|
key: 'XHRExample',
|
|
module: require('./XHRExample'),
|
|
},
|
|
];
|
|
|
|
const Modules = {};
|
|
|
|
APIExamples.concat(ComponentExamples).forEach(Example => {
|
|
Modules[Example.key] = Example.module;
|
|
});
|
|
|
|
const UIExplorerList = {
|
|
APIExamples,
|
|
ComponentExamples,
|
|
Modules,
|
|
};
|
|
|
|
module.exports = UIExplorerList;
|