I've found the correct line in the .eslintrc.js file. Was not able to find anything in the EsLint documentation about disabling.
Should I change/delete error?
Should I change always to false or off?
"semi": [
"error",
"always"
]
Configuring Rules
ESLint comes with a large number of rules. You can modify which rules your project uses either using configuration comments or configuration files. To change a rule setting, you must set the rule ID equal to one of these values:
"off" or 0 - turn the rule off
"warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
"error" or 2 - turn the rule on as an error (exit code is 1 when triggered)
Related
I have been working with the Rules object and its Rule members. I have not found any property that indicates a rule has an error. Yet when I select Rules/Manage Rules and Alerts Outlook takes very little time to say that One or more rules contain errors. When scrolling through the rules I notice that a few of them are flagged as having errors. However, I cannot find any Rule property that indicates it has an error.
How does Outlook know that there are rules with errors and which ones have an error? It doesn't seem likely that Outlook walks the entire rules collection and checks each rule for errors each time you look at the collection. So how does it know there are errors and which rules have them?
I looked at all of the Rule properties. If I look at a move to folder rule and try to reference the folder name, the system will throw an error if the folder is undefined (code 91). However, I could not find any flag that said there was an error in the rule. Yet, when I used Rules/Manage Rules and Alerts to scroll through the rules the rule was flagged as having an error: (Error) next to the name.
I looked at stylelint's docs and only saw a way to disable stylelint for running on for specific files/directories but what I really want is a way to disable specific rules) for specific files/directories. Is there a way to achieve that? I don't want to use stylelint-disable within the files.
In the future, you'll be able to use the overrides configuration property. In the meantime, you can work around this missing feature by using the extend configuration property and by running stylelint twice.
Create a second config that extends the more limited main config and turns on additional rules:
.extended-stylelintrc.json:
{
extends: "./.stylelintrc.json",
rules: {
"unit-whitelist": ["px"]
}
};
Or you can create a second config that extends a full main config and turns off rules:
.limited-stylelintrc.json:
{
extends: "./.stylelintrc.json",
rules: {
"property-no-unknown": null
}
};
It will require two npm tasks to run it, though:
stylelint "**/*.css"
stylelint "special/**/*.css" --config .extended-stylelintrc.js
Or it can be combined into one:
stylelint "**/*.css" && stylelint "special/**/*.css" --config .extended-stylelintrc.js
In that case, you can not use the ignoreFiles option
or .stylelintignore?
ignoreFiles
You can provide a glob or array of globs to ignore specific files.
For example, you can ignore all JavaScript files:
{
"ignoreFiles": ["**/*.js"]
}
Lets say in below salt call. I want the salt not to execute anymore further if a file exist.
In below example. It should execute run-aerospike-mem_disk-check but once if it detects file exist in check_bad_conf. It shouldn't execute run-aerospike-config and get some RED color in salt as failed. How to achieve it.
Lets say in below salt call. I want the salt not to execute anymore further if a file exist.
In below example. It should execute run-aerospike-mem_disk-check but once if it detects file exist in check_bad_conf. It shouldn't execute run-aerospike-config and get some RED color in salt execution as failed. How to achieve it.
run-aerospike-mem_disk-check:
cmd.wait:
- name: /var/local/aero_dmcheck.sh
- watch:
- file: /var/local/aero_config
check_bad_conf:
file.exist : /tmp/badconf
- failhard : yes
run-aerospike-config:
cmd.wait:
- name: /var/local/aero_config.pl
- watch:
- file: /var/local/aero_config.yml
Make it more clear please.
Why you are so badly after "RED"?
You have disk-check to be run only if the bad file exists?
If so it must not run aerospike-config?
Run once no matter if the file still exists?
cmd.wait accepts onlyif argument in which you can run command to assert file absence/presence/anything (it is exit code-driven).
However you need to know that if onlyif is not satisfied the state turns GREEN not RED
There is also creates argument that is designed exactly for running the command if the given file exists.
Refer to cmd manual
As you probably want aerospike-config to be run only if the disk-check was not run maybe it is sufficient to use file.missing like so:
check:
file.missing:
- name: /tmp/badconf
run-aerospike-config:
cmd.wait:
- name: /var/local/aero_config.pl
- watch:
- file: /var/local/aero_config.yml
- require:
- file: check
Read more about Salt requisites here
If you want your run-aerospike-mem_disk-check script to be run exactly once, why don't you use cmd.script and add stateful argument to prohibit further executions?
I actually never really used it but you can use some kind of "if-statement". Check this out:
Check file exists and create a symlink
I think in your case file.present or file.absent would fit.
Hope that helps.
How do I configure Ascending sorting on the FOSCommentBundle
I've tried the following, but I keep getting a "Maximum function nesting level"(which is set at 200) error.
fos_comment:
service:
sorting:
default: (ASC sorting service)
Any ideas? Is there any actual documentation on how to properly configure this functionality
It turns out that this is the correct config to do this. The error was actually because I needed to set my xdebug nesting level even higher.
Checkout #stof's response here: https://github.com/FriendsOfSymfony/FOSCommentBundle/issues/436
Similarly, the documentation I created for how to configure this got merged in: https://github.com/FriendsOfSymfony/FOSCommentBundle/blob/master/Resources/doc/14-customizing_tree_sorting.md
Boost.Build documentation is quite laconic when it comes to testing.
All tests in my project are defined using unit-test rule.
The only property mentioned, by the documentation, is testing.launcher, but that can only disable tests' execution when set to testing.launcher=true.
How to completely disable compilation of unit-test rules? I would like to do that temporarily, for example, by setting a property from commandline. I could not find any information how to do that or any reference documentation for other testing.* properties.
If you mean disabling them by default? You can do it by adding "explicit ;" for each unit test. If you have many such targets you can save some typing and declare a rule that does it for you, plus declaring the unit test like:
rule explicit-unit-test ( target : source : properties * )
{
unit-test $(target) : $(source) : $(properties) ;
explicit $(target) ;
}
If you want something else.. I guess you need to better explain your question because I can't think of what else you could want.
As I read most of the Boost.Build documentation and the relevant part of its code I found no way to temporary disable building specific rule or the set of targets (for example by matching tests' targets with a regular expression).
It is, also, worth noting, that unit-test was deprecated in favor of the new testing rules: run, run-fail, compile, compile-fail, link, link-fail.
Now, probably, I'm going to create my own rule, as in #GrafikRobot's answer, but instead of making the target explicit I will make the rule empty in the presence of a certain feature.
I use explicit test suites for this purpose as in
explicit X ;
test-suite X
:
[ run test1.cpp ]
[ run test2.cpp ]
[ run test3.cpp ]
[ run test4.cpp ]
;
You will need to request explicitly the execution of the tests in the test-suite X using
bjam X