Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hongfaqiu committed Sep 6, 2024
1 parent 36736b0 commit 72fc294
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import tseslint from 'typescript-eslint';
import prettierPlugin from 'eslint-plugin-prettier';

export default [
{
ignores: ['**/dist/**', '**/node_modules/**', '**/turbo/**'],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
Expand All @@ -29,6 +32,7 @@ export default [
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'prettier/prettier': 'error',
'no-case-declarations': 'off',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/geojson-render/src/dataSourceRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const dataSourceRender = async (
scaleByDistance: new NearFarScalar(1, 0.85, 8.0e6, 0.75),
...label.paint,
text: label.paint.text?.replace(
/\{([^\{]*)\}/g,
/{([^{}]*)}/g,
(match, p1) => getEntityValue(entity, p1) ?? '',
),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/geojson-render/src/primitiveRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const primitiveGeoJsonRender = async (
scaleByDistance: new NearFarScalar(1, 0.85, 8.0e6, 0.75),
...label.paint,
text: label.paint.text?.replace(
/\{([^\{]*)\}/g,
/{([^{}]*)}/g,
(match, p1) => feature.properties?.[p1] ?? '',
),
},
Expand Down

0 comments on commit 72fc294

Please sign in to comment.