Skip to content

Add ESLint and fix a number of linting violations#501

Merged
spikebrehm merged 4 commits intoreact-native-maps:masterfrom
spikebrehm:add-eslint
Aug 26, 2016
Merged

Add ESLint and fix a number of linting violations#501
spikebrehm merged 4 commits intoreact-native-maps:masterfrom
spikebrehm:add-eslint

Conversation

@spikebrehm
Copy link
Copy Markdown

Add ESLint using the eslint-config-airbnb preset, and override a few of the rules to better fit with React Native (prefer-object-spread, react/jsx-filename-extension) or to suppress a number of the warnings until we can get everything cleaned up (no-use-before-define, no-underscore-dangle).

Add npm run lint command, which runs ESLint. Currently, there are still 488 linting errors, which I'd like to fix in follow-up PRs to prevent a bunch of merge conflicts from popping up.

Note: This doesn't actually enforce linting to pass in CI before merging. That will happen once we address all the issues.

Please take a look @lelandrichardson @jrichardlai.

cc: @ljharb

@@ -0,0 +1 @@
node_modules
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.

this should already be gitignored, and as such, eslint should already ignore it - why is this needed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

In my testing, without ignoring this, eslint . takes significantly longer.

@spikebrehm spikebrehm merged commit 241c5ac into react-native-maps:master Aug 26, 2016
@spikebrehm spikebrehm deleted the add-eslint branch August 26, 2016 21:17
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
Add ESLint and fix a number of linting violations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants