Skip to content

Commit 07e4cef

Browse files
committed
style(md): use single-quote no-semi
1 parent c2593d4 commit 07e4cef

File tree

10 files changed

+49
-49
lines changed

10 files changed

+49
-49
lines changed

.github/ISSUE_TEMPLATE/defect---bug---report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Defect ("bug") report
33
about: Create a report to help us improve.
4-
title: "defect: "
5-
labels: ""
6-
assignees: ""
4+
title: 'defect: '
5+
labels: ''
6+
assignees: ''
77
---
88

99
# <img align="bottom" alt="bug" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/bug.svg" height="50" width="50"> Defect Report

.github/ISSUE_TEMPLATE/feature_request.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest a feature or enhancement
4-
title: "feat: "
5-
labels: ""
6-
assignees: ""
4+
title: 'feat: '
5+
labels: ''
6+
assignees: ''
77
---
88

99
# <img align="bottom" alt="briefcase" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/briefcase.svg" height="50" width="50"> Feature Request

.github/ISSUE_TEMPLATE/metrics-proposal-s-.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Metrics proposal(s)
33
about: Propose metrics that answer questions intended to track goals.
4-
title: "metric: "
5-
labels: ""
6-
assignees: ""
4+
title: 'metric: '
5+
labels: ''
6+
assignees: ''
77
---
88

99
# <img align="bottom" alt="graph" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/graph.svg" height="50" width="50"> Metric Proposals

.github/ISSUE_TEMPLATE/refactoring-proposal.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Refactoring proposal
33
about: Suggest a way to improve the design or our source code.
4-
title: "refactoring: "
5-
labels: ""
6-
assignees: ""
4+
title: 'refactoring: '
5+
labels: ''
6+
assignees: ''
77
---
88

99
# <img align="bottom" alt="code" height="50" width="50" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/code.svg"> Refactoring proposal

README.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -107,30 +107,30 @@ npm install archetypes-rules
107107

108108
## 3. Usage
109109

110-
### 3.1. Example 1: Is this customer eligible for a discount?
110+
### 3.1. Example 1: Is this customer eligible for a discount
111111

112112
Suppose we have a very simple rule that checks whether a customer is eligible
113113
for a discount. In order to be eligible, the customer simply needs to be a Gold
114114
Card holder.
115115

116116
```javascript
117-
const { Rule, RuleContext } = require("archetypes-rules");
117+
const { Rule, RuleContext } = require('archetypes-rules')
118118

119119
// Create the rule
120-
const rule = new Rule("eligibleForDiscount");
120+
const rule = new Rule('eligibleForDiscount')
121121

122122
// Add a Proposition, i.e., a statement that has a value of true or false
123-
rule.addProposition("customerIsGoldCardHolder", true);
123+
rule.addProposition('customerIsGoldCardHolder', true)
124124

125125
// Create a RuleContext, i.e., a "Fact"
126-
const ruleContext = RuleContext("eligibleForDiscountContext");
126+
const ruleContext = RuleContext('eligibleForDiscountContext')
127127

128128
// Provide the truth statement as to whether the actual customer
129129
// has a Gold Card
130-
ruleContext.addProposition("customerIsGoldCardHolder", true);
130+
ruleContext.addProposition('customerIsGoldCardHolder', true)
131131

132132
// Evaluate
133-
const result = rule.evaluate(ruleContext);
133+
const result = rule.evaluate(ruleContext)
134134

135135
// Log the resulting Proposition
136136

@@ -144,31 +144,31 @@ Say you provide a discount to a group of six or more people:
144144

145145
```javascript
146146
// Create the rule
147-
const rule = Rule("eligible-for-group-discount");
147+
const rule = Rule('eligible-for-group-discount')
148148

149149
// Declare a "placeholder" variable for the actual number of people
150150
// (This value will be retrieved from the RuleContext)
151-
rule.addVariable("actual-num-people", null);
151+
rule.addVariable('actual-num-people', null)
152152

153153
// Declare the minimum number of people required for discount
154-
rule.addVariable("min-num-people", 6);
154+
rule.addVariable('min-num-people', 6)
155155

156156
// Compare the two, i.e.,
157157
// actual-num-people >= min-num-people
158-
rule.addOperator(Operator.GREATER_THAN_OR_EQUAL_TO);
158+
rule.addOperator(Operator.GREATER_THAN_OR_EQUAL_TO)
159159

160160
// Create a RuleContext, i.e., a "Fact"
161-
const ruleContext = RuleContext("eligible-for-group-discount-fact");
161+
const ruleContext = RuleContext('eligible-for-group-discount-fact')
162162

163163
// How many people are there?
164-
ruleContext.addVariable("actual-num-people", 5);
164+
ruleContext.addVariable('actual-num-people', 5)
165165

166166
// Declare the "placeholder" minimun number of people required for discount
167167
// (This value will be retrieved from the Rule)
168-
ruleContext.addVariable("min-num-people", "NULL_NUMBER_VARIABLE");
168+
ruleContext.addVariable('min-num-people', 'NULL_NUMBER_VARIABLE')
169169

170170
// Evaluate
171-
const result = rule.evaluate(ruleContext);
171+
const result = rule.evaluate(ruleContext)
172172

173173
// Log the resulting Proposition
174174

@@ -191,33 +191,33 @@ eligible, a passenger must:
191191
In order to determine this, we must compare a passenger’s facts with our rule.
192192

