Skip to content

Commit

Permalink
update: react 18 + vite
Browse files Browse the repository at this point in the history
  • Loading branch information
esinx committed Jul 3, 2024
1 parent 6a0f388 commit 4ece8e1
Show file tree
Hide file tree
Showing 17 changed files with 4,577 additions and 8,262 deletions.
46 changes: 0 additions & 46 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

16 changes: 4 additions & 12 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
const path = require('path');

module.exports = {
stories: ['../src/**/*.stories.tsx'],
webpackFinal: async (config, { configType }) => {
// add scss support
config.module.rules.push({
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
include: path.resolve(__dirname, '../'),
});

return config;
},
framework: '@storybook/react-vite',
typescript: {
reactDocgen: 'react-docgen-typescript'
}
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021 Eunsoo Shin (esinx)
Copyright 2024 Eunsoo Shin (esinx)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import config from "@esinx/eslint-config";

export default [
...config,
]
254 changes: 115 additions & 139 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,141 +1,117 @@
{
"name": "react-swr-infinite-scroll",
"license": "MIT",
"version": "1.0.0",
"private": false,
"description": "Infinite scrolling with useSWRInfinite",
"author": "Eunsoo Shin",
"homepage": "https://github.com/esinx/react-swr-infinite-scroll",
"bugs": {
"url": "https://github.com/esinx/react-swr-infinite-scroll/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/esinx/react-swr-infinite-scroll.git"
},
"keywords": [
"react",
"swr",
"infinite scroll",
"hooks"
],
"scripts": {
"build": "yarn clean; rollup -c",
"clean": "rimraf dist",
"dev": "yarn storybook",
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
"lint": "yarn lint:script",
"lint:script": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"storybook": "start-storybook -p 9001 -s ./src/assets -c .storybook",
"build:storybook": "build-storybook -c .storybook -o storybook",
"publish": "npx semantic-release --no-ci"
},
"main": "index.js",
"module": "index.esm.js",
"types": "index.d.ts",
"dependencies": {
"classnames": "^2.2.6"
},
"peerDependencies": {
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"devDependencies": {
"@babel/core": "^7.12.7",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.8",
"@semantic-release/release-notes-generator": "^9.0.1",
"@storybook/react": "^6.1.2",
"@testing-library/react": "^11.2.2",
"@types/classnames": "^2.2.11",
"@types/node": "^12",
"@types/react": "^16.9.10",
"@types/react-dom": "^16.9.10",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"babel-loader": "^8.2.1",
"classnames": "^2.2.6",
"conventional-changelog-conventionalcommits": "^4.4.0",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"identity-obj-proxy": "^3.0.0",
"node-sass": "^5.0.0",
"prettier": "^2.2.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"rimraf": "^3.0.2",
"rollup": "^2.33.3",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"sass-loader": "^10.1.0",
"semantic-release": "^17.3.0",
"style-loader": "^2.0.0",
"swr": "^0.5.6",
"ts-loader": "^8.0.11",
"typescript": "^3.8.3",
"webpack": "^4.42.1"
},
"engines": {
"node": ">=12.0.0",
"yarn": "^1.5"
},
"release": {
"branches": [
"main",
"next"
],
"preset": "conventionalcommits",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]",
"assets": [
"CHANGELOG.md"
]
}
]
]
}
"name": "react-swr-infinite-scroll",
"license": "MIT",
"version": "2.0.0",
"private": false,
"description": "Infinite scrolling with useSWRInfinite",
"author": "Eunsoo Shin",
"prettier": "@esinx/prettier-config",
"homepage": "https://github.com/esinx/react-swr-infinite-scroll",
"bugs": {
"url": "https://github.com/esinx/react-swr-infinite-scroll/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/esinx/react-swr-infinite-scroll.git"
},
"keywords": [
"react",
"swr",
"infinite scroll",
"hooks"
],
"scripts": {
"build": "yarn clean; rollup -c",
"clean": "rimraf dist",
"dev": "yarn storybook",
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
"lint": "yarn lint:script",
"lint:script": "eslint ./src",
"storybook": "storybook dev --port 9001 -c .storybook",
"build:storybook": "storybook build -c .storybook -o storybook",
"publish": "npx semantic-release --no-ci"
},
"main": "index.js",
"module": "index.esm.js",
"types": "index.d.ts",
"peerDependencies": {},
"devDependencies": {
"@babel/core": "^7.12.7",
"@esinx/eslint-config": "^2.0.1",
"@esinx/prettier-config": "^1.0.0-3",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.8",
"@semantic-release/release-notes-generator": "^9.0.1",
"@storybook/react-vite": "^8.1.11",
"@types/node": "^12",
"babel-loader": "^8.2.1",
"conventional-changelog-conventionalcommits": "^4.4.0",
"eslint": "^9.6.0",
"prettier": "^2.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"rollup": "^2.33.3",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"semantic-release": "^17.3.0",
"storybook": "^8.1.11",
"style-loader": "^2.0.0",
"swr": "^0.5.6",
"ts-loader": "^8.0.11",
"typescript": "^5.5.3",
"vite": "^5.3.3"
},
"release": {
"branches": [
"main",
"next"
],
"preset": "conventionalcommits",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]",
"assets": [
"CHANGELOG.md"
]
}
]
]
}
}
2 changes: 0 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import typescript from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import postcss from 'rollup-plugin-postcss';
import commonjs from '@rollup/plugin-commonjs';
import pkg from './package.json';
import resolve from '@rollup/plugin-node-resolve';
Expand All @@ -26,7 +25,6 @@ export default {
plugins: [
resolve(),
commonjs(),
postcss(),
typescript({
typescript: ts,
tsconfig: 'tsconfig.json',
Expand Down
Loading

0 comments on commit 4ece8e1

Please sign in to comment.