Skip to content

Commit 3e51767

Browse files
authored
feat(variable): extend string-variable
feat(variable): extend string-variable 1. Add operator methods: 1. endsWith 2. hasMaxLength 3. hasMinLength 4. isEmpty 5. isNotEmpty 6. isOneOf 7. includes 8. matches 9. startsWith 2. Validate arguments to be of an expected type, when applicable. 3. Run sonar-scan locally to produce a report. Closes #33
1 parent c3fe98d commit 3e51767

8 files changed

+628
-101
lines changed

.env.schema

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
## 🚫 Your production database should have a different password
99
## 🚫 than your development database.
1010

11+
# Codacy
12+
13+
CODACY_PROJECT_TOKEN=
14+
15+
# CodeClimate
16+
17+
CC_TEST_REPORTER_ID=
18+
1119
NODE_ENV=
1220

1321
#

CHANGELOG.md

+114-2
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,165 @@
22

33
## [1.0.20](https://github.com/commonality/archetypes-rules/compare/v1.0.19...v1.0.20) (2019-05-19)
44

5+
## Build
6+
7+
**development-dependency**: bump eslint-config-prettier from 4.2.0 to 4.3.0 (#32)
8+
59
## [1.0.19](https://github.com/commonality/archetypes-rules/compare/v1.0.18...v1.0.19) (2019-05-19)
610

11+
## Build
12+
13+
**development-dependency**: bump rollup-plugin-node-resolve from 4.2.4 to 5.0.0 (#31)
14+
715
## [1.0.18](https://github.com/commonality/archetypes-rules/compare/v1.0.17...v1.0.18) (2019-05-19)
816

17+
## Build
18+
19+
**development-dependency**: bump lint-staged from 8.1.6 to 8.1.7 (#29)
20+
921
## [1.0.17](https://github.com/commonality/archetypes-rules/compare/v1.0.16...v1.0.17) (2019-05-19)
1022

23+
## Build
24+
25+
**development-dependency**: bump rollup from 1.11.3 to 1.12.1 (#30)
26+
1127
## [1.0.16](https://github.com/commonality/archetypes-rules/compare/v1.0.15...v1.0.16) (2019-05-18)
1228

29+
## Build
30+
31+
**development-dependency**: bump husky from 2.2.0 to 2.3.0 (#27)
32+
1333
## [1.0.15](https://github.com/commonality/archetypes-rules/compare/v1.0.14...v1.0.15) (2019-05-17)
1434

35+
## Build
36+
37+
**development-dependency**: bump prettier from 1.17.0 to 1.17.1 (#26)
38+
1539
## [1.0.14](https://github.com/commonality/archetypes-rules/compare/v1.0.13...v1.0.14) (2019-05-15)
1640

41+
## Build
42+
43+
**production-dependency**: bump ow from 0.13.0 to 0.13.1 (#25)
44+
1745
## [1.0.13](https://github.com/commonality/archetypes-rules/compare/v1.0.12...v1.0.13) (2019-05-14)
1846

47+
## Build
48+
49+
**production-dependency**: bump fs-extra from 8.0.0 to 8.0.1 (#24)
50+
1951
## [1.0.12](https://github.com/commonality/archetypes-rules/compare/v1.0.11...v1.0.12) (2019-05-14)
2052

53+
## Build
54+
55+
- **production-dependency**: bump @sindresorhus/is from 0.16.0 to 0.17.0 (#23)
56+
- **production-dependency**: bump fs-extra from 7.0.1 to 8.0.0 (#21)
57+
- **production-dependency**: bump ow from 0.12.0 to 0.13.0 (#20)
58+
- **development-dependency**: bump eslint-plugin-prettier from 3.0.1 to 3.1.0 (#22)
59+
- **development-dependency**: bump rollup-plugin-node-resolve from 4.2.3 to 4.2.4 (#19)
60+
2161
## [1.0.11](https://github.com/commonality/archetypes-rules/compare/v1.0.10...v1.0.11) (2019-05-13)
2262

63+
## Build
64+
65+
**development-dependency**: bump jsdoc from 3.6.1 to 3.6.2 (#18)
66+
2367
## [1.0.10](https://github.com/commonality/archetypes-rules/compare/v1.0.9...v1.0.10) (2019-05-09)
2468

69+
## Build
70+
71+
**development-dependency**: bump all-contributors-cli from 6.3.1 to 6.4.0 (#17)
72+
2573
## [1.0.9](https://github.com/commonality/archetypes-rules/compare/v1.0.8...v1.0.9) (2019-05-08)
2674

75+
## Build
76+
77+
- **development-dependency**: bump eslint-plugin-node from 8.0.1 to 9.0.1 (#11)
78+
- **development-dependency**: bump jsdoc from 3.5.5 to 3.6.1 (#15)
79+
2780
## [1.0.8](https://github.com/commonality/archetypes-rules/compare/v1.0.7...v1.0.8) (2019-05-08)
2881

82+
## Build
83+
84+
**development-dependency**: bump jest from 24.7.1 to 24.8.0 (#16)
85+
2986
## [1.0.7](https://github.com/commonality/archetypes-rules/compare/v1.0.6...v1.0.7) (2019-05-08)
3087

88+
## Build
89+
90+
**development-dependency**: bump dictionary-en-us from 2.0.0 to 2.1.1 (#14)
91+
3192
## [1.0.6](https://github.com/commonality/archetypes-rules/compare/v1.0.5...v1.0.6) (2019-05-07)
3293

94+
## Build
95+
96+
**development-dependency**: bump @sindresorhus/is from 0.15.0 to 0.16.0 (#13)
97+
3398
## [1.0.5](https://github.com/commonality/archetypes-rules/compare/v1.0.4...v1.0.5) (2019-05-07)
3499

100+
## Build
101+
102+
**development-dependency**: bump lint-staged from 8.1.5 to 8.1.6 (#12)
103+
35104
## [1.0.4](https://github.com/commonality/archetypes-rules/compare/v1.0.3...v1.0.4) (2019-05-07)
36105

106+
## Build
107+
108+
**development-dependency**: bump rollup from 1.10.1 to 1.11.3 (#10)
109+
37110
## [1.0.3](https://github.com/commonality/archetypes-rules/compare/v1.0.2...v1.0.3) (2019-05-03)
38111

112+
## Build
113+
114+
**development-dependency**: bump jest-junit from 6.3.0 to 6.4.0 (#8)
115+
39116
## [1.0.2](https://github.com/commonality/archetypes-rules/compare/v1.0.1...v1.0.2) (2019-05-02)
40117

118+
## Build
119+
120+
**development-dependency**: bump husky from 2.1.0 to 2.2.0 (#7)
121+
41122
## [1.0.1](https://github.com/commonality/archetypes-rules/compare/v1.0.0...v1.0.1) (2019-05-02)
42123

43-
# 1.0.0 (2019-04-30)
124+
## Refactor
44125

126+
**helpers**: reduce complexity (#6, #4)
127+
128+
### Summary of changes
129+
130+
1. test(qa): add sonar scanning
131+
- Add `sonarqube-scanner` for PR and Refactoring templates
132+
- Add `dotenv-extended` for 12-factor-style config strategy
133+
- Replace all copy/paste repo refs with this org/repo
134+
135+
1. test(config): cover env-config
136+
137+
1. refactor(complexity): remove unused functions
138+
- Replace all possible "lodash.is*" functions with
139+
"@sindresorhus/is.*"
140+
- Remove unused lodash dependencies
141+
- Reduce variable-factory's cyclomatic complexity
142+
143+
1. docs(readme): fix appveyor badge
144+
145+
1. ci(travis): fix npm-script
146+
147+
1. ci(windows): modify test config and expectations
148+
149+
- Appveyor is not configured to load secret environment variables,
150+
so simply check to ensure the key counts match.
151+
152+
- Appveyor doesn't have as many ENV VARs, so assert with
153+
"toBeLessThanOrEqual".
154+
155+
# 1.0.0 (2019-04-30)
45156

46157
### Bug Fixes
47158

48159
* **dependency:** update audit failures ([5957d53](https://github.com/commonality/archetypes-rules/commit/5957d53))
49160

50-
51161
### Features
52162

53163
* **inspection:** add type-inspector ([a53cb7d](https://github.com/commonality/archetypes-rules/commit/a53cb7d))
54164
* **rules:** initial import ([77ee7bc](https://github.com/commonality/archetypes-rules/commit/77ee7bc))
165+
166+
[octicon-calendar]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/calendar.svg

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,14 @@ Before submitting a Pull Request, please read our:
321321

322322
[daviddm-dev-image]: https://david-dm.org/commonality/archetypes-rules/dev-status.svg?theme=shields.io&style=flat-square
323323

324+
[bundlephobia-min-download-image]: https://flat.badgen.net/bundlephobia/min/archetypes-rules
325+
326+
[install-size-image]: https://flat.badgen.net/packagephobia/install/archetypes-rules
327+
328+
[publish-size-image]: https://flat.badgen.net/packagephobia/publish/archetypes-rules
329+
330+
[downloads-per-month-image]: https://flat.badgen.net/npm/dm/archetypes-rules
331+
324332
<!-- Octicon img references -->
325333

326334
[octicon-alert]:

lib/__tests__/env-config.test.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const envConfig = require('../env-config.js')
33
describe('envConfig', () => {
44
it('initializes all environment variables', () => {
55
const envConfigKeys = [
6+
'CODACY_PROJECT_TOKEN',
7+
'CC_TEST_REPORTER_ID',
68
'GH_TOKEN',
79
'GITHUB_TOKEN',
810
'GITLAB_ENDPOINT',

0 commit comments

Comments
 (0)