Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
artmsilva committed Jan 26, 2022
1 parent d84669a commit f2843bf
Show file tree
Hide file tree
Showing 36 changed files with 110,115 additions and 110,134 deletions.
78 changes: 39 additions & 39 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
version: 2
registries:
npm-npmjs:
type: npm-registry
url: https://registry.npmjs.org
token: ${{secrets.NPM_BOT_PERSONAL_TOKEN}}
npm-npmjs:
type: npm-registry
url: https://registry.npmjs.org
token: ${{secrets.NPM_BOT_PERSONAL_TOKEN}}
updates:
# General updates - weekly as needed
- package-ecosystem: "npm"
directory: "/"
registries:
- npm-npmjs
target-branch: "main"
ignore:
- dependency-name: "@washingtonpost*"
versioning-strategy: "auto"
open-pull-requests-limit: 5
schedule:
interval: "weekly"
pull-request-branch-name:
separator: "-"
# Inner sourcing - daily, takes priority, bumps package.json
- package-ecosystem: "npm"
directory: "/"
registries:
- npm-npmjs
# target-branch - leave blank so dependabot recognizes this as a "unique",
# non-duplicate strategy (it should run against the main branch, dev, anyways)
allow:
- dependency-name: "@washingtonpost*"
versioning-strategy: "increase"
open-pull-requests-limit: 10
schedule:
interval: "daily"
time: "08:00"
timezone: "US/Eastern"
pull-request-branch-name:
separator: "-"
reviewers:
- "@WPMedia/core"
labels:
- "dependencies"
# General updates - weekly as needed
- package-ecosystem: "npm"
directory: "/"
registries:
- npm-npmjs
target-branch: "main"
ignore:
- dependency-name: "@washingtonpost*"
versioning-strategy: "auto"
open-pull-requests-limit: 5
schedule:
interval: "weekly"
pull-request-branch-name:
separator: "-"
# Inner sourcing - daily, takes priority, bumps package.json
- package-ecosystem: "npm"
directory: "/"
registries:
- npm-npmjs
# target-branch - leave blank so dependabot recognizes this as a "unique",
# non-duplicate strategy (it should run against the main branch, dev, anyways)
allow:
- dependency-name: "@washingtonpost*"
versioning-strategy: "increase"
open-pull-requests-limit: 10
schedule:
interval: "daily"
time: "08:00"
timezone: "US/Eastern"
pull-request-branch-name:
separator: "-"
reviewers:
- "@WPMedia/core"
labels:
- "dependencies"
72 changes: 36 additions & 36 deletions .github/workflows/chromatic-prod.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: Chromatic Production

on:
push:
branches:
- main
push:
branches:
- main

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: lts/erbium
cache: "npm"
always-auth: true
registry-url: "https://registry.npmjs.org"
- uses: actions/setup-node@v2
with:
node-version: lts/erbium
cache: "npm"
always-auth: true
registry-url: "https://registry.npmjs.org"

- run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
- run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process

- uses: actions/upload-artifact@v2.2.4
with:
name: ui-components
path: |
ui/**/dist
!ui/**/node_modules
- uses: actions/upload-artifact@v2.2.4
with:
name: ui-components
path: |
ui/**/dist
!ui/**/node_modules
- uses: chromaui/action@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitOnceUploaded: true
autoAcceptChanges: true
- uses: chromaui/action@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitOnceUploaded: true
autoAcceptChanges: true
72 changes: 36 additions & 36 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: Validate

on:
pull_request:
paths:
- "ui/**/*"
- "package.json"
pull_request:
paths:
- "ui/**/*"
- "package.json"

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: lts/erbium
cache: "npm"
always-auth: true
registry-url: "https://registry.npmjs.org"
- uses: actions/setup-node@v2
with:
node-version: lts/erbium
cache: "npm"
always-auth: true
registry-url: "https://registry.npmjs.org"

- run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
- run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process

- uses: actions/upload-artifact@v2.2.4
with:
name: ui-components
path: |
ui/**/dist
!ui/**/node_modules
- uses: actions/upload-artifact@v2.2.4
with:
name: ui-components
path: |
ui/**/dist
!ui/**/node_modules
- uses: chromaui/action@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitOnceUploaded: true
- uses: chromaui/action@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
PARCEL_WORKER_BACKEND: process
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitOnceUploaded: true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ npm i @washingtonpost/wpds-ui-kit

