0.5.0 • Published 10 years ago
jscsrc-guesser v0.5.0
jscsrc-guesser – JSCS configuration guesser
jscsrc-guesser is a tool that checks some code base and finds those JSCS rules the code base follows.
This version emits rules for JSCS 2.2.*.
Installation
$ npm install -g jscsrc-guesserUsage
Just run jscsrc-guesser with your code path(s) as argument(s):
$ jscsrc-guesser bin/ lib/ tests/ > autogenerated.jscsrcYou can also pass some optional arguments you could pass to jscs:
$ jscsrc-guesser --esnext index.js > autogenerated.jscsrcKnown limitations
disallowSpaceBeforeSemicolonis not tried withallExceptvaluesrequireNamedUnassignedFunctionsis not tried withallExceptvaluesrequireSpacesInsideArrayBracketsis not tried withallExceptvaluesrequireSpacesInsideObjectBracketsis not tried withallExceptvaluesvalidateCommentPositionis not tried withallExceptvaluesrequireCapitalizedCommentsis only tried with valuetruerequireOperatorBeforeLineBreakis only tried with valuetruedisallowOperatorBeforeLineBreakis only tried with valuetruedisallowMultipleVarDeclis only tried with valuetruedisallowSpaceAfterObjectKeysis only tried with valuetruedisallowCommaBeforeLineBreakis only tried with valuetruerequirePaddingNewlinesInBlocksis only tried with valuetruedisallowNewlineBeforeBlockStatementsis only tried with valuetruerequireNewlineBeforeBlockStatementsis only tried with valuetruedisallowSpacesInsideParenthesesis only tried with valuetruerequireSpacesInsideParenthesesis only tried with valueallsafeContextKeywordis only tried for value_thisandselfmaximumNumberOfLinesis only tried with a fixed set of values (50, 100, 200, 500, 1000, 2000)maximumLineLengthis only tried with a fixed set of values (72, 75, 80, 90, 100, 120) and neither tab size nor exceptionsrequireSpaceBeforeBlockStatementsis only tried with a fixed set of values (1, 2, 3, 4, 5)requireBlocksOnNewlineis only tried with a fixed set of minimum lines (0, 1, 2, 3, 4, 5)validateParameterSeparatoris only tried with a fixed set of values (',',' ,',', ')validateIndentationis not tried with all valid configurationsvalidateNewlineAfterArrayElementsis not tried with all valid configurationsjsDocis not tried at all
Changelog
0.5.0 (2015-12-15)
- Update to JSCS 2.2.*
0.4.0 (2015-12-02)
- Update to JSCS 2.1.1
0.3.0 (2015-11-29)
- Fix JSCS invocation by setting
maxErrstoInfinity - Update to JSCS 2.0
0.2.0 (2015-11-20)
- Don't include contradictory rules
- Better handling of validateIndentation, maximumLineLength, requireAlignedObjectValues, validateLineBreaks, validateParameterSeparator
- Update to JSCS 1.13
0.1.1 (2015-04-25)
- Fix JSCS invocation
- Show errors emitted by JSCS
- Add JSCS check to
npm testpipeline
0.1.0 (2015-04-22)
- Initial version.
Todo
Fixes
- Handle all different possible values for all rules
- Fold multi-value options back to true
Features
- Emit YAML
- Compare to presets or existing .jscsrc, jscs.json or .jscs.yaml file
- Sort rules in output alphabetically
- Add i18n
- Check which rules checked successfully instead of which rules didn't fail
- Handle rules which failed rarely (for example by interactively proposing to add them to the output)
License
AGPL