lsdsjy / prettier-plugin-stylus

Prettier plugin for Stylus.
17 stars 2 forks source link

Add .prettierrc config #8

Closed tomoyaf closed 2 weeks ago

tomoyaf commented 1 year ago

@lsdsjy Hi! Thanks for the great plugin! I implemented this PR because I needed a little additional functionality.

The original implementation is limited to Pythonic Style, so I added configurations to .prettierrc.

const options = {
  curlyInStylus: {
      type: 'boolean',
      category: 'Global',
      default: false,
      description: 'Use a curly in  boolean flag',
  },
  colonSepInStylus: {
      type: 'boolean',
      category: 'Global',
      default: false,
      description: 'Use a colon as separator boolean flag',
  },
  semiInStylus: {
    type: 'boolean',
    category: 'Global',
    default: false,
    description: 'Use a semiclon as EOL boolean flag',
  }
};
lsdsjy commented 1 year ago

Hi! Thanks for the PR! Would you like to add some test cases for these new options? You can specify prettier options when calling run_spec, see https://github.com/lsdsjy/prettier-plugin-stylus/blob/main/tests/jsfmt.spec.js

tomoyaf commented 1 year ago

OK!