This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d83bc4e
commit 47b4374
Showing
9 changed files
with
95 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
parser: babel-eslint | ||
|
||
plugins: | ||
- react | ||
|
||
extends: | ||
- plugin:import/errors | ||
- plugin:import/warnings | ||
|
||
env: | ||
browser: true | ||
node: true | ||
es6: true | ||
mocha: true | ||
|
||
ecmaFeatures: | ||
jsx: true | ||
|
||
rules: | ||
# Strict mode | ||
strict: [2, never] | ||
|
||
# Code style | ||
indent: [2, 2] | ||
quotes: [2, single] | ||
no-unused-vars: 1 | ||
no-undef: 1 | ||
object-curly-spacing: [2, always] | ||
|
||
# JSX | ||
jsx-quotes: 1 | ||
|
||
# React | ||
react/display-name: 0 | ||
react/jsx-boolean-value: 1 | ||
react/jsx-closing-bracket-location: 1 | ||
react/jsx-curly-spacing: 1 | ||
react/jsx-max-props-per-line: 0 | ||
react/jsx-indent-props: 0 | ||
react/jsx-no-duplicate-props: 1 | ||
react/jsx-no-undef: 1 | ||
react/jsx-sort-prop-types: 0 | ||
react/jsx-sort-props: 0 | ||
react/jsx-uses-react: 1 | ||
react/jsx-uses-vars: 1 | ||
react/no-danger: 0 | ||
react/no-set-state: 0 | ||
react/no-did-mount-set-state: 1 | ||
react/no-did-update-set-state: 1 | ||
react/no-multi-comp: 1 | ||
react/no-unknown-property: 1 | ||
react/self-closing-comp: 1 | ||
react/jsx-wrap-multilines: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
/node_modules | ||
/playground | ||
/test | ||
/yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export as namespace ReactAim; | ||
export = ReactAim; | ||
|
||
import { Component, ReactElement } from 'react'; | ||
|
||
declare namespace ReactAim { | ||
type TargetSpec = { | ||
mouseEnter: (props: any, component: ReactElement) => void, | ||
mouseLeave: (props, component: ReactElement) => void, | ||
aimMove: (props, component: ReactElement, distance: number) => void, | ||
aimStart: (props, component: ReactElement, distance: number) => void, | ||
aimStop: (props, component: ReactElement) => void | ||
} | ||
|
||
function target<P, S>(): Component<P, S>; | ||
function target<P, S>(spec: TargetSpec): Component<P, S>; | ||
function target<P, S>(source: any, spec: TargetSpec): Component<P, S>; | ||
|
||
type SourceSpec = { | ||
mouseEnter: (props: any, component: ReactElement) => void, | ||
mouseLeave: (props, component: ReactElement) => void, | ||
}; | ||
|
||
function source<P, S>(): Component<P, S>; | ||
function source<P, S>(spec: SourceSpec): Component<P, S>; | ||
function source<P, S>(target: any, spec: SourceSpec): Component<P, S>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters