Skip to content

[Lint] Update linter to use babel-lint and lint JSX/React directly - #259

Closed
ide wants to merge 1 commit into
react:masterfrom
ide:eslintrc
Closed

[Lint] Update linter to use babel-lint and lint JSX/React directly#259
ide wants to merge 1 commit into
react:masterfrom
ide:eslintrc

Conversation

@ide

@ideide commented Mar 26, 2015

Copy link
Copy Markdown
Contributor
  • Upgraded eslint
  • Installed babel-eslint so that we can parse JSX and ES6
  • Installed eslint-react-plugin so we can lint JSX directly w/o a transform
  • no-comma-dangle was replaced with comma-dangle
  • space-unary-word-ops was replaced with space-unary-ops.

@sahrens

Copy link
Copy Markdown
Contributor

@amasad Can we do this yet?

@amasad

Copy link
Copy Markdown
Contributor

I think we need to update our eslint version first. Right?

@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 7, 2015
@ide
ideforce-pushed the eslintrc branch 3 times, most recently from cfd2e3f to 09ab33cCompareApril 15, 2015 21:00
@ide
ideforce-pushed the eslintrc branch 2 times, most recently from f7310d7 to e7b1894CompareApril 28, 2015 01:23
@ide

ide commented Apr 28, 2015

Copy link
Copy Markdown
ContributorAuthor

Probably the best way to approach this is to install eslint, babel-lint, and eslint-react-plugin directly so that React Native can have its own linter settings independent of any other project. My latest commit does this but there's an issue with the packager where it's finding conflicting @providesModule directives deep inside of node_modules (the "commoner" module's files) so that needs to be resolved before merging.

@amasad

Copy link
Copy Markdown
Contributor

I had this on my list of things todo. I'll take a look soon!

@ide
ideforce-pushed the eslintrc branch 3 times, most recently from 1d5716b to 41be26dCompareMay 13, 2015 23:03
@ide
ideforce-pushed the eslintrc branch 2 times, most recently from d5dcc41 to 538bff7CompareMay 16, 2015 06:09
@amasad

Copy link
Copy Markdown
Contributor

Didn't forget about this. Switching to babel very soon and then we can easily use this.

@ide

ide commented May 18, 2015

Copy link
Copy Markdown
ContributorAuthor

I'll keep rebasing periodically so it's easy to merge and uses the latest eslint plugins.

@amasad

Copy link
Copy Markdown
Contributor

Thanks @ide! We just switched to Babel, and we can safely merge this now (after testing internally, with phabricator etc)
@jaredly will take care of this.

@amasadamasad assigned jaredly and unassigned amasadMay 20, 2015
Comment threadpackage.json Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's unrelated iirc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jest should only be in devDependencies

- Upgraded eslint
- Installed babel-eslint so that we can parse JSX and ES6
- Installed eslint-react-plugin so we can lint JSX directly w/o a transform
- `no-comma-dangle` was replaced with `comma-dangle`
- `space-unary-word-ops` was replaced with `space-unary-ops`.
@ide

ide commented May 21, 2015

Copy link
Copy Markdown
ContributorAuthor

Removed the unnecessary jest-cli entry from dependencies.

@ideide changed the title [Lint] Update space-unary-ops rule in eslintrc (fixes Atom linter crash)[Lint] Update linter to use babel-lint and lint JSX/React directlyMay 21, 2015
@jaredly

Copy link
Copy Markdown
Contributor

Thanks!
I had to make some changes to get this to work for both open source and internal, and will show up at the next sync.

@ide

ide commented May 22, 2015

Copy link
Copy Markdown
ContributorAuthor

Sweet, looking forward to it.

@ide

ide commented May 30, 2015

Copy link
Copy Markdown
ContributorAuthor

Yay! Thanks for landing it =)

@ideide closed this May 30, 2015
@ide
ide deleted the eslintrc branch May 31, 2015 09:57
@amasad

Copy link
Copy Markdown
Contributor

💃

mganandraj pushed a commit to mganandraj/react-native that referenced this pull request Mar 26, 2020
* Remove a stale ref to a deprecated file
* remove more unneeded recovered files- remove libs by ref
* add back lib refs as we get build failures with them out
* fix up blank space issues
jfrolich pushed a commit to jfrolich/react-native that referenced this pull request Apr 22, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ide@sahrens@amasad@jaredly@vjeux@facebook-github-bot