Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create standard rule file format for both defining and toggling rules #10

Closed
2 tasks done
rossmcdonald opened this issue Sep 26, 2018 · 1 comment
Closed
2 tasks done
Assignees
Milestone

Comments

@rossmcdonald
Copy link
Contributor

rossmcdonald commented Sep 26, 2018

We should use the same format for both defining rules as well as toggling. Sample format:

{
  rules: {
    '*': {
      'object-literal-sort-keys': true,
    },
    'oas2|oas3|jschema': {

    },
    oas3: false,
    oas2: {
      'validate:object-literal-sort-keys': true,
      'radix': false,
      'variable-name': false,
      'curly': false,
      'no-console': false,
      'no-empty-interface': false,
      'ban-types': false,
      'max-classes-per-file': [true, 3],
      'no-var-requires': false,
    },
  }
}

Open Questions

  • If rules/oas3 is set to false, doesn't that conflict with a union rule containing oas3 (ie, oas2|oas3? No, since all rules should be unique.
  • Should we have a single to for rule definitions to ensure all rule names are unique (ie, something like a ruleDefinitions object, and everything else references the names)? Can evaluate at a later date.
@rossmcdonald rossmcdonald added this to the v0.1.0 milestone Sep 26, 2018
@rossmcdonald rossmcdonald self-assigned this Sep 26, 2018
@rossmcdonald
Copy link
Contributor Author

Added with 18e2493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant