Skip to content

Commit 59d1c51

Browse files
committed
fix: 🐛 fix setup without prettier. Updated readme
1 parent 35f04dc commit 59d1c51

File tree

3 files changed

+63
-42
lines changed

3 files changed

+63
-42
lines changed

README.md

+48-36
Original file line numberDiff line numberDiff line change
@@ -38,41 +38,53 @@ npx install-peerdeps eslint-plugin-nimbus-clean
3838

3939
### Usage
4040

41-
Add `nimbus-clean` to the extends or plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
42-
43-
```json
44-
{
45-
"parser": "@typescript-eslint/parser",
46-
"parserOptions": {
47-
"ecmaVersion": 13,
48-
"sourceType": "module",
49-
"ecmaFeatures": {
50-
"jsx": true,
51-
"modules": true,
52-
"experimentalObjectRestSpread": true
41+
1. Add `nimbus-clean` to the extends or plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
42+
```json
43+
{
44+
"parser": "@typescript-eslint/parser",
45+
"parserOptions": {
46+
"ecmaVersion": 13,
47+
"sourceType": "module",
48+
"ecmaFeatures": {
49+
"jsx": true,
50+
"modules": true,
51+
"experimentalObjectRestSpread": true
52+
}
53+
},
54+
"ignorePatterns": [
55+
"**/*",
56+
"node_modules"
57+
],
58+
"settings": {
59+
"react": {
60+
"pragma": "React",
61+
"fragment": "Fragment",
62+
"version": "detect"
63+
},
64+
"import/resolver": {
65+
"typescript": {
66+
"alwaysTryTypes": true
67+
}
68+
}
69+
},
70+
"extends": [
71+
"plugin:nimbus-clean/recommended"
72+
],
73+
"plugins": [
74+
"nimbus-clean"
75+
]
5376
}
54-
},
55-
"ignorePatterns": [
56-
"**/*",
57-
"node_modules"
58-
],
59-
"settings": {
60-
"react": {
61-
"pragma": "React",
62-
"fragment": "Fragment",
63-
"version": "detect"
64-
},
65-
"import/resolver": {
66-
"typescript": {
67-
"alwaysTryTypes": true
68-
}
77+
```
78+
79+
2. If you don't have a `.prettierrc` config, please add it
80+
81+
```prettier
82+
{
83+
"singleQuote": true,
84+
"printWidth": 150,
85+
"useTabs": false,
86+
"tabWidth": 2,
87+
"trailingComma": "all",
88+
"semi": false
6989
}
70-
},
71-
"extends": [
72-
"plugin:nimbus-clean/recommended"
73-
],
74-
"plugins": [
75-
"nimbus-clean"
76-
]
77-
}
78-
```
90+
```

package-lock.json

+9-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"eslint-plugin-sonarjs": "^0.20.0",
6666
"eslint-plugin-testing-library": "^6.0.0",
6767
"eslint-plugin-unicorn": "^48.0.1",
68+
"prettier": "^3.0.3",
6869
"husky": "^8.0.3",
6970
"markdown-toc": "^1.2.0",
7071
"npm-run-all": "^4.1.5",
@@ -89,7 +90,8 @@
8990
"eslint-plugin-simple-import-sort": "^10.0.0",
9091
"eslint-plugin-sonarjs": "^0.20.0",
9192
"eslint-plugin-testing-library": "^6.0.0",
92-
"eslint-plugin-unicorn": "^48.0.1"
93+
"eslint-plugin-unicorn": "^48.0.1",
94+
"prettier": "^3.0.3"
9395
},
9496
"peerDependenciesMeta": {
9597
"eslint": {
@@ -142,6 +144,9 @@
142144
},
143145
"eslint-plugin-perfectionist": {
144146
"optional": false
147+
},
148+
"prettier": {
149+
"optional": false
145150
}
146151
}
147152
}

0 commit comments

Comments
 (0)