Skip to content

Commit

Permalink
use rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Nov 27, 2023
1 parent f77d8cd commit baf3611
Show file tree
Hide file tree
Showing 24 changed files with 2,058 additions and 1,681 deletions.
2 changes: 1 addition & 1 deletion .babelrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"@babel/preset-typescript",
"@babel/preset-react"
["@babel/preset-react", { "runtime": "automatic" }]
],
"plugins": []
}
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
build/
dist/
storybook-static/
59 changes: 0 additions & 59 deletions .eslintrc.js

This file was deleted.

25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/react-in-jsx-scope": "off",

"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-confusing-void-expression": "off"
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ node_modules/

# dist
dist/
build/

# husky
_/
Expand Down
26 changes: 0 additions & 26 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
stories: ['../examples/**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../examples/**/*.stories.@(tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand Down
1 change: 0 additions & 1 deletion examples/control.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import styled from 'styled-components';

const Style = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions examples/lrc/auto_scroll.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unstable-nested-components */
import React, { CSSProperties } from 'react';
import { type CSSProperties } from 'react';
import styled, { css } from 'styled-components';
import { Lrc, useRecoverAutoScrollImmediately } from '../..';
import { Lrc, useRecoverAutoScrollImmediately } from '../../src';
import useTimer from '../use_timer';
import Control from '../control';

Expand Down
3 changes: 1 addition & 2 deletions examples/lrc/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable react/function-component-definition */
import React from 'react';
import { ComponentStory } from '@storybook/react';
import { type ComponentStory } from '@storybook/react';
import StaticComponent from './static';
import AutoScrollComponent from './auto_scroll';
import { lrc } from '../data';
Expand Down
3 changes: 1 addition & 2 deletions examples/lrc/static.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable react/no-unstable-nested-components */
import React from 'react';
import styled from 'styled-components';
import { Lrc } from '../..';
import { Lrc } from '../../src';
import { formatMillisecond } from '../utils';

const Line = styled.div`
Expand Down
6 changes: 3 additions & 3 deletions examples/multiple_lrc/auto_scroll.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/no-unstable-nested-components */
import React, { CSSProperties } from 'react';
import { type CSSProperties } from 'react';
import styled, { css } from 'styled-components';
import { MultipleLrc, useRecoverAutoScrollImmediately } from '../..';
import { MultipleLrc, useRecoverAutoScrollImmediately } from '../../src';
import useTimer from '../use_timer';
import Control from '../control';

Expand Down Expand Up @@ -80,7 +80,7 @@ function LrcDemo({
lineRenderer={({ active, line: { children } }) => (
<Line active={active}>
{children.map((child) => (
<div>{child.content}</div>
<div key={child.id}>{child.content}</div>
))}
</Line>
)}
Expand Down
3 changes: 1 addition & 2 deletions examples/multiple_lrc/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable react/function-component-definition */
import React from 'react';
import { ComponentStory } from '@storybook/react';
import { type ComponentStory } from '@storybook/react';
import StaticComponent from './static';
import { originalLrc, translatedLrc } from '../data';
import AutoScrollComponent from './auto_scroll';
Expand Down
3 changes: 1 addition & 2 deletions examples/multiple_lrc/static.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable react/no-unstable-nested-components */
import React from 'react';
import styled from 'styled-components';
import { MultipleLrc } from '../..';
import { MultipleLrc } from '../../src';
import { formatMillisecond } from '../utils';

const Line = styled.div<{ active: boolean }>`
Expand Down
Loading

0 comments on commit baf3611

Please sign in to comment.