Skip to content

Commit 2b922ef

Browse files
⚽️ chore: update prettier configuration and apply formatting (#12650)
Co-authored-by: Beier (Bill) <[email protected]>
1 parent 094f4f8 commit 2b922ef

File tree

6 files changed

+43
-24
lines changed

6 files changed

+43
-24
lines changed

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1+
# Exclude paths
12
/reports
3+
dist
4+
pnpm-lock.yaml
5+
# Exclude README related files and trigger files
6+
README.md
7+
README.*
8+
*.README.*
9+
.github/workflows/README.yml
10+
scripts/README/**
11+
docs/Helpers.yaml
12+
docs/Sponsors.yaml
13+
docs/Template.md

CODE_OF_CONDUCT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

eslint.config.mjs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ import tseslint from 'typescript-eslint';
44
import reactPlugin from 'eslint-plugin-react';
55
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
66
import pluginCypress from 'eslint-plugin-cypress/flat';
7-
import reactHookPlugin from "eslint-plugin-react-hooks";
8-
import simpleImportSort from "eslint-plugin-simple-import-sort";
7+
import reactHookPlugin from 'eslint-plugin-react-hooks';
8+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
99
import { fixupPluginRules } from '@eslint/compat';
1010

1111
export default tseslint.config(
1212
{
13-
ignores: ["app", "examples", "node_modules", "dist", "coverage", "src/types/global.d.ts","!.*.js", "reports", "scripts/README"],
13+
ignores: [
14+
'app',
15+
'examples',
16+
'node_modules',
17+
'dist',
18+
'coverage',
19+
'src/types/global.d.ts',
20+
'!.*.js',
21+
'reports',
22+
'scripts/README',
23+
],
1424
},
1525
reactPlugin.configs.flat.recommended,
1626
...tseslint.configs.recommended,
@@ -19,7 +29,7 @@ export default tseslint.config(
1929
{
2030
plugins: {
2131
'react-hooks': fixupPluginRules(reactHookPlugin),
22-
"simple-import-sort": simpleImportSort
32+
'simple-import-sort': simpleImportSort,
2333
},
2434
languageOptions: {
2535
ecmaVersion: 2020,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"postbuild": "rimraf dist/__tests__ && node ./scripts/rollup/assert-esm-exports.mjs && node ./scripts/rollup/assert-cjs-exports.cjs",
3434
"build:modern": "rollup --bundleConfigAsCjs -c ./scripts/rollup/rollup.config.js",
3535
"build:esm": "rollup --bundleConfigAsCjs -c ./scripts/rollup/rollup.esm.config.js",
36-
"prettier:fix": "prettier --config .prettierrc --write \"**/*.{js,ts,tsx,css}\"",
36+
"prettier:fix": "prettier --config .prettierrc --write .",
3737
"lint": "eslint '**/*.{js,ts,tsx}'",
3838
"lint:fix": "pnpm lint --fix",
3939
"type": "tsc --noEmit",

scripts/rollup/assert-esm-exports.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ import fs from 'fs';
1010
import path from 'path';
1111
import url from 'url';
1212

13-
const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
13+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
1414

1515
/**
1616
* A shell one-liner to update this array when neccessary (run from root of repo):
1717
* node -e "import('react-hook-form').then((mod) => console.log(JSON.stringify(Object.keys(mod), null, 2)))" > scripts/rollup/all-exports.json
1818
*/
1919
const expected = JSON.parse(
20-
fs.readFileSync(
21-
path.resolve(__dirname, './all-exports.json'),
22-
'utf-8',
23-
),
20+
fs.readFileSync(path.resolve(__dirname, './all-exports.json'), 'utf-8'),
2421
);
2522

2623
assert.deepStrictEqual(Object.keys(exported), expected);

0 commit comments

Comments
 (0)