Skip to content
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

#78 Обновить типы для React #83

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .build/configs.ts → .build/configs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ export const svgoConfigColorful: SVGOConfig = {
};

export const svgrConfig: SVGRConfig = {
plugins: ['@svgr/plugin-jsx', '@svgr/plugin-prettier'],
plugins: [
'@svgr/plugin-jsx',

// ВАЖНО: временно отключаем так как CJS внутри SVGR не умеет ESM
// '@svgr/plugin-prettier'
],
ref: true,
jsxRuntime: 'classic', // ВАЖНО: для того чтобы ESM работал и в react 17 и в react 18
typescript: true,
Expand Down
2 changes: 1 addition & 1 deletion .build/utils.ts → .build/utils.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs-extra';
import { transform } from '@svgr/core';
import lodash from 'lodash';
import { optimize, Config as SVGOConfig } from 'svgo';
import { svgoConfig, svgoConfigColorful, svgrConfig } from './configs.js';
import { svgoConfig, svgoConfigColorful, svgrConfig } from './configs.mjs';

const { camelCase, upperFirst } = lodash;

Expand Down
10 changes: 0 additions & 10 deletions .eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:pkg
Loading