Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add prettier #93 #128

Merged
merged 3 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "ebay",
"extends": ["ebay", "prettier"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,28 @@ name: Test Coveralls

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v1

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: npm install, npm run test
run: |
npm install
npm run test
- name: npm install, npm run test
run: |
npm install
npm run test

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{css,html,js,json,md,yml}": ["prettier --write '!package.json'"]
}
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
coverage
dist*
index.compiled.js
index.min.js
package-lock.json
package.json
packages/*/dist
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Every class will have a `defaultOptions` object.

```js
const defaultOptions = {
bem: {
control: 'switch__control'
},
customElementMode: false
bem: {
control: "switch__control",
},
customElementMode: false,
};
```

* `bem`: If using different class names than [Skin](https://github.com/eBay/skin), you can specify the main hooks here.
* `customElementMode`: Set this to `true` if using this as the model for the [makeup-web-component](https://github.com/makeup/makeup-web-components).
- `bem`: If using different class names than [Skin](https://github.com/eBay/skin), you can specify the main hooks here.
- `customElementMode`: Set this to `true` if using this as the model for the [makeup-web-component](https://github.com/makeup/makeup-web-components).

Plus whatever options are relevant to that user interface module.

Expand Down
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,41 @@ All modules support import (i.e. ES Modules) and require (i.e. CommonJS) syntax.

The following modules assist with common accessibility logic (e.g. maintaining a roving tabindex).

* [makeup-active-descendant](packages/makeup-active-descendant)
* [makeup-exit-emitter](packages/makeup-exit-emitter)
* [makeup-expander](packages/makeup-expander)
* [makeup-floating-label](packages/makeup-floating-label)
* [makeup-focusables](packages/makeup-focusables)
* [makeup-key-emitter](packages/makeup-key-emitter)
* [makeup-keyboard-trap](packages/makeup-keyboard-trap)
* [makeup-modal](packages/makeup-modal)
* [makeup-navigation-emitter](packages/makeup-navigation-emitter)
* [makeup-next-id](packages/makeup-next-id)
* [makeup-prevent-scroll-keys](packages/makeup-prevent-scroll-keys)
* [makeup-roving-tabindex](packages/makeup-roving-tabindex)
* [makeup-screenreader-trap](packages/makeup-screenreader-trap)
* [makeup-typeahead](packages/makeup-typeahead)
- [makeup-active-descendant](packages/makeup-active-descendant)
- [makeup-exit-emitter](packages/makeup-exit-emitter)
- [makeup-expander](packages/makeup-expander)
- [makeup-floating-label](packages/makeup-floating-label)
- [makeup-focusables](packages/makeup-focusables)
- [makeup-key-emitter](packages/makeup-key-emitter)
- [makeup-keyboard-trap](packages/makeup-keyboard-trap)
- [makeup-modal](packages/makeup-modal)
- [makeup-navigation-emitter](packages/makeup-navigation-emitter)
- [makeup-next-id](packages/makeup-next-id)
- [makeup-prevent-scroll-keys](packages/makeup-prevent-scroll-keys)
- [makeup-roving-tabindex](packages/makeup-roving-tabindex)
- [makeup-screenreader-trap](packages/makeup-screenreader-trap)
- [makeup-typeahead](packages/makeup-typeahead)

## UI Modules

The following modules create the model and behaviour for "headless" user interface components (i.e. they come with no styles or branding out of the box). They are fully compatible with [Skin CSS](https://github.com/eBay/skin).

We are currently in the process of converting all [eBay MIND Patterns](https://ebay.github.io/mindpatterns/index.html) "example quality" code to "reference level" vanilla JavaScript.

* [makeup-alert-dialog](packages/makeup-alert-dialog)
* [makeup-combobox](packages/makeup-combobox)
* [makeup-confirm-dialog](packages/makeup-confirm-dialog)
* [makeup-dialog](packages/makeup-dialog) (abstract class)
* [makeup-dialog-button](packages/makeup-dialog-button)
* [makeup-fullscreen-dialog](packages/makeup-fullscreen-dialog)
* [makeup-input-dialog](packages/makeup-input-dialog)
* [makeup-lightbox-dialog](packages/makeup-lightbox-dialog)
* [makeup-listbox](packages/makeup-listbox)
* [makeup-listbox-button](packages/makeup-listbox-button)
* [makeup-menu](packages/makeup-menu)
* [makeup-menu-button](packages/makeup-menu-button)
* [makeup-panel-dialog](packages/makeup-panel-dialog)
* [makeup-snackbar-dialog](packages/makeup-snackbar-dialog)
* [makeup-switch](packages/makeup-switch)
* [makeup-toast-dialog](packages/makeup-toast-dialog)
* More to come...
- [makeup-alert-dialog](packages/makeup-alert-dialog)
- [makeup-combobox](packages/makeup-combobox)
- [makeup-confirm-dialog](packages/makeup-confirm-dialog)
- [makeup-dialog](packages/makeup-dialog) (abstract class)
- [makeup-dialog-button](packages/makeup-dialog-button)
- [makeup-fullscreen-dialog](packages/makeup-fullscreen-dialog)
- [makeup-input-dialog](packages/makeup-input-dialog)
- [makeup-lightbox-dialog](packages/makeup-lightbox-dialog)
- [makeup-listbox](packages/makeup-listbox)
- [makeup-listbox-button](packages/makeup-listbox-button)
- [makeup-menu](packages/makeup-menu)
- [makeup-menu-button](packages/makeup-menu-button)
- [makeup-panel-dialog](packages/makeup-panel-dialog)
- [makeup-snackbar-dialog](packages/makeup-snackbar-dialog)
- [makeup-switch](packages/makeup-switch)
- [makeup-toast-dialog](packages/makeup-toast-dialog)
- More to come...
6 changes: 1 addition & 5 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"presets": [
[
"@babel/preset-env"
]
],
"presets": [["@babel/preset-env"]]
}
6 changes: 3 additions & 3 deletions docs/docs.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#page {
margin: 0 auto;
max-width: 960px;
width: 100%;
margin: 0 auto;
max-width: 960px;
width: 100%;
}
123 changes: 65 additions & 58 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,64 +1,71 @@
<!doctype html>
<html lang="en">
<head>
<title>makeup-js</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
main {
margin: 0 auto;
max-width: 960px;
width: 100%;
}
</style>
</head>
<body>
<main role="main">
<h1>makeup-js</h1>
<p>A suite of vanilla <a href="https://github.com/makeup/makeup-js">JavaScript modules</a> for building accessible user interfaces.</p>
<head>
<title>makeup-js</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
main {
margin: 0 auto;
max-width: 960px;
width: 100%;
}
</style>
</head>
<body>
<main role="main">
<h1>makeup-js</h1>
<p>
A suite of vanilla <a href="https://github.com/makeup/makeup-js">JavaScript modules</a> for building accessible
user interfaces.
</p>

<hr/>
<hr />

<h2>Core Modules</h2>
<p>The following modules assist with common accessibility logic (e.g. maintaining a roving tabindex).</p>
<ul>
<li><a href="makeup-active-descendant/index.html">makeup-active-descendant</a></li>
<li><a href="makeup-exit-emitter/index.html">makeup-exit-emitter</a></li>
<li><a href="makeup-expander/index.html">makeup-expander</a></li>
<li><a href="makeup-floating-label/index.html">makeup-floating-label</a></li>
<li><a href="makeup-focusables/index.html">makeup-focusables</a></li>
<li><a href="makeup-key-emitter/index.html">makeup-key-emitter</a></li>
<li><a href="makeup-keyboard-trap/index.html">makeup-keyboard-trap</a></li>
<li><a href="makeup-modal/index.html">makeup-modal</a></li>
<li><a href="makeup-navigation-emitter/index.html">makeup-navigation-emitter</a></li>
<li><a href="makeup-next-id/index.html">makeup-next-id</a></li>
<li><a href="makeup-prevent-scroll-keys/index.html">makeup-prevent-scroll-keys</a></li>
<li><a href="makeup-roving-tabindex/index.html">makeup-roving-tabindex</a></li>
<li><a href="makeup-screenreader-trap/index.html">makeup-screenreader-trap</a></li>
<li><a href="makeup-typeahead/index.html">makeup-typeahead</a></li>
</ul>

<hr/>
<h2>Core Modules</h2>
<p>The following modules assist with common accessibility logic (e.g. maintaining a roving tabindex).</p>
<ul>
<li><a href="makeup-active-descendant/index.html">makeup-active-descendant</a></li>
<li><a href="makeup-exit-emitter/index.html">makeup-exit-emitter</a></li>
<li><a href="makeup-expander/index.html">makeup-expander</a></li>
<li><a href="makeup-floating-label/index.html">makeup-floating-label</a></li>
<li><a href="makeup-focusables/index.html">makeup-focusables</a></li>
<li><a href="makeup-key-emitter/index.html">makeup-key-emitter</a></li>
<li><a href="makeup-keyboard-trap/index.html">makeup-keyboard-trap</a></li>
<li><a href="makeup-modal/index.html">makeup-modal</a></li>
<li><a href="makeup-navigation-emitter/index.html">makeup-navigation-emitter</a></li>
<li><a href="makeup-next-id/index.html">makeup-next-id</a></li>
<li><a href="makeup-prevent-scroll-keys/index.html">makeup-prevent-scroll-keys</a></li>
<li><a href="makeup-roving-tabindex/index.html">makeup-roving-tabindex</a></li>
<li><a href="makeup-screenreader-trap/index.html">makeup-screenreader-trap</a></li>
<li><a href="makeup-typeahead/index.html">makeup-typeahead</a></li>
</ul>

<h2>UI Modules</h2>
<p>The following modules create the model and behaviour for "headless" user interface components (i.e. they come with no styles or branding out of the box). They are fully compatible with <a href="https://github.com/eBay/skin">Skin CSS</a>.</p>
<ul>
<li><a href="makeup-alert-dialog/index.html">makeup-alert-dialog</a></li>
<li><a href="makeup-combobox/index.html">makeup-combobox</a></li>
<li><a href="makeup-confirm-dialog/index.html">makeup-confirm-dialog</a></li>
<li><a href="makeup-dialog-button/index.html">makeup-dialog-button</a></li>
<li><a href="makeup-drawer-dialog/index.html">makeup-drawer-dialog</a></li>
<li><a href="makeup-fullscreen-dialog/index.html">makeup-fullscreen-dialog</a></li>
<li><a href="makeup-lightbox-dialog/index.html">makeup-lightbox-dialog</a></li>
<li><a href="makeup-listbox/index.html">makeup-listbox</a></li>
<li><a href="makeup-listbox-button/index.html">makeup-listbox-button</a></li>
<li><a href="makeup-menu/index.html">makeup-menu</a></li>
<li><a href="makeup-menu-button/index.html">makeup-menu-button</a></li>
<li><a href="makeup-panel-dialog/index.html">makeup-panel-dialog</a></li>
<li><a href="makeup-snackbar-dialog/index.html">makeup-snackbar-dialog</a></li>
<li><a href="makeup-switch/index.html">makeup-switch</a></li>
<li><a href="makeup-toast-dialog/index.html">makeup-toast-dialog</a></li>
<li>More to come...</li>
</ul>
</main>
</body>
<hr />

<h2>UI Modules</h2>
<p>
The following modules create the model and behaviour for "headless" user interface components (i.e. they come
with no styles or branding out of the box). They are fully compatible with
<a href="https://github.com/eBay/skin">Skin CSS</a>.
</p>
<ul>
<li><a href="makeup-alert-dialog/index.html">makeup-alert-dialog</a></li>
<li><a href="makeup-combobox/index.html">makeup-combobox</a></li>
<li><a href="makeup-confirm-dialog/index.html">makeup-confirm-dialog</a></li>
<li><a href="makeup-dialog-button/index.html">makeup-dialog-button</a></li>
<li><a href="makeup-drawer-dialog/index.html">makeup-drawer-dialog</a></li>
<li><a href="makeup-fullscreen-dialog/index.html">makeup-fullscreen-dialog</a></li>
<li><a href="makeup-lightbox-dialog/index.html">makeup-lightbox-dialog</a></li>
<li><a href="makeup-listbox/index.html">makeup-listbox</a></li>
<li><a href="makeup-listbox-button/index.html">makeup-listbox-button</a></li>
<li><a href="makeup-menu/index.html">makeup-menu</a></li>
<li><a href="makeup-menu-button/index.html">makeup-menu-button</a></li>
<li><a href="makeup-panel-dialog/index.html">makeup-panel-dialog</a></li>
<li><a href="makeup-snackbar-dialog/index.html">makeup-snackbar-dialog</a></li>
<li><a href="makeup-switch/index.html">makeup-switch</a></li>
<li><a href="makeup-toast-dialog/index.html">makeup-toast-dialog</a></li>
<li>More to come...</li>
</ul>
</main>
</body>
</html>
Loading
Loading