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

Update jscs to version 2.9.0 πŸš€ #13

Closed
wants to merge 1 commit into from

Conversation

greenkeeperio-bot
Copy link
Contributor

Hello πŸ‘‹

πŸš€πŸš€πŸš€

jscs just published its new version 2.9.0, which is not covered by your current version range.

If this pull request passes your tests you can publish your software with the latest version of jscs – otherwise use this branch to work on adaptions and fixes.

Happy fixing and merging 🌴


GitHub Release

Version 2.9.0 (2015-01-23):

Changed the changelog date format to be YYYY-MM-DD.

Whoo a release during this blizzard! Hopefully, this will be our last release before we start pushing out pre-release versions of 3.0. (If necessary, we can push bug fixes to 2.x)

The plan:

  • Push the 2.9.0 release
  • Create a 2.x branch off of master
  • Switch master to be the 3.0 branch
  • Merge in 2.x changes + cleanup stuff for a 3.0 alpha release.
  • Do what we can in our 3.0 milestone. We would really appreciate any help!
    • Especially for deprecating rules/options, rule merging, renames/inconsistencies that we don't catch.

New Rules

requireCapitalizedConstructorsNew (Alexander O'Mara)

// Description: Requires capitalized constructors to to use the `new` keyword

// Usage
"requireCapitalizedConstructors": {
"allExcept": ["somethingNative"]
}

// Valid
var x = new Y();
var x = new somethingNative(); // exception

// Invalid
var x = Y();

Rule Updates

// can turn
var a = [0,
1,
2];

// into
var a = [
0,
1,
2
];

This was @joerideg's first PR, so congrats and hope to see more contributions (not necessarily here)!

I think we would need a seperate rule to both check/fix alignment properly.

class A {
  prop; // will add a semicolon here
  prop2 = 1; // and here
}
  • requireCamelCaseOrUpperCaseIdentifiers: add extra options allowedPrefixes, allowedSuffixes, allExcept

    • This lets you specify a permitted array of String, RegExp, or ESTree RegExpLiteral values

For options: { allowedSuffixes: ["_dCel", {regex:{pattern:"_[kMG]?Hz"}}] }

// Extra valid options
var camelCase_dCel = 5;
var _camelCase_MHz = 6;
// Invalid
var camelCase_cCel = 4;
var CamelCase_THz = 5;
// Valid for requireNewlineBeforeBlockStatements
switch (a)
{
  case 1: break;
}

// Valid for disallowNewlineBeforeBlockStatements
switch (a) {
case 1: break;
}

Presets

  • airbnb: Enforce rule 25.1 (Joe Bartlett)
    • This adds requireDollarBeforejQueryAssignment
  • airbnb: Enforce rule 7.11 (Joe Bartlett)
    • This fixes up function spacing issues (autofixable)
  • google: Enforce naming rules
    • This adds "requireCamelCaseOrUpperCaseIdentifiers": { "allowedPrefixes": ["opt_"], "allExcept": ["var_args"] }

Bug Fixes

Misc


The new version differs by 44 commits .

  • 556c357 2.9.0
  • 42ef510 Misc: add 2.9.0 changelog [skip ci]
  • 87f864f (require|disallow)NewlineBeforeBlockStatements: account forSwitchStatement``
  • ef9ed5e New rule: requireCapitalizedConstructorsNew
  • 63db340 Preset: add requireCamelCaseOrUpperCaseIdentifiers to google preset
  • c1d277c requireCamelCaseOrUpperCaseIdentifiers: add exception options
  • 72f9cb5 CLI: do not keep adding preset from CLI
  • 787e80e validateNewlineAfterArrayElements: add autofix tests, fixup config issues
  • 310bf40 validateNewlineAfterArrayElements: --fix now works for this rule
  • a41d7c6 Preset: enforce Airbnb rule 25.1
  • 168009d ``requireEnhancedObjectLiterals: Don't error for computed properties
  • cc8a9e0 Misc: update LICENSE range to 2016
  • f55cb18 Preset:airbnb- enforce rule 7.11
  • c704e9e requireVarDeclFirst: be aware of the comments
  • 4f72a95 ``requireCapitalizedComments: fixed formatting in docs

There are 44 commits in total. See the full diff.


This pull request was created by greenkeeper.io.
It keeps your software, up to date, all the time.

Tired of seeing this sponsor message? Upgrade to the supporter plan! You'll also get your pull requests faster ⚑

@confuser confuser closed this Feb 17, 2016
@confuser confuser deleted the greenkeeper-jscs-2.9.0 branch April 14, 2016 18:55
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

Successfully merging this pull request may close these issues.

None yet

2 participants