Skip to content

Commit

Permalink
Adopt new prettier settings (atomiks#582)
Browse files Browse the repository at this point in the history
Turn semis on, turn bracketSpacing off, remove proseWrap
  • Loading branch information
atomiks authored Sep 29, 2019
1 parent f2d2af3 commit 6ab715c
Show file tree
Hide file tree
Showing 133 changed files with 4,467 additions and 4,414 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ module.exports = {
},
rules: {
'no-prototype-builtins': 'off',
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
'@typescript-eslint/no-use-before-define': ['error', {functions: false}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
},
}
};
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help Tippy.js improve
title: ''
labels: "\U0001F41B bug, \U0001F6A7 unconfirmed"
assignees: ''

---

## Bug description
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest a feature for Tippy.js
title: ''
labels: "\U0001F48E enhancement"
assignees: ''

---

## Problem
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: Ask a general question about Tippy.js
title: ''
labels: "\U0001F4A1 question"
assignees: ''

---


5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "always"
"bracketSpacing": false,
"trailingComma": "all"
}
56 changes: 28 additions & 28 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ When you're finished, you can remove everything after @5
Previously, the default import injected the CSS stylesheet into `<head>`:

```js
import tippy from 'tippy.js'
import tippy from 'tippy.js';
```

In v5, this import is now side-effect free to work better with dependencies when
Expand All @@ -39,18 +39,18 @@ users have CSP enabled or using frameworks that control the `<head>`.
You should import the CSS separately:

```js
import tippy from 'tippy.js'
import 'tippy.js/dist/tippy.css'
import tippy from 'tippy.js';
import 'tippy.js/dist/tippy.css';
```

You can however opt-in to use the injected CSS version, just like v4:

```js
// Just like v4
import tippy from 'tippy.js/dist/tippy-bundle.esm'
import tippy from 'tippy.js/dist/tippy-bundle.esm';

// Or CommonJS:
const tippy = require('tippy.js/dist/tippy-bundle.cjs')
const tippy = require('tippy.js/dist/tippy-bundle.cjs');
```

## `data-tippy` attribute
Expand All @@ -68,12 +68,12 @@ free. Initializing via the `tippy()` constructor is required.
Node:

```js
import tippy, { animateFill } from 'tippy.js'
import 'tippy.js/dist/tippy.css'
import tippy, {animateFill} from 'tippy.js';
import 'tippy.js/dist/tippy.css';

// These stylesheets are required for it to work
import 'tippy.js/dist/backdrop.css'
import 'tippy.js/animations/shift-away.css'
import 'tippy.js/dist/backdrop.css';
import 'tippy.js/animations/shift-away.css';

tippy(
targets,
Expand All @@ -82,7 +82,7 @@ tippy(
animateFill: true,
},
[animateFill],
)
);
```

Browser:
Expand All @@ -99,7 +99,7 @@ Browser:
tippy(targets, {
content: 'tooltip',
animateFill: true,
})
});
</script>
```

Expand All @@ -118,7 +118,7 @@ Browser:
Node:

```js
import 'tippy.js/animations/scale.css'
import 'tippy.js/animations/scale.css';
```

Browser:
Expand All @@ -145,12 +145,12 @@ prop instead.
Node:

```js
import { roundArrow } from 'tippy.js'
import 'tippy.js/dist/svg-arrow.css'
import {roundArrow} from 'tippy.js';
import 'tippy.js/dist/svg-arrow.css';

tippy(targets, {
arrow: roundArrow,
})
});
```

Browser:
Expand All @@ -160,7 +160,7 @@ Browser:
<script>
tippy(targets, {
arrow: tippy.roundArrow,
})
});
</script>
```

Expand All @@ -174,9 +174,9 @@ Browser:
Node:

```js
import tippy, { followCursor } from 'tippy.js'
import tippy, {followCursor} from 'tippy.js';

tippy('button', { followCursor: true }, [followCursor])
tippy('button', {followCursor: true}, [followCursor]);
```

Browser:
Expand All @@ -193,9 +193,9 @@ Browser:
Node:

```js
import tippy, { sticky } from 'tippy.js'
import tippy, {sticky} from 'tippy.js';

tippy('button', { sticky: true }, [sticky])
tippy('button', {sticky: true}, [sticky]);
```

