Skip to content

Commit c23824b

Browse files
Split out Prettier only lint:prettier npm script
1 parent 4a2c52d commit c23824b

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
@@ -55,8 +55,10 @@
5555
"build": "yarn cleanup && rollup -c",
5656
"test": "jest",
5757
"test:watch": "jest --watch",
58-
"lint": "yarn lint:types && yarn lint:js",
59-
"lint:fix": "yarn lint:js:fix",
58+
"lint": "yarn lint:types && yarn lint:js && yarn lint:prettier",
59+
"lint:fix": "yarn lint:js:fix && yarn lint:prettier:fix",
60+
"lint:prettier": "prettier --check .",
61+
"lint:prettier:fix": "prettier --write .",
6062
"lint:js": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}'",
6163
"lint:js:fix": "yarn lint:js --fix",
6264
"lint:types": "tsc --build tsconfig.json --pretty",
@@ -107,7 +109,7 @@
107109
"jest-environment-jsdom": "^30.2.0",
108110
"nhsuk-frontend": "^10.0.0",
109111
"outdent": "^0.8.0",
110-
"prettier": "^3.2.5",
112+
"prettier": "^3.6.2",
111113
"react": "^18.2.0",
112114
"react-dom": "^18.2.0",
113115
"rollup": "^4.52.4",

yarn.lock

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10976,7 +10976,7 @@ __metadata:
1097610976
jest-environment-jsdom: "npm:^30.2.0"
1097710977
nhsuk-frontend: "npm:^10.0.0"
1097810978
outdent: "npm:^0.8.0"
10979-
prettier: "npm:^3.2.5"
10979+
prettier: "npm:^3.6.2"
1098010980
react: "npm:^18.2.0"
1098110981
react-dom: "npm:^18.2.0"
1098210982
rollup: "npm:^4.52.4"
@@ -11671,7 +11671,7 @@ __metadata:
1167111671
languageName: node
1167211672
linkType: hard
1167311673

11674-
"prettier@npm:^3.1.1, prettier@npm:^3.2.5":
11674+
"prettier@npm:^3.1.1":
1167511675
version: 3.2.5
1167611676
resolution: "prettier@npm:3.2.5"
1167711677
bin:
@@ -11680,6 +11680,15 @@ __metadata:
1168011680
languageName: node
1168111681
linkType: hard
1168211682

11683+
"prettier@npm:^3.6.2":
11684+
version: 3.6.2
11685+
resolution: "prettier@npm:3.6.2"
11686+
bin:
11687+
prettier: bin/prettier.cjs
11688+
checksum: 10c0/488cb2f2b99ec13da1e50074912870217c11edaddedeadc649b1244c749d15ba94e846423d062e2c4c9ae683e2d65f754de28889ba06e697ac4f988d44f45812
11689+
languageName: node
11690+
linkType: hard
11691+
1168311692
"pretty-format@npm:30.2.0, pretty-format@npm:^30.0.0":
1168411693
version: 30.2.0
1168511694
resolution: "pretty-format@npm:30.2.0"

0 commit comments

Comments
 (0)