chore: improve lint, release workflows (#1627)

* Add standard-version to automate releases

* Remove husky

* Add lint script; run lint in GitHub Actions

* Run lint script

* Add Enrico to contributors
This commit is contained in:
Enrico Sacchetti 2023-01-15 18:34:09 -05:00 committed by GitHub
commit 6d2e21f027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1164 additions and 460 deletions

View file

@ -1,28 +1,28 @@
import type { Readable, Subscriber, Unsubscriber } from "svelte/store";
import type { BreakpointSize, BreakpointValue } from "./breakpoints";
/**
* Creates a readable store that returns the current breakpoint size.
* It also provides functions for creating derived stores used to do comparisons.
*/
export function breakpointObserver(): {
subscribe: (
this: void,
run: Subscriber<any>,
invalidate?: (value?: any) => void
) => Unsubscriber;
/**
* Returns a store readable store that returns whether the current
* breakpoint is smaller than {@link size}.
* @param {BreakpointSize} size Size to compare against.
*/
smallerThan: (size: BreakpointSize) => Readable<boolean>;
/**
* Returns a store readable store that returns whether the current
* breakpoint is larger than {@link size}.
* @param {BreakpointSize} size Size to compare against.
*/
largerThan: (size: BreakpointSize) => Readable<boolean>;
};
export default breakpointObserver;
import type { Readable, Subscriber, Unsubscriber } from "svelte/store";
import type { BreakpointSize, BreakpointValue } from "./breakpoints";
/**
* Creates a readable store that returns the current breakpoint size.
* It also provides functions for creating derived stores used to do comparisons.
*/
export function breakpointObserver(): {
subscribe: (
this: void,
run: Subscriber<any>,
invalidate?: (value?: any) => void
) => Unsubscriber;
/**
* Returns a store readable store that returns whether the current
* breakpoint is smaller than {@link size}.
* @param {BreakpointSize} size Size to compare against.
*/
smallerThan: (size: BreakpointSize) => Readable<boolean>;
/**
* Returns a store readable store that returns whether the current
* breakpoint is larger than {@link size}.
* @param {BreakpointSize} size Size to compare against.
*/
largerThan: (size: BreakpointSize) => Readable<boolean>;
};
export default breakpointObserver;

View file

@ -1,11 +1,11 @@
/**
* Pixel sizes of Carbon grid breakpoints.
* @type {Record<BreakpointSize, BreakpointValue>}
*/
export const breakpoints: Record<BreakpointSize, BreakpointValue>;
export type BreakpointSize = "sm" | "md" | "lg" | "xlg" | "max";
export type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584;
export default breakpoints;
/**
* Pixel sizes of Carbon grid breakpoints.
* @type {Record<BreakpointSize, BreakpointValue>}
*/
export const breakpoints: Record<BreakpointSize, BreakpointValue>;
export type BreakpointSize = "sm" | "md" | "lg" | "xlg" | "max";
export type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584;
export default breakpoints;

View file

@ -1,3 +1,3 @@
export { default as Breakpoint } from "./Breakpoint.svelte";
export { breakpointObserver } from "./breakpointObserver";
export { breakpoints } from "./breakpoints";
export { default as Breakpoint } from "./Breakpoint.svelte";
export { breakpointObserver } from "./breakpointObserver";
export { breakpoints } from "./breakpoints";