Skip to content

Commit

Permalink
refactor: merge with master, fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Oct 18, 2022
2 parents 11a9fc8 + 943dfeb commit 86844e5
Show file tree
Hide file tree
Showing 11 changed files with 1,959 additions and 3,825 deletions.
2 changes: 1 addition & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { withConsole } from '@storybook/addon-console';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { addDecorator, addParameters } from '@storybook/react';
import { withConsole } from '@storybook/addon-console';

import { theme } from './theme';

Expand Down
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
]
}
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributing

Thanks for contributing!

## Getting Started

Ensure you're using the Node version specified in [.nvmrc](./.nvmrc) and run the following to
bootstrap the project:

```sh
yarn
```

To start the library build and `example` project, run the following commands in separate terminals:

```sh
# Start the library build
yarn start

# Start the example build
cd ./example
yarn
yarn start
```

To start Storybook run the following command:

```sh
yarn storybook
```

## Standards

- Commits use the [Conventional Commits](https://conventionalcommits.org/) standard
- yarn to manage dependencies
- Use a tool (e.g. nvm or fnm) to use the correct Node.js version
- Prettier & EditorConfig for code style
- ESLint for quality
- Husky for Git hooks

## VS Code

If you're using VS Code please make sure you install the [recommended extensions](./.vscode/extensions.json).
3 changes: 1 addition & 2 deletions docs/stories/00-props.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint no-console: 0 */
import React from 'react';
import { Story } from '@storybook/react';

import React from 'react';
import { ReactCompareSlider, ReactCompareSliderImage } from 'react-compare-slider';

import * as config from './config';
Expand Down
1 change: 0 additions & 1 deletion docs/stories/02-handles.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint no-console: 0 */
import React from 'react';

import {
ReactCompareSlider,
ReactCompareSliderHandle,
Expand Down
3 changes: 1 addition & 2 deletions docs/stories/03-custom-components.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint no-console: 0 */
import { GoogleApiWrapper, Map } from 'google-maps-react';
import React from 'react';
import { Map, GoogleApiWrapper } from 'google-maps-react';

import { ReactCompareSlider } from 'react-compare-slider';

import * as config from './config';
Expand Down
5 changes: 1 addition & 4 deletions example/demo-blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ export const DemoSection: React.FC<DemoSectionProps> = ({
}) => (
<section className="c-demo-section" {...props}>
<div className="c-demo-section__info">
<h1
className="c-demo-section__title"
dangerouslySetInnerHTML={{ __html: title }}
/>
<h1 className="c-demo-section__title" dangerouslySetInnerHTML={{ __html: title }} />
<p
className="c-demo-section__description"
dangerouslySetInnerHTML={{ __html: description }}
Expand Down
3 changes: 1 addition & 2 deletions example/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint no-console: 0 */

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { ReactCompareSlider, ReactCompareSliderImage, styleFitContainer } from '../src';

import { ReactCompareSlider, ReactCompareSliderImage, styleFitContainer } from '../src';
import { DemoSection } from './demo-blocks';

const App = () => {
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,19 @@
"printWidth": 90,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"importOrder": [
"^[./]"
],
"importOrderBuiltinModulesToTop": true,
"importOrderCaseInsensitive": true,
"importOrderParserPlugins": [
"typescript",
"jsx",
"decorators-legacy"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
},
"peerDependencies": {
"react": ">=16.8",
Expand Down
2 changes: 1 addition & 1 deletion src/ReactCompareSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useCallback, useRef, useState } from 'react';
import React, { useCallback, useEffect, useRef, useState } from 'react';

import { ContainerClip, ContainerHandle } from './Container';
import { ReactCompareSliderHandle } from './ReactCompareSliderHandle';
Expand Down

0 comments on commit 86844e5

Please sign in to comment.