Browser:
Expand All @@ -214,9 +214,9 @@ Use `delegate()`.
Node:

```js
import tippy, { delegate } from 'tippy.js'
import tippy, {delegate} from 'tippy.js';

delegate('#parent', { target: 'button' })
delegate('#parent', {target: 'button'});
```

Browser:
Expand All @@ -225,7 +225,7 @@ Browser:
<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
<script>
tippy.delegate('#parent', { target: 'button' })
tippy.delegate('#parent', {target: 'button'});
</script>
```

Expand Down Expand Up @@ -312,9 +312,9 @@ In ESM/CJS contexts, it's no longer attached to `tippy`
Node:

```js
import { hideAll } from 'tippy.js'
import {hideAll} from 'tippy.js';

hideAll()
hideAll();
```

Browser:
Expand All @@ -333,9 +333,9 @@ Use `createSingleton()`.
Node:

```js
import tippy, { createSingleton } from 'tippy.js'
import tippy, {createSingleton} from 'tippy.js';

createSingleton(tippy('button'), { delay: 1000 })
createSingleton(tippy('button'), {delay: 1000});
```

Browser:
Expand All @@ -344,7 +344,7 @@ Browser:
<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
<script>
tippy.createSingleton(tippy('button'), { delay: 1000 })
tippy.createSingleton(tippy('button'), {delay: 1000});
</script>
```

Expand Down
2 changes: 1 addition & 1 deletion build/animations/perspective-extreme.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/perspective-extreme.scss'
import '../../src/scss/animations/perspective-extreme.scss';
2 changes: 1 addition & 1 deletion build/animations/perspective-subtle.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/perspective-subtle.scss'
import '../../src/scss/animations/perspective-subtle.scss';
2 changes: 1 addition & 1 deletion build/animations/perspective.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/perspective.scss'
import '../../src/scss/animations/perspective.scss';
2 changes: 1 addition & 1 deletion build/animations/scale-extreme.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/scale-extreme.scss'
import '../../src/scss/animations/scale-extreme.scss';
2 changes: 1 addition & 1 deletion build/animations/scale-subtle.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/scale-subtle.scss'
import '../../src/scss/animations/scale-subtle.scss';
2 changes: 1 addition & 1 deletion build/animations/scale.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/scale.scss'
import '../../src/scss/animations/scale.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-away-extreme.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-away-extreme.scss'
import '../../src/scss/animations/shift-away-extreme.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-away-subtle.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-away-subtle.scss'
import '../../src/scss/animations/shift-away-subtle.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-away.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-away.scss'
import '../../src/scss/animations/shift-away.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-toward-extreme.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-toward-extreme.scss'
import '../../src/scss/animations/shift-toward-extreme.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-toward-subtle.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-toward-subtle.scss'
import '../../src/scss/animations/shift-toward-subtle.scss';
2 changes: 1 addition & 1 deletion build/animations/shift-toward.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/animations/shift-toward.scss'
import '../../src/scss/animations/shift-toward.scss';
28 changes: 14 additions & 14 deletions build/base-iife.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { hideAll, createTippyWithPlugins } from '../src'
import createSingleton from '../src/addons/createSingleton'
import delegate from '../src/addons/delegate'
import animateFill from '../src/plugins/animateFill'
import followCursor from '../src/plugins/followCursor'
import inlinePositioning from '../src/plugins/inlinePositioning'
import sticky from '../src/plugins/sticky'
import { ROUND_ARROW } from '../src/constants'
import {hideAll, createTippyWithPlugins} from '../src';
import createSingleton from '../src/addons/createSingleton';
import delegate from '../src/addons/delegate';
import animateFill from '../src/plugins/animateFill';
import followCursor from '../src/plugins/followCursor';
import inlinePositioning from '../src/plugins/inlinePositioning';
import sticky from '../src/plugins/sticky';
import {ROUND_ARROW} from '../src/constants';

const extendedTippy = createTippyWithPlugins([
animateFill,
followCursor,
inlinePositioning,
sticky,
])
]);

extendedTippy.createSingleton = createSingleton
extendedTippy.delegate = delegate
extendedTippy.hideAll = hideAll
extendedTippy.roundArrow = ROUND_ARROW
extendedTippy.createSingleton = createSingleton;
extendedTippy.delegate = delegate;
extendedTippy.hideAll = hideAll;
extendedTippy.roundArrow = ROUND_ARROW;

