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

Design: Configuration file #9

Closed
azu opened this issue Feb 9, 2020 · 1 comment
Closed

Design: Configuration file #9

azu opened this issue Feb 9, 2020 · 1 comment
Labels
Status: Proposal Request for comments

Comments

@azu
Copy link
Member

azu commented Feb 9, 2020

secretlint will support secretlintrc.json as configuration file.

This issue discuss about the configuration format.

Condition

  • Configuration file can be parsed as JSON
    • It means that limit usage of RegExp literal

Format

textlint-pattern

Props

  • Simple object

Cons

{
  "rules": {
    "<pkg_1>": <option>
    "<pkg_2>": {
      "severity": "waring"
    }
  }
}

Babel/ESLint style

Depend on order of array.

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "entry"
      }
    ]
  ]
}

Array Rule

Props

  • explicitly
  • System options can be separated
  • It is flexible

Cons

  • A bit long
  • Should handle duplicated id?
{
  "rules": [
    { 
      "name": "<pkg>"
      "options": <option>
      // Additional by systems
      "severity": "warning"
    }
  ]
}
@azu azu added the Status: Proposal Request for comments label Feb 9, 2020
@azu azu closed this as completed in c56e8a3 Feb 9, 2020
@azu
Copy link
Member Author

azu commented Feb 9, 2020

Implemented Array Rule

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

No branches or pull requests

1 participant