Skip to content

Commit

Permalink
ci: fail on lint warnings (#522)
Browse files Browse the repository at this point in the history
* ci: fail lint on warnings
* style: fix linting
* docs: changelog
  • Loading branch information
KiwiKilian authored Nov 28, 2024
1 parent 1e35bf6 commit 2f0c294
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Please add unreleased changes in the following style:
- PR Title ([#___](https://github.com/maplibre/maplibre-react-native/pull/___))
```

- ci: fail on lint warning ([#522](https://github.com/maplibre/maplibre-react-native/pull/522))
- fix: allow MapView and Images to have no children ([#521](https://github.com/maplibre/maplibre-react-native/pull/521))
- docs: reformat changelog ([#520](https://github.com/maplibre/maplibre-react-native/pull/520))
- refactor: rename `RCTMLN` to `MLRN` ([#519](https://github.com/maplibre/maplibre-react-native/pull/519))
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"test": "jest",
"lint": "yarn lint:tsc && yarn lint:eslint",
"lint:tsc": "tsc --project ./ && tsc --project ./packages/examples",
"lint:eslint": "eslint ./",
"lint:eslint:fix": "eslint ./ --fix",
"lint:eslint": "eslint ./ --max-warnings 0",
"lint:eslint:fix": "yarn lint:eslint --fix",
"plugin:build": "tsc --build ./plugin",
"plugin:lint": "yarn plugin:lint:tsc && yarn plugin:lint:eslint",
"plugin:lint:tsc": "tsc --noEmit --project ./plugin",
"plugin:lint:eslint": "eslint ./plugin/src/*",
"plugin:lint:eslint": "eslint ./plugin/src/* --max-warnings 0",
"plugin:test": "jest ./plugin",
"prepack": "bob build && yarn plugin:build"
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/ImageSource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export interface ImageSourceProps extends BaseProps {

type NativeProps = ImageSourceProps;

const MLRNImageSource =
requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
const MLRNImageSource = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);

/**
* ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.
Expand Down
4 changes: 1 addition & 3 deletions src/components/Light.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ const Light: React.FC<LightProps> = (props: LightProps) => {
...props,
});

return (
<MLRNLight ref={setNativeLayer} testID="mlrnLight" {...baseProps} />
);
return <MLRNLight ref={setNativeLayer} testID="mlrnLight" {...baseProps} />;
};

export default Light;
3 changes: 1 addition & 2 deletions src/components/MarkerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ const MarkerView = ({

let lastId = 0;

const MLRNMarkerView =
requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
const MLRNMarkerView = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);

export default MarkerView;

0 comments on commit 2f0c294

Please sign in to comment.