Skip to content

Commit

Permalink
chore: update eslint-plugin-prettier and run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahsporck committed Oct 19, 2023
1 parent 245d33b commit 968e4b2
Show file tree
Hide file tree
Showing 7 changed files with 4,974 additions and 3,974 deletions.
5,621 changes: 3,070 additions & 2,551 deletions .pnp.cjs
100644 → 100755

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Please add unreleased changes in the following style:
PR Title ([#123](link to my pr))
```

Update expo-config and expo-scripts ([#47](https://github.com/maplibre/maplibre-react-native/pull/104) and [#69](https://github.com/maplibre/maplibre-react-native/pull/69))
chore: update expo-config and expo-scripts ([#47](https://github.com/maplibre/maplibre-react-native/pull/104) and [#69](https://github.com/maplibre/maplibre-react-native/pull/69))
chore: update prettier and eslint-plugin-prettier ([#111](https://github.com/maplibre/maplibre-react-native/pull/111))

## 9.1.0

Expand Down
2 changes: 1 addition & 1 deletion javascript/components/Style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function getImageSource(id: string, source: MaplibreJSONSource): ReactElement {
return <ImageSource key={id} id={id} {...sourceProps} />;
}

type ShapeSourceShape = typeof ShapeSource.prototype.props['shape'];
type ShapeSourceShape = (typeof ShapeSource.prototype.props)['shape'];

function getShapeSource(id: string, source: MaplibreJSONSource): ReactElement {
const sourceProps: SourceProps & {
Expand Down
5 changes: 2 additions & 3 deletions javascript/modules/offline/offlineManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ class OfflineManager {
}

this.subscribe(packOptions.name, progressListener, errorListener);
const nativeOfflinePack = await MapLibreGLOfflineManager.createPack(
packOptions,
);
const nativeOfflinePack =
await MapLibreGLOfflineManager.createPack(packOptions);
this._offlinePacks[packOptions.name] = new OfflinePack(nativeOfflinePack);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"eslint-plugin-ft-flow": "^2.0.3",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jest": "^27.1.7",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions scripts/autogenerate.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,16 @@ async function generate() {
const outputPaths = templateMappings.map(m => m.output);

// autogenerate code
templateMappings.forEach(({input, output}) => {
await Promise.all(templateMappings.map(async ({input, output}) => {
const filename = output.split('/').pop();
console.log(`Generating ${filename}`);
const tmpl = ejs.compile(fs.readFileSync(input, 'utf8'), {strict: true});
let results = tmpl({layers});
if (filename.endsWith('ts')) {
results = prettier.format(results, { ...prettierrc, filepath: filename});
results = await prettier.format(results, { ...prettierrc, filepath: filename});
}
fs.writeFileSync(output, results);
});
}));

// autogenerate docs
const docBuilder = new DocJSONBuilder(layers);
Expand Down
Loading

0 comments on commit 968e4b2

Please sign in to comment.