Commit Graph

14 Commits

Author SHA1 Message Date
Pieter De Baets ca1caf2713 Enable no-duplicate-props lint rule
Reviewed By: davidaurelio

Differential Revision: D3281234

fbshipit-source-id: 1b382694ad7a647464add4d1c856e7dde472205d
2016-05-10 05:00:24 -07:00
Konstantin Raev 26b2aa91b6 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: 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
2016-03-10 15:59:22 -08:00
Satyajit Sahoo 36f1961003 Use flow-bin to typecheck locally, update ESLint to 2.0
Summary:Using local version of the Flow make it easy to have project specific version instead of relying on the user to have the correct version installed globally. For example, React Native uses an older version of Flow, while I have the latest version installed. Now I cannot typecheck the code because my version doesn't match the `.flowconfig`.

**Test plan (required)**

Run `npm run lint` and `npm run flow` to run `eslint` and `flow`.

cc bestander mkonicek
Closes https://github.com/facebook/react-native/pull/6145

Reviewed By: dmmiller

Differential Revision: D2976616

Pulled By: bestander

fb-gh-sync-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
shipit-source-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
2016-03-03 04:15:59 -08:00
Tim Yung 087eeda616 RN: Allow `X == null` in ESLint
Reviewed By: voideanvalue

Differential Revision: D2908714

fb-gh-sync-id: a5f382fb3a71517fdab4c809311e78323e284fd9
2016-02-06 00:40:35 -08:00
Janic Duplessis af2f40754a Add global flow types to eslint globals
Summary:
Added a subset of the global flow types from the fbjs eslint config to remove the no-undef errors for flow types as well as a few missing browser globals that were used in the codebase.

I also added a .eslintrc file to Examples to allow using alert there without warnings.
Closes https://github.com/facebook/react-native/pull/5585

Reviewed By: svcscm

Differential Revision: D2872016

Pulled By: vjeux

fb-gh-sync-id: f9b1b511289425393074b7237049dec38ea407b6
2016-01-27 15:55:34 -08:00
Christopher Chedeau 69a4024c85 Fix lint warnings when adding a new js file
Summary: @​public
When we updated eslint, some of the rules have been renamed and are spamming everytime someone adds a new js file. It turns out that the rules that those have been deprecated to were already present in the current eslint config and enabled, so I just needed to remove them.

Reviewed By: @jingc

Differential Revision: D2467315
2015-09-22 13:05:43 -07:00
Alex Kotliarskyi d82af3cb92 Fix "global-strict" lint
Reviewed By: @vjeux

Differential Revision: D2420561
2015-09-09 11:25:18 -07:00
Jared Forsyth 52725437d4 Upgrating linting to use babel-eslint 2015-05-22 11:16:35 -08:00
Spencer Ahrens 1c70f33511 [ReactNative] clean lint for Libraries/Components 2015-05-18 15:54:07 -08:00
Eric Sauter 711dd6602e Fix lint errors and warnings
Summary:
Fix the following problems resulting from running `npm run lint`:

```
Examples/Movies/SearchScreen.js
  118:4  error  'fetch' is not defined  no-undef
  177:4  error  'fetch' is not defined  no-undef

Examples/UIExplorer/MapViewExample.js
  32:1  warning  Missing semicolon  semi

Examples/UIExplorer/NavigatorIOSColorsExample.js
  48:26  warning  ['lightContent'] is better written in dot notation  dot-notation

Examples/UIExplorer/TabBarIOSExample.js
  81:16  warning  Trailing spaces not allowed  no-trailing-spaces

Examples/UIExplorer/TextInputExample.js
  390:7  warning  Missing semicolon  semi

✖ 6 problems
```
Closes https://github.com/facebook/react-native/pull/1254
Github Author: Eric Sauter <esauter@lgscout.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:39:52 -08:00
Christopher Chedeau 85e1ad6b61 Updates from Mon 6 Apr
- [ReactNative] Revert D1965911 | Christopher Chedeau
- [ReactNative] Remove experimental Portal only needed for android right now. | Spencer Ahrens
- [ReactNative] rename Animation to AnimationExperimental with warning docs | Spencer Ahrens
- navigator.getCurrentRoutes() | Eric Vicenti
- Fixing jsdoc parsing of functions that are defined over multiple lines (Fixes #410) | Christopher Chedeau
- Added constraint of child type to touchablewithoutfeedback | Christopher Chedeau
- [react-packager] Deprecate global image namespace in favor of CommonJS resolution | Amjad Masad
- [react-packager] Don't cache rejected promise | Amjad Masad
- [ReactNative] Start Navigator gesture config, disable gesture in AdsManager | Eric Vicenti
- [Flow] Clean react-native-github for Flow v0.8.0 | Gabe Levi
- add maximumValue and minimumValue as valid attributes for native Slider | Christopher Chedeau
- react-packager: Add ES6 import statement support to DependencyGraph. | Amjad Masad
- Remove false annotation | Christopher Chedeau
- [madman] prevent pulling the content down inconsistently when the keyboard shows up | Kevin Gozali
- add @flow back to View.js | Basil Hosmer
- [ReactNative] Turn of lint warning for constant conditions | Eric Vicenti
- [UIExplorer] Fixed 'Push View Example' in NavigatorIOS example | Christopher Chedeau
- SliderIOS.js comments - grammar correction | Christopher Chedeau
2015-04-06 08:38:56 -07:00
Spencer Ahrens ed656633bc Fix some lint. 2015-03-26 10:32:15 -07:00
Christopher Chedeau 9bebc7e519 Updates from Wed Feb 25
- [react-packager] Fix lint errors | Amjad Masad
- [react-packager] fix a typo s/pacakge/package | Chengyin Liu
- [react-packager] Fix jest tests | Amjad Masad
- [Image] Really improve the quality of mis-sized images w/trilinear filtering | James Ide
2015-03-02 10:42:31 -08:00
Ben Alpert a15603d8f1 Initial commit 2015-01-29 17:10:49 -08:00