Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
# Conflicts:
#	doczrc.js
#	package-lock.json
#	src/components/Button/BaseButton.tsx
  • Loading branch information
snapsnapturtle committed Oct 14, 2021
2 parents 6543be0 + 2775dba commit 07dced6
Show file tree
Hide file tree
Showing 172 changed files with 4,857 additions and 3,344 deletions.
15 changes: 15 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# libraries
node_modules/

# generated files
.docz/
lib/

# other
assets/

# currently excluded
fixtures/

src/icons/
src/gatsby-theme-docz
68 changes: 68 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
module.exports = {
plugins: ['@typescript-eslint', 'eslint-comments', 'jest', 'promise', 'unicorn'],
extends: [
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:eslint-comments/recommended',
'plugin:jest/recommended',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'prettier'
],
env: {
node: true,
browser: true,
jest: true
},
parserOptions: {
project: './tsconfig.eslint.json'
},
rules: {
// conflicts with stylelint rule
'unicorn/numeric-separators-style': 'off',

'unicorn/no-useless-undefined': 'off',

'@typescript-eslint/no-unsafe-return': 'off',

'@typescript-eslint/no-unsafe-assignment': 'off',
'react/require-default-props': 'off',
// Often used for this library
'react/jsx-props-no-spreading': 'off',
'unicorn/filename-case': 'off',
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins
'no-prototype-builtins': 'off',
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
// Too restrictive: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
'react/destructuring-assignment': 'off',
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904
'react/jsx-filename-extension': 'off',
// Use function hoisting to improve code readability
'no-use-before-define': 'off',
// Allow most functions to rely on type inference. If the function is exported, then `@typescript-eslint/explicit-module-boundary-types` will ensure
// it's typed.
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, classes: true, variables: true, typedefs: true }
],
// Common abbreviations are known and readable
'unicorn/prevent-abbreviations': 'off',
// Airbnb prefers forEach
'unicorn/no-array-for-each': 'off',
// It's not accurate in the monorepo style
'import/no-extraneous-dependencies': 'off'
},
overrides: [
{
files: ['*.js'],
rules: {
// Allow `require()`
'@typescript-eslint/no-var-requires': 'off'
}
}
]
};
11 changes: 9 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,30 @@ merge of your pull request!
-->

**What:**

<!-- Declarative and short sentence of what this PR accomplishes. If the PR contains visual changes, please add the design-review label to the PR -->

**Why:**

<!-- A brief explanation over why this need arise alonside a sentence with keyword to close related issue "Closes #N" or "relates #X, relates #Y" -->

**How:**

<!-- Often a list of things to describe the process to accomplish this PR -->

**Media:**

<!-- _Optionally, but highly recommended_ Depending on the impact of the change or the complexity of the contribution, choose between and image to showcase the visual changes or a Loom video describing the work you have made. -->

**Checklist:**

<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Release notes added" -->

- [ ] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

<!-- feel free to add additional comments -->
24 changes: 12 additions & 12 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

merge-main:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Merge main -> next
uses: devmasx/merge-branch@v1.3.1
with:
type: now
target_branch: next
github_token: ${{ github.token }}
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Merge main -> next
uses: devmasx/merge-branch@v1.3.1
with:
type: now
target_branch: next
github_token: ${{ github.token }}
7 changes: 7 additions & 0 deletions docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ cardHeadline: Changelog
cardSubHeadline: Keep up to date with the latest releases of @freenow/wave
---

## [1.15.0](https://github.com/freenowtech/wave/compare/v1.14.0...v1.15.0) (2021-10-07)


### Features

* replace tslint with eslint ([#163](https://github.com/freenowtech/wave/issues/163)) ([38c6da6](https://github.com/freenowtech/wave/commit/38c6da61581db49d7a44a3c3c29e44a6e0b21cd4))

## [1.14.0](https://github.com/freenowtech/wave/compare/v1.13.3...v1.14.0) (2021-09-13)


Expand Down
8 changes: 7 additions & 1 deletion docs/components/ImageModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { FC } from 'react';
import * as React from 'react';
import styled from 'styled-components';
import { Modal } from '../../src/components';

interface ImageModalProps {
src: string;
alt: string;
}

const ClickableImage = styled.img`
cursor: pointer;
transition: transform 100ms;
Expand All @@ -11,7 +17,7 @@ const ClickableImage = styled.img`
}
`;

export const ImageModal = ({ src, alt }) => {
export const ImageModal: FC<ImageModalProps> = ({ src, alt }: ImageModalProps) => {
const [open, setOpen] = React.useState(false);

return (
Expand Down
22 changes: 22 additions & 0 deletions docs/versioning-policy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Versioning Policy
route: /versioning-policy
cardHeadline: Versioning Policy
cardSubHeadline: Predictable and consistent versions for Wave
---

## Semantic Versioning

Our goal is to release update to this library without breaking anyone's projects. Therefore, we are using [SemVer](https://semver.org)
which has the following release types.

- **Major** versions contain breaking changes and may also contain sweeping visual changes, like changing colors (usually includes a codemods).
- **Minor** versions include new components or functionality and properties for existing components.
- **Patch** versions provide internal fixes, documentation changes or package upgrades (anything that does not affect the consumers of this library).


### Deprecations

When deciding on the deprecation of a feature or component in the next major version, we add a warning indicating
the feature is scheduled for deprecation or removal. This is sent to the console in development builds and excluded in
production builds.
2 changes: 1 addition & 1 deletion doczrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
title: `Wave`,
menu: ['Get Started', 'Accessibility', 'Browser support', 'Contributing', 'Migrating', 'Essentials', 'Components', 'Changelog'],
menu: ['Get Started', 'Accessibility', 'Browser support', 'Contributing', 'Migrating', 'Essentials', 'Components', 'Changelog', 'Versioning Policy'],
ignore: ['CONTRIBUTING.md', 'README.md', 'SECURITY.md', 'MAINTAINERS.md', 'fixtures/**/*.md', '.idea/**/*'],
propsParser: false,
typescript: true,
Expand Down
6 changes: 0 additions & 6 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ module.exports = {
plugins: [
{
resolve: `gatsby-plugin-styled-components`
},
{
resolve: `gatsby-plugin-favicon`,
options: {
logo: './src/gatsby-theme-docz/favicon.png'
}
}
]
};
Loading

0 comments on commit 07dced6

Please sign in to comment.