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 0b2bc1f commit a93f153
Show file tree
Hide file tree
Showing 7 changed files with 1,240 additions and 4,219 deletions.
4,014 changes: 979 additions & 3,035 deletions .pnp.cjs

Large diffs are not rendered by default.

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

chore: update prettier and eslint-plugin-prettier ([#111](https://github.com/maplibre/maplibre-react-native/pull/111))

## 9.1.0

Update react to 18.2.0 and react-native to 0.72.1. ([#49](https://github.com/maplibre/maplibre-react-native/pull/49))
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 @@ -80,7 +80,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 a93f153

Please sign in to comment.