fix: Update types and apply to all rules #86
Merged
+120
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
What is the purpose of this pull request?
Updates types throughout.
What changes did you make? (Give an overview)
src/rules/no-duplicate-keys.js
: Changed the rule definition to use aconst rule
and exported it separately. [1] [2]src/rules/no-empty-keys.js
: Changed the rule definition to use aconst rule
and exported it separately. [1] [2]src/rules/no-unnormalized-keys.js
: Added type definitions and changed the rule definition to use aconst rule
, exporting it separately. [1] [2] [3]src/rules/no-unsafe-values.js
: Changed the rule definition to use aconst rule
and exported it separately. [1] [2]src/rules/sort-keys.js
: Added type definitions, imports, and helper functions. Changed the rule definition to use aconst rule
and exported it separately. [1] [2] [3] [4]src/rules/top-level-interop.js
: Added type definitions and changed the rule definition to use aconst rule
, exporting it separately. [1] [2]package.json
: Added themomoa
dependency.src/types.ts
: Added comments and lines properties to theIJSONSourceCode
interface.Related Issues
Is there anything you'd like reviewers to focus on?
I had to reformat the rules because the previous format of applying a type to the default export could only be accomplished with parentheses, and then Prettier would remove the parentheses on precommit.