-
Notifications
You must be signed in to change notification settings - Fork 510
Conversation
ccad22d
to
c7682bb
Compare
* Registers built-in Code Style cheking rules. | ||
*/ | ||
Configuration.prototype.registerDefaultRules = function() { | ||
this.registerRule(new (require('./../rules/require-curly-braces'))()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you leave a comment here explaining why we need to explicitly enumerate each rule. I know it's for browserify, but would be good to have that noted in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, was thinking about it, thank you!
Would love to see how this gets used in |
I like it too. Having this configuration logic in a single place makes the flow clearer. +1 for the plugin hooks. Great job. |
13d35db
to
c70fec7
Compare
Integrated into |
c7682bb
to
3567027
Compare
Published version with |
this._fileExtensions = this._configuration.getFileExtensions(); | ||
|
||
this._excludes = this._configuration.getExcludedFiles().map(function(pattern) { | ||
return new minimatch.Minimatch(path.resolve(cwd, pattern), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should exist inside the configuration module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
4bf82c0
to
0f2a630
Compare
In max-errors.js, Object.defineProperties cast the config maxErrors property to Number but not the StringChecker maxErrors property. This leads to a bug if multiple jscs checks are executed using the same config object (config.maxerrors will equal 'undefined' the first time, and 'NaN' the second time)
These options were surrounded by single quotes instead of backticks, so they were not formatted as code like the other options. Closes gh-683
Documentation, spaces, code style issues and add tests for "true" value Closes #586
What I have done:
Next steps:
|
02239af
to
2e9fafa
Compare
What I have done:
Next steps:
I'm almost there! 😄 |
0e876f6
to
ea29ea5
Compare
What I have done:
Next step:
|
ea29ea5
to
5e8e4c8
Compare
Finished my work. Check it out: #731 |
Plugin support with a bunch of configuration simplification.
I suggest to simplify configuration routines to a pair of files:
Configuration
— base configuration class. Works in any environment, used byStringChecker
.NodeConfiguration
(temporal name) —node.js
-specific configuration class. Works innode.js
.This replaces all configuration code in
Checker
,StringChecker
, files atlib/options
. Can replace routines at CLI-module during further development.Still we can keep full backward compatibility. This is just an internal redesign.
/cc @markelog, @mikesherov, @mrjoelkemp