Skip to content

Commit dcce000

Browse files
committed
Add prettier
1 parent 4e7d6f7 commit dcce000

File tree

5 files changed

+53
-2
lines changed

5 files changed

+53
-2
lines changed

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Ignore artifacts
2+
dist
3+
build
4+
Pods
5+
target
6+
.cxx
7+
8+
# Ignore hermes
9+
packages/react-native-node-api-modules/hermes
10+
packages/node-addon-examples/examples

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { globalIgnores } from "eslint/config";
44
import globals from "globals";
55
import eslint from '@eslint/js';
66
import tseslint from 'typescript-eslint';
7+
import eslintConfigPrettier from "eslint-config-prettier/flat";
78

89
export default tseslint.config(
910
globalIgnores(["**/dist/**"]),
@@ -12,6 +13,7 @@ export default tseslint.config(
1213
globalIgnores(["packages/node-addon-examples/examples/**"]),
1314
eslint.configs.recommended,
1415
tseslint.configs.recommended,
16+
eslintConfigPrettier,
1517
{
1618
files: [
1719
"apps/test-app/*.js",

package-lock.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"clean": "tsc --build --clean",
1414
"dev": "tsc --build --watch",
1515
"lint": "eslint .",
16+
"prettier:check": "prettier --check .",
17+
"prettier:write": "prettier --write .",
1618
"test": "npm run test --workspace react-native-node-api-modules --workspace react-native-node-api-cmake --workspace gyp-to-cmake --workspace node-addon-examples"
1719
},
1820
"author": {
@@ -32,10 +34,12 @@
3234
"@tsconfig/react-native": "3.0.5",
3335
"@types/node": "^22.13.0",
3436
"eslint": "^9.19.0",
37+
"eslint-config-prettier": "^10.1.5",
3538
"globals": "^16.0.0",
39+
"prettier": "3.5.3",
3640
"react-native": "0.79.1",
41+
"tsx": "^4.19.3",
3742
"typescript": "^5.7.3",
38-
"typescript-eslint": "^8.22.0",
39-
"tsx": "^4.19.3"
43+
"typescript-eslint": "^8.22.0"
4044
}
4145
}

0 commit comments

Comments
 (0)