1
0
Fork 0
Commit Graph

67 Commits

Author SHA1 Message Date
Sean Sube 3b7e48a494 fix: usage of __dirname, lint rules and corresponding fixes 2022-02-06 00:23:37 -06:00
Sean Sube 052ca736d2 fix: more ES imports, some corresponding import changes, reset mock FS after every test 2022-02-06 00:23:37 -06:00
Sean Sube cea8c8abff feat: convert to ES modules, C8 for coverage
BREAKING CHANGE: this is not breaking for users, but for library users,
some bundling or a runtime supporting ES modules is now required.
2022-02-06 00:23:37 -06:00
ssube 41b5a395ee
feat: update Ajv, schema rule usage thereof
BREAKING CHANGE: updates Ajv from v6 to v8, with the breaking
changes included there (https://ajv.js.org/v6-to-v8-migration.html).
This removes support for JSON-Schema draft-04 and adds new
drafts and keywords.
2021-08-07 01:02:33 -05:00
ssube e7e42eee89
feat: list files using node's fs module instead of recursive-readdir
BREAKING CHANGE: this changes how directories are listed, by replacing
the recursive-readdir module with node's readdir method, and a custom
implementation that is compatible with the changes to Node 16's fs
implementation for testing.
2021-07-14 00:13:21 -05:00
ssube 5cd1ab6fb5
fix(test): cover includes in config 2020-07-14 20:19:40 -05:00
Sean Sube cb3ee1fa8e
remove(test): async leak helpers (#313) 2020-04-02 18:58:57 -05:00
ssube 2fc7d7683c
fix(test): leaking config load 2020-04-01 16:58:26 -05:00
ssube 1121b112cc
remove(utils): use js-utils lib 2020-04-01 08:32:03 -05:00
ssube 899dac262e
fix(lint): selectively allow null types 2020-02-19 23:05:40 -06:00
ssube 4f1571b75c
lint(tests): clean up magic numbers 2019-11-19 06:03:48 -06:00
ssube 91e5a93db8 cover pojso rule instantiation 2019-11-18 06:28:06 -06:00
ssube 61498e7fab cover rule module defs directly 2019-11-18 06:28:06 -06:00
ssube 089725ef60 cover rule file and module validation 2019-11-18 06:28:06 -06:00
ssube c1ff388aff feat: validate config while loading 2019-11-18 06:28:06 -06:00
ssube dbfe0429fa feat: validate rules while loading 2019-11-18 06:28:06 -06:00
ssube b3fa9dd9be fix(tests): cover rule module error handling, exclude by level 2019-11-16 20:01:41 -06:00
ssube c0eb3e0bfc fix(tests): cover read config, rule module helpers 2019-11-16 20:01:41 -06:00
ssube 0f214ed2dc rudimentary coverage for fix mode 2019-11-16 20:01:41 -06:00
ssube 8254848ef8 feat(rules/kubernetes): add rule to prevent latest tag, rule to ensure pull policy is set 2019-11-15 21:05:44 -06:00
ssube 26eda4c6fe lint: split rule visitor tests 2019-11-15 21:05:44 -06:00
ssube 4fef163e5b cover rule visitor's extraneous pick method 2019-11-15 21:05:44 -06:00
ssube 79210654f0 cover include path helper 2019-11-15 21:05:44 -06:00
ssube fb60b09db8 cover config types better 2019-11-15 21:05:44 -06:00
ssube 6c33b81610 lint: extract visit item method 2019-11-15 21:05:44 -06:00
ssube c053da9051 fix(tests): cover rule failures through main 2019-11-15 21:05:44 -06:00
ssube b818aa66d4 cover stream error handling 2019-11-15 21:05:44 -06:00
ssube 0ba6382253 introduce formal rule visitor 2019-11-15 21:05:44 -06:00
ssube 761c64851c test schema rule selecting 0 items 2019-11-15 21:05:44 -06:00
ssube c9b6c9fe4e fix(tests): mock config when listing rules 2019-11-15 21:05:44 -06:00
ssube 11b3bd0d09 fix: manually pass argv to yargs 2019-11-15 21:05:44 -06:00
ssube 838f87baf5 fix(tests): cover source read and write 2019-11-15 21:05:44 -06:00
ssube 2812254ba5
fix(config): accept S regex flag, anchor slashes 2019-11-13 07:50:56 -06:00
ssube eff5f648a8
lint(tests): helper for friendly error tests 2019-11-13 07:26:09 -06:00
ssube 41ac1b5849
lint: rename context inner options to schema 2019-11-12 08:25:09 -06:00
ssube 02ccffda6b
fix: log schema names correctly, do not log unmatched files 2019-11-12 07:59:44 -06:00
ssube 85b81ea86c
fix(tests): cover rule loading from file/path 2019-11-12 07:32:30 -06:00
ssube 13d42e8b6f fix: update log level to use enum 2019-11-10 22:05:20 -06:00
ssube e0dca3c3ad
fix: export exit statuses 2019-11-09 21:56:49 -06:00
ssube 91fb1aff34 adopt everything but rollup config (#118) 2019-11-09 21:47:19 -06:00
ssube f0b5109689 feat(rules): add item index to rule error (fixes #116) 2019-11-09 19:41:00 -06:00
ssube de5dd2833a lint: consolidate ajv-related code, visitor trait interfaces 2019-11-09 19:41:00 -06:00
ssube 705209620b feat(build): replace tslint with eslint 2019-11-09 17:52:16 -06:00
ssube 44b1a6019e fix(tests): cover visit rules pass and errors 2019-11-03 13:13:24 -06:00
ssube fcd4740eee fix(visitor): include rule name and selector in error messages 2019-11-03 13:13:24 -06:00
ssube 842006c34a fix(visitor): remove error method from context
BREAKING CHANGE: rule errors must be grouped and returned in the rule
result, fixing #114 and keeping the context immutable.
2019-11-03 13:13:24 -06:00
ssube 247e1ab03d fix(tests): add gitlab CI test snippet, move test snippets into test dir 2019-11-03 13:13:24 -06:00
ssube 59e7c138c0 fix: build a rule selector from args, log it in list mode 2019-11-03 13:13:24 -06:00
ssube b3dc864f0d feat: split rule and helpers, test rule 2019-11-03 13:13:24 -06:00
ssube 4a05fcdba2
fix(config/include): handle more errors in include 2019-10-28 22:41:52 -05:00