export default extendedTippy
export default extendedTippy;
16 changes: 8 additions & 8 deletions build/base.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export { default, hideAll, createTippyWithPlugins } from '../src'
export { default as createSingleton } from '../src/addons/createSingleton'
export { default as delegate } from '../src/addons/delegate'
export { default as animateFill } from '../src/plugins/animateFill'
export { default as followCursor } from '../src/plugins/followCursor'
export { default as inlinePositioning } from '../src/plugins/inlinePositioning'
export { default as sticky } from '../src/plugins/sticky'
export { ROUND_ARROW as roundArrow } from '../src/constants'
export {default, hideAll, createTippyWithPlugins} from '../src';
export {default as createSingleton} from '../src/addons/createSingleton';
export {default as delegate} from '../src/addons/delegate';
export {default as animateFill} from '../src/plugins/animateFill';
export {default as followCursor} from '../src/plugins/followCursor';
export {default as inlinePositioning} from '../src/plugins/inlinePositioning';
export {default as sticky} from '../src/plugins/sticky';
export {ROUND_ARROW as roundArrow} from '../src/constants';
36 changes: 18 additions & 18 deletions build/bundle-iife.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import css from '../dist/tippy.css'
import { injectCSS } from '../src/css'
import { isBrowser } from '../src/browser'
import { hideAll, createTippyWithPlugins } from '../src'
import createSingleton from '../src/addons/createSingleton'
import delegate from '../src/addons/delegate'
import animateFill from '../src/plugins/animateFill'
import followCursor from '../src/plugins/followCursor'
import inlinePositioning from '../src/plugins/inlinePositioning'
import sticky from '../src/plugins/sticky'
import { ROUND_ARROW } from '../src/constants'
import css from '../dist/tippy.css';
import {injectCSS} from '../src/css';
import {isBrowser} from '../src/browser';
import {hideAll, createTippyWithPlugins} from '../src';
import createSingleton from '../src/addons/createSingleton';
import delegate from '../src/addons/delegate';
import animateFill from '../src/plugins/animateFill';
import followCursor from '../src/plugins/followCursor';
import inlinePositioning from '../src/plugins/inlinePositioning';
import sticky from '../src/plugins/sticky';
import {ROUND_ARROW} from '../src/constants';

if (isBrowser) {
injectCSS(css)
injectCSS(css);
}

const extendedTippy = createTippyWithPlugins([
animateFill,
followCursor,
inlinePositioning,
sticky,
])
]);

extendedTippy.createSingleton = createSingleton
extendedTippy.delegate = delegate
extendedTippy.hideAll = hideAll
extendedTippy.roundArrow = ROUND_ARROW
extendedTippy.createSingleton = createSingleton;
extendedTippy.delegate = delegate;
extendedTippy.hideAll = hideAll;
extendedTippy.roundArrow = ROUND_ARROW;

export default extendedTippy
export default extendedTippy;
12 changes: 6 additions & 6 deletions build/bundle.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import css from '../dist/tippy.css'
import tippy from '../src'
import { injectCSS } from '../src/css'
import { isBrowser } from '../src/browser'
import css from '../dist/tippy.css';
import tippy from '../src';
import {injectCSS} from '../src/css';
import {isBrowser} from '../src/browser';

if (isBrowser) {
injectCSS(css)
injectCSS(css);
}

export default tippy
export default tippy;
2 changes: 1 addition & 1 deletion build/css/backdrop.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/backdrop.scss'
import '../../src/scss/backdrop.scss';
2 changes: 1 addition & 1 deletion build/css/svg-arrow.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/svg-arrow.scss'
import '../../src/scss/svg-arrow.scss';
2 changes: 1 addition & 1 deletion build/css/tippy.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/index.scss'
import '../../src/scss/index.scss';
2 changes: 1 addition & 1 deletion build/themes/light-border.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/themes/light-border.scss'
import '../../src/scss/themes/light-border.scss';
2 changes: 1 addition & 1 deletion build/themes/light.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/themes/light.scss'
import '../../src/scss/themes/light.scss';
2 changes: 1 addition & 1 deletion build/themes/material.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../src/scss/themes/material.scss'
import '../../src/scss/themes/material.scss';
Loading

0 comments on commit 6ab715c

Please sign in to comment.