-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style(eslint): align root and example with the same configuration #1575
Conversation
error: Expected an assignment or function call and instead saw an expression: eslintno-unused-expressions, see https://eslint.org/docs/rules/no-unused-expressions
- super quick fix :(
hey @lisabaut, pretty cool - thanks for taking care of this 👍🏿 Some notes:
Nah, all good 👍🏿 We can extend when we find something missing later on
Yes, please revert - that's taken care off by the upgrade to RN
That was probably forgotten during another PR - you can also revert that, as it's taken care off by #1577
We're trying to be
Correct, feel free to remove one. Running Again, thank you very much for your contribution 🙇🏿 Cheers 🍻 |
That is weird. I am not able to reproduce these errors. Any idea what I am missing here? |
hmm 🤔, weird, yeah I'm doing the same thing.... only additional step I ran was let's merge this - it's already better than it previously was :) Maybe, if you find the time: We do not have a linting workflow - maybe you'd like to add one in the future? Cheers 🍻 |
Sure, with running the tests as well I suppose, as I could not find a workflow for this script either. |
That's included in the android workflow, see: Not saying those can't be improved though. Thanks again 🙇🏿 |
Just FYI, now that the PR is merged, I pulled and tested on my machine: |
…mapbox#1575) * fix: remove deprecated extend see https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21 * chore: move lint packages to root * refactor: move prettierrc to root * refactor: move tsconfig to root * chore: align typescript version with root * refactor: align one eslintrc withboth rules * style: run lint on root with same rules from example * fix: ts errors in plugn folder withMapbox * chore: run lint on all levels * style: run lint in example with same rules * fix: eslint errors in example/scenes/Home * fix: missing Proptypes in SetUserLocationMode * fix: false errors for used-before-defined in tsx * style: disable eslint in example test e22 file * fix: disable prop-type validation for TSX * fix: missing proptype for AnnotationContent * fix: eslintno-unused-expressions error: Expected an assignment or function call and instead saw an expression: eslintno-unused-expressions, see https://eslint.org/docs/rules/no-unused-expressions * fix: missing proptypes for ShowPointAnnotation * fix: TS no-var-requires error for JSON require * refactor: remove unused eslint disable * refactor: remove unused eslint-disable * refactor: remove unused eslint-disable * refactor: remove unused eslint-disable * fix: re-add eslint-disable - needed for CI ? * fix: remove unused import fropm test file * fix: remove unused import in test file * fix: incorrect propytes for items in Home.js - super quick fix :( * refactor: run yarn generate * chore: project.pbxproj after cocoapods update ? * build: update Changelog * Revert "chore: project.pbxproj after cocoapods update ?" This reverts commit 68cc15e. * Revert "refactor: run yarn generate" This reverts commit a257ddb. * refactor: remove script `format`
Description
Hi there 👋
As mentioned in this PR here https://github.com/react-native-mapbox-gl/maps/pull/1486 I said I would look into the linting issue (running
yarn lint
from root-level causes error inexample
folder).I ended up with a refactoring of the current eslint and tslint set-up which now ensures that one configuration works in all JS and TS files.
This PR does:
example
toroot
yarn lint
to lint all files in all folders with one configurationChecklist
yarn generate
CHANGELOG.md
index.d.ts
)/example
)Questions:
project.pbxproj
was changed, please see the commit here. I assume, I need to revert this commit?yarn generate
the file for OfflineManager.md was changed, is this correct?yarn
ornpm
?yarn format
andyarn lint
are doing the same now with this PR and one can be removed?