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

fix: remove type:module from package.json #44

Merged
merged 1 commit into from
Nov 3, 2023
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
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {extends: ['@commitlint/config-conventional']};
module.exports = {extends: ['@commitlint/config-conventional']};
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"react"
],
"license": "MIT",
"type": "module",
"files": [
"svgs",
"esm",
Expand All @@ -30,19 +29,19 @@
"homepage": "https://gravity-ui.com",
"scripts": {
"prepare": "husky install",
"lint:js": "eslint --ext .js,.jsx,.ts,.tsx . .storybook",
"lint:js": "eslint --ext .js,.jsx,.mjs,.ts,.tsx . .storybook",
"lint:styles": "stylelint '**/*.scss' '.storybook/**/*.scss'",
"lint": "run-p lint:*",
"typecheck": "tsc --noEmit && tsc --noEmit -p .storybook",
"test": "exit 0",
"start": "sb dev -p 7009",
"build-storybook": "sb build -c .storybook -o storybook-static",
"src:download": "node scripts/download.js",
"src:icons": "node scripts/icons.js",
"src:download": "node scripts/download.mjs",
"src:icons": "node scripts/icons.mjs",
"build:cjs": "tsc --declaration --outDir .",
"build:esm": "tsc --module esnext --outDir esm",
"build": "run-p build:*",
"clean": "node scripts/clean.js",
"clean": "node scripts/clean.mjs",
"prepublishOnly": "npm run build"
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts/download.js → scripts/download.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import fs from 'fs/promises';
import {components as loadComponents} from '@figma-export/core';
import {optimize} from 'svgo';
import {ICON_NAME_REGEXP, SVGS_DIR} from './constants.js';
import {cleanDir, getComponentName} from './utils.js';
import {aliases} from './aliases.js';
import {ICON_NAME_REGEXP, SVGS_DIR} from './constants.mjs';
import {cleanDir, getComponentName} from './utils.mjs';
import {aliases} from './aliases.mjs';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

Expand All @@ -18,7 +18,7 @@
function parsePropertiesString(str) {
return str.split(/\s*,\s*/).reduce((acc, prop) => {
const [name, value] = prop.split('=');
acc[name] = value;

Check warning on line 21 in scripts/download.mjs

View workflow job for this annotation

GitHub Actions / Verify Files

Assignment to property of function parameter 'acc'
return acc;
}, {});
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/icons.js → scripts/icons.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import path from 'path';
import fs from 'fs/promises';
import {transform} from '@svgr/core';

import {ICONS_DIR, SVGS_DIR} from './constants.js';
import {cleanDir, getComponentName, prettify} from './utils.js';
import {ICONS_DIR, SVGS_DIR} from './constants.mjs';
import {cleanDir, getComponentName, prettify} from './utils.mjs';

async function createIndexFile(files) {
const indexFile = path.join(ICONS_DIR, 'index.ts');
Expand Down
File renamed without changes.
Loading