193193
```javascript
194-
const { Rule, RuleContext, RuleElement } = require("archetypes-rules");
194+
const { Rule, RuleContext, RuleElement } = require('archetypes-rules')
195195

196196
// Create the rule
197-
const rule = Rule("eligible-for-upgrade");
197+
const rule = Rule('eligible-for-upgrade')
198198

199199
// Populate the rule using method chaining
200200
rule
201-
.addProposition("passenger-is-economy", true)
202-
.addProposition("passenger-is-gold-card-holder", true)
203-
.addProposition("passenger-is-silver-card-holder", true)
204-
.addOperator("OR")
205-
.addOperator("AND")
206-
.addVariable("passenger-carry-on-baggage-weight", "NULL_NUMBER_VARIABLE")
207-
.addVariable("passenger-carry-on-baggage-allowance", 15.0)
208-
.addOperator("LESS_THAN_OR_EQUAL_TO")
209-
.addOperator("AND");
201+
.addProposition('passenger-is-economy', true)
202+
.addProposition('passenger-is-gold-card-holder', true)
203+
.addProposition('passenger-is-silver-card-holder', true)
204+
.addOperator('OR')
205+
.addOperator('AND')
206+
.addVariable('passenger-carry-on-baggage-weight', 'NULL_NUMBER_VARIABLE')
207+
.addVariable('passenger-carry-on-baggage-allowance', 15.0)
208+
.addOperator('LESS_THAN_OR_EQUAL_TO')
209+
.addOperator('AND')
210210

211211
// Create the RuleContext
212-
const fact = RuleContext("eligibleForUpgradeFact");
212+
const fact = RuleContext('eligibleForUpgradeFact')
213213

214214
// Load it with the facts about the passenger
215215
fact
216-
.addProposition("passengerIsEconomy", true)
217-
.addProposition("passengerIsGoldCardHolder", true)
218-
.addProposition("passengerIsSilverCardHolder", false)
219-
.addVariable("passenger-carry-on-baggage-weight", 10.0)
220-
.addVariable("passenger-carry-on-baggage-allowance", "NULL_NUMBER_VARIABLE");
216+
.addProposition('passengerIsEconomy', true)
217+
.addProposition('passengerIsGoldCardHolder', true)
218+
.addProposition('passengerIsSilverCardHolder', false)
219+
.addVariable('passenger-carry-on-baggage-weight', 10.0)
220+
.addVariable('passenger-carry-on-baggage-allowance', 'NULL_NUMBER_VARIABLE')
221221

222222
// Log the resulting Proposition
223223

docs/adr/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Node.js CLI client.
6161
https://docs.npmjs.com/about-packages-and-modules#about-packages
6262
[npmjs-public-registry-doc]:
6363
https://docs.npmjs.com/about-the-public-npm-registry
64-
[semver-spec]: https://semver.org "Semantic Versioning 2.0.0 specification"
64+
[semver-spec]: https://semver.org 'Semantic Versioning 2.0.0 specification'
6565
[gl-push-rules-doc]: https://docs.gitlab.com/ee/push_rules/push_rules.html
6666
[gl-push-rules-api-docs]:
6767
https://docs.gitlab.com/ee/api/projects.html#push-rules-starter

docs/img/logos/adr/0001-record-architecture-decisions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The workflow will be:
9393

9494
[fake-images-pl-github-url]:
9595
https://github.com/Rydgel/Fake-images-please
96-
"View the source code on GitHub."
96+
'View the source code on GitHub.'
9797
[icon-checklist]:
9898
https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/svg/checklist.svg
9999
[icon-clippy]:

docs/maintainer-guide/issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ open source (and, by extension, InnerSource) projects.
8282
> project health.** 21% of people who experienced or witnessed a negative
8383
> behavior said they stopped contributing to a project because of it, and 8%
8484
> started working in private channels more often.
85-
> <sup>[\[2\]](#ref-open-source-survey "View reference.")</sup>
85+
> <sup>[\[2\]](#ref-open-source-survey 'View reference.')</sup>
8686
8787
<p>&nbsp;</p>
8888

docs/maintainer-guide/releases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ release is appropriate.
269269
https://docs.npmjs.com/about-packages-and-modules#about-packages
270270
[npmjs-public-registry-doc]:
271271
https://docs.npmjs.com/about-the-public-npm-registry
272-
[semver-spec]: https://semver.org "Semantic Versioning 2.0.0 specification"
272+
[semver-spec]: https://semver.org 'Semantic Versioning 2.0.0 specification'
273273
[octicon-alert]:
274274
https://cdnjs.cloudflare.com/ajax/libs/octicons/8.3.0/svg/alert.svg
275275
[octicon-arrow-down]:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
"lint:js": "eslint .",
367367
"lint:js:fix": "npm run lint:js -- --fix",
368368
"lint:json:fix": "prettier --write **/*.json",
369-
"lint:md:fix": "prettier --parser \"markdown\" --prose-wrap \"always\" --write \"**/*.md\"",
369+
"lint:md:fix": "prettier --parser \"markdown\" --prose-wrap \"always\" --single-quote --no-semi --write \"**/*.md\"",
370370
"postci:test": "npm run ci:coverage",
371371
"postversion": "npm run bundle",
372372
"pretest": "npm run lint:js:fix",

0 commit comments

Comments
 (0)