@sdlcforge/format-and-lint 1.0.0-alpha.26 → 1.0.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +15 -9
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -142,17 +142,25 @@ Note, the component structure is essentially a prototype at this point. Future v
142
142
  ```
143
143
  - places `else if`/`else`/`catch`, etc. on a newline; e.g.:
144
144
  ```js
145
- if (a === 1) { // fandl style (Stroustrup); more consistent and allows for end comments
145
+ const foo = bar // fandl style; generally accepted as easier to read
146
+ && baz
147
+ // vs
148
+ const foo = bar && // prettier style
149
+ baz
150
+ ```
151
+ - places `else if`/`else`/`catch`, etc. on a newline; e.g.:
152
+ ```js
153
+ if (a === 1) { // fandl style (Stroustrup); more consistent IMO
146
154
  ...
147
- } // here we can say something about what the preceding block did
148
- else { // and here we can say something about what this block will do
149
-
155
+ }
156
+ else { // and easier to scan the page
157
+ ...
150
158
  }
151
159
  // vs
152
- if (a === 1) { // prettier style ("one true brace style")
160
+ if (a === 1) { // prettier default style ("one true brace style")
153
161
  ...
154
- } /* I gess you could do this */ else { // but IDK, just looks weird
155
-
162
+ } else { // IMO it's odd to have lexical overhead preceed the flow control keyword
163
+ ...
156
164
  }
157
165
  ```
158
166
  - aligns the colons in object declarations; e.g.:
@@ -167,6 +175,4 @@ Note, the component structure is essentially a prototype at this point. Future v
167
175
  longFieldName : 'how are you?',
168
176
  }
169
177
  ```
170
- - The dual-formatting is also compatible with the eslint configuration, so the code final format will pass the eslint based lint checking.
171
-
172
178
  [^1]: I perhaps falsely remember eslint actually doing a better re indenting code, but in any case there are two issue with the latest eslint based reformatting. First, it miscounts the correct indention level where '('s were involved in boolean expressions. Second, eslint failed automatically break up long lines. (As of @stylistic/eslint-plugin: 2.6.4, eslint: 8.50.0; have since upgraded but not retested since it's working as is.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdlcforge/format-and-lint",
3
- "version": "1.0.0-alpha.26",
3
+ "version": "1.0.0-alpha.28",
4
4
  "description": "Pre-configured formatting and style tool combining prettier and eslint.",
5
5
  "main": "./dist/fandl.js",
6
6
  "type": "module",
@@ -52,7 +52,6 @@
52
52
  "find-plus": "^2.0.0",
53
53
  "gitignore-to-glob": "^0.3.0",
54
54
  "globals": "^14.0.0",
55
- "jest": "^29.7.0",
56
55
  "js-yaml": "^4.1.0",
57
56
  "prettier": "^3.3.3",
58
57
  "standard-error-set": "^1.0.0-beta.2"
@@ -60,8 +59,9 @@
60
59
  "devDependencies": {
61
60
  "@liquid-labs/dmd": "^6.3.1",
62
61
  "@liquid-labs/jsdoc-to-markdown": "^8.1.1",
63
- "@liquid-labs/sdlc-resource-jest": "^1.0.0-alpha.8",
64
- "dmd-readme-api": "^1.0.0-beta.8"
62
+ "@liquid-labs/sdlc-resource-jest": "^1.0.0-alpha.9",
63
+ "dmd-readme-api": "^1.0.0-beta.8",
64
+ "jest": "^30.2.0"
65
65
  },
66
66
  "_comply": {
67
67
  "orgKey": "@liquid-labs"