Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jscs

Package Overview
Dependencies
Maintainers
4
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jscs - npm Package Versions

13
10

2.10.0

Diff

Changelog

Source

Version 2.10.0 (2016-02-15):

Happy Presidents Day!

In this release, it's just some additional rules to update to the airbnb preset, new rules, and fixes.

Preset Changes

  • Add maximumLineLength to the airbnb preset (reference) (Oleg Gaidarenko)
  • Add disallowSpacesInsideTemplateStringPlaceholders to the airbnb preset (not explicit but used in examples) (Oleg Gaidarenko)
  • Add disallowNewlineBeforeBlockStatements rule to the mdcs preset (reference) (Mauricio Massaia)

New Rules

disallowSpacesInsideTemplateStringPlaceholders

(ikokostya)

Disallows spaces before and after curly brace inside template string placeholders.

// usage in config
"disallowSpacesInsideTemplateStringPlaceholders": true
// Valid
`Hello ${name}!`
// Invalid
`Hello ${ name}!`
`Hello ${name }!`
`Hello ${ name }!`
requireImportsAlphabetized (Ray Hammond)

Requires imports to be alphabetized

// usage in config
"requireImportAlphabetized": true
// Valid
import a from 'a';
import c from 'c';
import z from 'z';
// Invalid
import a from 'a';
import z from 'z';
import c from 'c';

Rule Updates

  • requireSpaceBeforeKeywords: add a allExcept option for filtering out default keywords (gpiress)
    • This allows you do specify exceptions to the all keywords instead of creating an array of whitelisted keywords when you only want to blacklist a few.

Bug fixes

  • requireNumericLiterals: miss if first argument is an Identifier (Robert Jackson)
  • disallowSpacesInsideTemplateStringPlaceholders: skip the edge case (Oleg Gaidarenko)
  • requirePaddingNewLinesBeforeExport: exclude if only statement in block (Brian Schemp)
  • maximumLineLength: some nodes might contain null values (Oleg Gaidarenko)

Docs

  • Correct date in the changelog (Oleg Gaidarenko)
  • Various rule corrections (Christopher Cook)
hzoo
published 2.9.0 •

Changelog

Source

Version 2.9.0 (2016-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

markelog
published 2.8.0 •

Changelog

Source

Version 2.8.0

Happy new year! Small changes this time, small, but important fixes which still warrants the minor bump.

Aside from bug fixes, this update includes improvement for the airbnb preset and allExcept option for the disallowNewlineBeforeBlockStatements

markelog
published 2.7.0 •

Changelog

Source

Version 2.7.0

It's this time of the year again, 2.7 is here!

One new rule, cool amount of fixes and massive jsdoc rule set update.

New Rules

Although there's only one new rule in this release, it's pretty powerful! Say thanks to @ficristo!

hzoo
published 2.6.0 •

Changelog

Source

Version 2.6.0 (11-18-2015):

Thanks to @seanpdoyle, we're able to move some of the ES6 rules from ember-suave to JSCS!

New Rules

hzoo
published 2.5.1 •

Changelog

Source

Version 2.5.1 (11-06-2015):

Just some bug fixes and an internal change before we integrate CST.

Fixes

  • disallowUnusedParams: ignore eval exressions (Oleg Gaidarenko)
  • Configuration: do not try to load presets with function values (Oleg Gaidarenko)
  • requirePaddingNewLinesAfterBlocks - don't throw on empty block (Oleg Gaidarenko)
  • requireSpacesInGenerator - account for named functions (Henry Zhu)

Internal changes

  • Add Whitespace token in preparation for using CST (Marat Dulin)
markelog
published 2.5.0 •

Changelog

Source

Version 2.5.0 (10-28-2015):

Preset Updates

Thanks to markelog and Krinkle, the built-in wikimedia preset will be hosted at https://github.com/wikimedia/jscs-preset-wikimedia.

The purpose of this change is so that organizations can update their preset as needed without waiting for JSCS to update to another minor version (even though we are releasing more often anyway). The plan is to not update our preset dependencies until a new minor version of JSCS.

Example:

// JSCS package.json
"jscs-preset-wikimedia": "~1.0.0",
  • Wikimedia updates their preset to to 1.1.0
  • A new user runs npm install with jscs and will get version 1.0.0 of the wikimedia preset
  • If the user wants to update the preset themselves, they can add a direct dependency in their package.json
  • Otherwise they can wait for JSCS to have a minor version update (2.4.0 to 2.5.0) which will update all presets.

If you would like to maintain one of the default supported presets, please let us know.

New Rules

markelog
published 2.4.0 •

Changelog

Source

Version 2.4.0 (10-22-2015):

We're releasing pretty often now, right? :-)

Fix option

  • The --fix CLI flag can now be used programatically and through a .jscsrc config.

This is be useful for plugin authors (not only for jscs plugins but also for grunt/gulp/etc...)

Preset updates

  • The jquery preset (and dependant ones like wordpress and wikimedia) is less strict, whereas idiomatic is now more meticulous.

Couple new rules

[1,2,3] // valid
[1, 2, 3] // invalid
var test = function(one, two,
/*indent!*/  three) {
  ...
};

Some new rule options

obj["ಠ_ಠ"] // This is wrong!
obj.ಠ_ಠ // Now you get it :-)
var whatDoesAnimalsSay = {
    cat: 'meow', dog: 'woof', fox: 'What does it say?' // this is cool now
};

Fixes

// allows
var a = 1;

{
  let b = 1;
}
hzoo
published 2.3.5 •

Changelog

Source

Version 2.3.5 (10-19-2015):

Why not fix some more bugs!

Bug fixes

  • Fix: requireSpacesInForStatement account for parenthesizedExpression (Henry Zhu)
// allows ()
for (var i = 0; (!reachEnd && (i < elementsToMove)); i++) {
  • Fix: disallowCommaBeforeLineBreak: fix for function params (Henry Zhu)
// allows
function a(b, c) {
  console.log('');
}
  • Fix: requirePaddingNewLineAfterVariableDeclaration - allow exported declarations (Henry Zhu)
// allows
export var a = 1;
export let a = 1;
export const a = 1;
  • Fix: disallowSpaceAfterKeywords - fix issue with using default keyword list (Henry Zhu)
// fixes autofix from `return obj` to `returnobj`
  • Fix: disallowTrailingComma, requireTrailingComma - support ObjectPattern and ArrayPattern (Henry Zhu)
// disallow
const { foo, bar } = baz;
const [ foo, bar ] = baz;

// require
const { foo, bar, } = baz;
const [ foo, bar, ] = baz;

hzoo

hzoo
published 2.3.4 •

Changelog

Source

Version 2.3.4 (10-17-2015):

Bug fixes

  • Change requireVarDeclFirst to ignore let and const 2199ca4 #1783

  • Fixed an issue with all function spacing rules not accounting for the generators a2c009f #1175

hzoo

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc