Comments (11)
Hi!
- I will think about it.
- I think It's possible :)
- I didn't get your point. Options dont have default values at all. Option can be defined in config (and then the value must be validated) or not defined. Options, which are not in config, are not used.
from node-jscs.
Thank you for your feedback! 👍
from node-jscs.
The 3rd point is related to this:
My config file:
{
...,
"require_line_feed_at_file_end": false
}
Which gives me:
AssertionError: require_line_feed_at_file_end option requires true value or should be removed
at Object.module.exports.configure (C:\Users\gustavo\AppData\Roaming\npm\node_modules\jscs\lib\rules\require-line-feed-at-file-end.js:12:9)
Also some other options give me the same exception.
from node-jscs.
Oh, I see, It is probably Usability or Understanding problem.
For every option there is rule validator. If you need to "check line feed at file end", you are adding this option. There is no behavior for "false" value. If you want to ensure that there is no line feed at the end - there must be another option (like "disallow_line_feed_at_file_end").
That is why for "require_line_feed_at_file_end" there is only one valid value for now - true.
In other words, there is no default configuration of JSCS behavior. You can require something using some options or disallow something using another set of options, and there is nothing like "ignore rule" because there are no default rules :) Adding option to config = adding rule.
This is how it works. Probably it's not simple or trivial.
from node-jscs.
OK, thanks for the explanation.
I hope to give some pull requests soon :)
from node-jscs.
Thank you!
from node-jscs.
+1 for the 1 & 2 :)
from node-jscs.
Camel-case option names will be available in next release.
Rename the config file to .jscsrc
This suggestion was declined as we have valid json
unlike jshint. Many tools use correct extensions (like .travis.yml
).
Thank you for your feedback.
from node-jscs.
OK, thanks ;)
from node-jscs.
so maybe convert config to YAML? there is a good parser js-yaml.
from node-jscs.
@deepsweet, in YAML C-style naming is preferable. I switched to camelCase to make configuration valid in case of further API usage. So we can have JSON/API compatible naming for the same options.
from node-jscs.
Related Issues (20)
- jscs exlucdeFiles not Work! HOT 1
- Should have exception for disallowSpacesInFunction for anonymous generators HOT 1
- not possible to include extensions with multiple "." characters HOT 7
- Error running rule requirePaddingNewLinesBeforeLineComments HOT 1
- not possible to ignore '.js' files with fileExtensions #2273
- Destructuring with default values in parameters throws an error. HOT 1
- Cannot find module 'babel-runtime/core-js/object/keys' HOT 8
- Error: Symbol is not defined (first character of file) HOT 3
- Add `templateStrings` as an option for the `allExcept` property of the `maximumLineLength` rule HOT 2
- requireSpaceBeforeDestructuredValues does not work in vanilla JS HOT 3
- maximumLineLength should optionally allow string literals to break the rule HOT 2
- validateIndentation should enforce endbrace at the same indentation as the line containing it's corresponding startbrace HOT 2
- Error running rule requireDollarBeforejQueryAssignment HOT 3
- JSCS goes into infinite loop HOT 2
- About jsx curly braces variable HOT 1
- JSCS crashes due to decorators HOT 1
- requireSpaceBetweenArguments doesn't work in constructor of es6. HOT 4
- How to write a rule which makes "case" align to "switch" in switch statement? HOT 1
- jscs.info offline HOT 3
- Disabling Specific Rules For a Single Line not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-jscs.