Chore/enhance prettier config (#3022)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* chore: enhance prettier config * chore: fix prettier issues * Update package.json ---------
authored by Marcin Kulpa · committed by GitHub · parent 6a6ef4c · Browse files · 12 files·+161 added−134 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Diff stats
12 files+161 added−134 removed
- other:+161 added−134 removed
Provenance
- Commit
90f45eb- Tree
12eba84- Author
Marcin Kulpa <marcin.kulpa@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
6a6ef4c
12 files changed+161 added−134 removed
modified:.github/DISCUSSION_TEMPLATE/bug-report.yml+1 added-1 removed
11234512 unmodified lineslabels: ["bug"]labels: ['bug']body: - type: markdown attributes: value: If you don't have a reproduction link, please choose a different category.12 unmodified linesmodified:.github/ISSUE_TEMPLATE/bug_report.md-2 removed
2 unmodified lines34567792 unmodified linesabout: This is to create a new issue that already has an assignee. Please open a new discussion otherwise.title: ''labels: ''assignees: ''
---
modified:.github/FUNDING.yml+4 added-1 removed
8 unmodified lines910111213131415168 unmodified linesliberapay: # Replace with a single Liberapay usernameissuehunt: # Replace with a single IssueHunt usernameotechie: # Replace with a single Otechie usernamelfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundrycustom: ['https://daishi.gumroad.com/l/uaxms', 'https://daishi.gumroad.com/l/learn-zustand-v4'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']custom: [ 'https://daishi.gumroad.com/l/uaxms', 'https://daishi.gumroad.com/l/learn-zustand-v4', ] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']modified:.github/pull_request_template.md-2 removed
2 unmodified lines3456787892 unmodified linesFixes #
## Summary
## Check List
- [ ] `pnpm run fix` for formatting and linting code and docsmodified:examples/demo/src/pmndrs.css+117 added-117 removed
2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221237891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221232 unmodified lines * Loosely based on https://marketplace.visualstudio.com/items?itemName=pmndrs.pmndrs * @author Paul Henschel */
code[class*='language-'], pre[class*='language-'] { color: #e4f0fb!important; background: none!important; text-shadow: 0 1px rgba(0, 0, 0, 0.3)!important; font-family: Menlo, Monaco, 'Courier New', monospace!important; font-size: 0.95em!important; text-align: left!important; white-space: pre!important; word-spacing: normal!important; word-break: normal!important; word-wrap: normal!important; line-height: 1.5!important; -moz-tab-size: 4!important; -o-tab-size: 4!important; tab-size: 4!important; -webkit-hyphens: none!important; -moz-hyphens: none!important; -ms-hyphens: none!important; hyphens: none!important; } /* Code blocks */ pre[class*='language-'] { padding: 3.75em!important; margin: -2.5em 0!important; overflow: auto!important; border-radius: 0.75em!important; } :not(pre) > code[class*='language-'], pre[class*='language-'] { background: #252b37!important; } /* Inline code */ :not(pre) > code[class*='language-'] { padding: 0.1em!important; border-radius: 0.3em!important; white-space: normal!important; } .token.comment, .token.prolog, .token.doctype, .token.cdata { color: #a6accd!important; } .token.punctuation { color: #e4f0fb!important; } .token.namespace { opacity: 0.7!important; } .token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #e4f0fb!important; } .token.boolean, .token.number { color: #5de4c7!important; } .token.selector, .token.attr-value, .token.string, .token.char, .token.builtin, .token.inserted { color: #5de4c7!important; } .token.attr-name, .token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string, .token.variable { color: #add7ff!important; } .token.atrule, .token.function, .token.class-name { color: #5de4c7!important; } .token.keyword { color: #add7ff!important; } .token.regex, .token.important { color: #fffac2!important; } .token.important, .token.bold { font-weight: bold!important; } .token.italic { font-style: italic!important; } .token.entity { cursor: help!important; }No newline at end of filecode[class*='language-'],pre[class*='language-'] { color: #e4f0fb !important; background: none !important; text-shadow: 0 1px rgba(0, 0, 0, 0.3) !important; font-family: Menlo, Monaco, 'Courier New', monospace !important; font-size: 0.95em !important; text-align: left !important; white-space: pre !important; word-spacing: normal !important; word-break: normal !important; word-wrap: normal !important; line-height: 1.5 !important;
-moz-tab-size: 4 !important; -o-tab-size: 4 !important; tab-size: 4 !important;
-webkit-hyphens: none !important; -moz-hyphens: none !important; -ms-hyphens: none !important; hyphens: none !important;}
/* Code blocks */pre[class*='language-'] { padding: 3.75em !important; margin: -2.5em 0 !important; overflow: auto !important; border-radius: 0.75em !important;}
:not(pre) > code[class*='language-'],pre[class*='language-'] { background: #252b37 !important;}
/* Inline code */:not(pre) > code[class*='language-'] { padding: 0.1em !important; border-radius: 0.3em !important; white-space: normal !important;}
.token.comment,.token.prolog,.token.doctype,.token.cdata { color: #a6accd !important;}
.token.punctuation { color: #e4f0fb !important;}
.token.namespace { opacity: 0.7 !important;}
.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted { color: #e4f0fb !important;}
.token.boolean,.token.number { color: #5de4c7 !important;}
.token.selector,.token.attr-value,.token.string,.token.char,.token.builtin,.token.inserted { color: #5de4c7 !important;}
.token.attr-name,.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable { color: #add7ff !important;}
.token.atrule,.token.function,.token.class-name { color: #5de4c7 !important;}
.token.keyword { color: #add7ff !important;}
.token.regex,.token.important { color: #fffac2 !important;}
.token.important,.token.bold { font-weight: bold !important;}.token.italic { font-style: italic !important;}
.token.entity { cursor: help !important;}modified:examples/demo/src/styles.css+26 added-4 removed
17 unmodified lines18 overflow: hidden;19 }20 21 body {22- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial,22+ font-family:23+ -apple-system,24+ BlinkMacSystemFont,25+ avenir next,26+ avenir,27+ helvetica neue,28+ helvetica,29+ ubuntu,30+ roboto,31+ noto,32+ segoe ui,33+ arial,34 sans-serif;35 }36 37 .main {82 unmodified lines120 line-height: 1em;121 }122 123 a {113- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial,124+ font-family:125+ -apple-system,126+ BlinkMacSystemFont,127+ avenir next,128+ avenir,129+ helvetica neue,130+ helvetica,131+ ubuntu,132+ roboto,133+ noto,134+ segoe ui,135+ arial,136 sans-serif;137 font-weight: 400;138 font-size: 16px;139 color: inherit;72 unmodified lines212 .main > .code {213 margin-right: -0px;214 }215 .code-container > pre[class*='language-'] {194- font-size: 0.6rem!important; 216+ font-size: 0.6rem !important;217 border-radius: 10px 10px 0 0 !important;218 }219 .counter {220 position: absolute;221 top: -120px;222 }201-}223+}modified:examples/demo/index.html+5 added-2 removed
112345678891011121314157 unmodified lines<!DOCTYPE html><!doctype html><html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="🐻 Bear necessities for state management in React" /> <meta name="description" content="🐻 Bear necessities for state management in React" /> <link rel="apple-touch-icon" href="/logo192.png" /> <meta name="og:image" content="/ogimage.jpg" /> <link rel="manifest" href="/manifest.json" /> <title>Zustand</title>7 unmodified linesmodified:examples/starter/index.html+1 added-1 removed
1-<!DOCTYPE html>1+<!doctype html>2 <html lang="en">3 <head>4 <meta charset="UTF-8" />5 <link rel="icon" href="/favicon.ico" />10 unmodified linesmodified:examples/starter/tsconfig.json-1 removed
17 unmodified lines18 },19 "include": ["vite.config.ts", "./src/**/*"],20 "exclude": ["node_modules"]21 }22-added:.prettierignore+2 added
1+dist2+pnpm-lock.yamlmodified:package.json+2 added-2 removed
63 unmodified lines64 "build:react:shallow": "rollup -c --config-react_shallow",65 "build:traditional": "rollup -c --config-traditional",66 "postbuild": "pnpm run patch-d-ts && pnpm run copy && pnpm run patch-old-ts && pnpm run patch-esm-ts",67 "fix": "pnpm run fix:lint && pnpm run fix:format",68- "fix:format": "prettier \"*.{js,json,md}\" \"{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}\" --write",68+ "fix:format": "prettier . --write",69 "fix:lint": "eslint . --fix",70 "test": "pnpm run \"/^test:.*/\"",71- "test:format": "prettier \"*.{js,json,md}\" \"{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}\" --list-different",71+ "test:format": "prettier . --list-different",72 "test:types": "tsc --noEmit",73 "test:lint": "eslint .",74 "test:spec": "vitest run",75 "patch-d-ts": "node --input-type=module -e \"import { entries } from './rollup.config.mjs'; import shelljs from 'shelljs'; const { find, sed } = shelljs; find('dist/**/*.d.ts').forEach(f => { entries.forEach(({ find, replacement }) => { sed('-i', new RegExp(' from \\'' + find.source.slice(0, -1) + '\\';$'), ' from \\'' + replacement + '\\';', f); }); sed('-i', / from '(\\.[^']+)\\.ts';$/, ' from \\'\\$1\\';', f); });\"",97 unmodified linesmodified:vitest.config.mts+3 added-1 removed
14 unmodified lines15 // https://vitest.dev/guide/migration.html16 globals: true,17 environment: 'jsdom',18 dir: 'tests',19- reporters: process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : ['default'],19+ reporters: process.env.GITHUB_ACTIONS20+ ? ['default', 'github-actions']21+ : ['default'],22 setupFiles: ['tests/setup.ts'],23 coverage: {24 include: ['src/**/'],25 reporter: ['text', 'json', 'html', 'text-summary'],5 unmodified lines