## Websites

- the ssr-testing/kitchen sink is on vercel
- storybook will be on chromatic
- the ssr-testing/kitchen sink is on vercel
- storybook will be on chromatic

## [Contributing](docs/CONTRIBUTING.md)

## Naming packages, components, utilities

- `@washingtonpost/wpds-${thing}`
- `@washingtonpost/wpds-${thing}`
17 changes: 7 additions & 10 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"plugins": [
"@parcel/babel-plugin-transform-runtime",
["@babel/plugin-transform-typescript", { "isTSX": true }],
[
"@babel/plugin-proposal-private-property-in-object",
{ "loose": true }
],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
]
"plugins": [
"@parcel/babel-plugin-transform-runtime",
["@babel/plugin-transform-typescript", { "isTSX": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
]
}
8 changes: 4 additions & 4 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"scope-enum": [1, "always", ["dependencies", "build", "release"]],
},
extends: ["@commitlint/config-conventional"],
rules: {
"scope-enum": [1, "always", ["dependencies", "build", "release"]],
},
};
18 changes: 9 additions & 9 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ We use Playwright for Interaction/Integration ( and Server Side Render) Testing.

Good resources on testing:

- https://kentcdodds.com/blog/testing-implementation-details
- https://kentcdodds.com/blog/making-your-ui-tests-resilient-to-change
- https://kentcdodds.com/blog/testing-implementation-details
- https://kentcdodds.com/blog/making-your-ui-tests-resilient-to-change

Avoid writing "render" or "display" unit or playwright tests. Leverage our "Tests" stories in Storybook for this. Those UI tests will be tested in Chromatic.

Expand All @@ -30,10 +30,10 @@ npm run new-component

These are our core tenets for component design. We use these to guide our component development. We also use these to guide our component design decisions.

- Our components should do one thing really well! This is why we call them atoms.
- They should refrain from using external dependencies (Cookies, Window Objects, Business Logic, etc).
- They should be controlled by their API or left uncontrolled.
- If a component has multiple DOM nodes such as an Accordion's trigger and it's display, it should be split into multiple components. Such as AccordionTrigger and AccordionDisplay and use a provider component to manage the state across the two (AccordionRoot).
- We should avoid using any DOM APIs that are not supported by evergreen browsers.
- We should should allow modification of styles via the `css` prop using our tokens (component (locally scoped and global) and theme).
- We should use our theme tokens to style our components.
- Our components should do one thing really well! This is why we call them atoms.
- They should refrain from using external dependencies (Cookies, Window Objects, Business Logic, etc).
- They should be controlled by their API or left uncontrolled.
- If a component has multiple DOM nodes such as an Accordion's trigger and it's display, it should be split into multiple components. Such as AccordionTrigger and AccordionDisplay and use a provider component to manage the state across the two (AccordionRoot).
- We should avoid using any DOM APIs that are not supported by evergreen browsers.
- We should should allow modification of styles via the `css` prop using our tokens (component (locally scoped and global) and theme).
- We should use our theme tokens to style our components.
44 changes: 19 additions & 25 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
{
"packages": [
"./ui/*",
"./ssr-testing"
],
"useWorkspaces": true,
"npmClient": "npm",
"command": {
"version": {
"exact": true,
"conventionalCommits": true,
"message": "chore(release): publish"
},
"publish": {
"conventionalCommits": true,
"message": "chore(release): publish",
"npmClient": "npm",
"ignoreChanges": [
"**/stories/**",
"**/tests/**"
],
"registry": "https://registry.npmjs.org/",
"allowBranch": "main"
}
},
"version": "0.1.0"
"packages": ["./ui/*", "./ssr-testing"],
"useWorkspaces": true,
"npmClient": "npm",
"command": {
"version": {
"exact": true,
"conventionalCommits": true,
"message": "chore(release): publish"
},
"publish": {
"conventionalCommits": true,
"message": "chore(release): publish",
"npmClient": "npm",
"ignoreChanges": ["**/stories/**", "**/tests/**"],
"registry": "https://registry.npmjs.org/",
"allowBranch": "main"
}
},
"version": "0.1.0"
}
Loading

0 comments on commit f2843bf

Please sign in to comment.