Skip to content

Commit 30ae6d9

Browse files
Split out Prettier only lint:prettier npm script
1 parent 2ac3830 commit 30ae6d9

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Node.js modules
2+
node_modules/
3+
4+
# Test coverage
5+
coverage/
6+
7+
# Build output
8+
dist/
9+
10+
# Files to ignore
11+
.yarnrc.yml
12+
package-lock.json

.prettierrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2+
"printWidth": 100,
23
"semi": true,
3-
"trailingComma": "all",
44
"singleQuote": true,
5-
"printWidth": 100,
6-
"tabWidth": 2
5+
"tabWidth": 2,
6+
"trailingComma": "all"
77
}

.yarnrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
nodeLinker: node-modules
2-
npmRegistryServer: https://registry.yarnpkg.com
2+
3+
npmRegistryServer: "https://registry.yarnpkg.com"

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454
"build": "yarn cleanup && rollup -c",
5555
"test": "jest",
5656
"test:watch": "jest --watch",
57-
"lint": "yarn lint:types && yarn lint:js",
58-
"lint:fix": "yarn lint:js:fix",
57+
"lint": "yarn lint:types && yarn lint:js && yarn lint:prettier",
58+
"lint:fix": "yarn lint:js:fix && yarn lint:prettier:fix",
59+
"lint:prettier": "prettier --check .",
60+
"lint:prettier:fix": "prettier --write .",
5961
"lint:js": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}'",
6062
"lint:js:fix": "yarn lint:js --fix",
6163
"lint:types": "tsc --build tsconfig.json --pretty",
@@ -105,7 +107,7 @@
105107
"jest-environment-jsdom": "^30.2.0",
106108
"nhsuk-frontend": "^10.0.0",
107109
"outdent": "^0.8.0",
108-
"prettier": "^3.2.5",
110+
"prettier": "^3.6.2",
109111
"react": "^18.2.0",
110112
"react-dom": "^18.2.0",
111113
"rollup": "^4.52.4",

yarn.lock

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10997,7 +10997,7 @@ __metadata:
1099710997
jest-environment-jsdom: "npm:^30.2.0"
1099810998
nhsuk-frontend: "npm:^10.0.0"
1099910999
outdent: "npm:^0.8.0"
11000-
prettier: "npm:^3.2.5"
11000+
prettier: "npm:^3.6.2"
1100111001
react: "npm:^18.2.0"
1100211002
react-dom: "npm:^18.2.0"
1100311003
rollup: "npm:^4.52.4"
@@ -11691,7 +11691,7 @@ __metadata:
1169111691
languageName: node
1169211692
linkType: hard
1169311693

11694-
"prettier@npm:^3.1.1, prettier@npm:^3.2.5":
11694+
"prettier@npm:^3.1.1":
1169511695
version: 3.2.5
1169611696
resolution: "prettier@npm:3.2.5"
1169711697
bin:
@@ -11700,6 +11700,15 @@ __metadata:
1170011700
languageName: node
1170111701
linkType: hard
1170211702

11703+
"prettier@npm:^3.6.2":
11704+
version: 3.6.2
11705+
resolution: "prettier@npm:3.6.2"
11706+
bin:
11707+
prettier: bin/prettier.cjs
11708+
checksum: 10c0/488cb2f2b99ec13da1e50074912870217c11edaddedeadc649b1244c749d15ba94e846423d062e2c4c9ae683e2d65f754de28889ba06e697ac4f988d44f45812
11709+
languageName: node
11710+
linkType: hard
11711+
1170311712
"pretty-format@npm:30.2.0, pretty-format@npm:^30.0.0":
1170411713
version: 30.2.0
1170511714
resolution: "pretty-format@npm:30.2.0"

0 commit comments

Comments
 (0)