ESlint error: const keyword is reserved in Brakets ide - constants

I have update ecmascript-5 to ecmascript-6 but it is still showing this error. I cannot understand how to solve it.

Related

Facing a problem to set up the emulator in flutter

I have the following problem.....
Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
int _counter = 0;dsggfsgfh;
^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
I'm a beginner with Flutter. How can I solve this problem?
Your code has junk words or sentences, check your line ended with dsggfsgfh; which might be added unfortunately. Just remove it this will work.
It's possible that it's a compatibility issue between flutter framework and engine. You can try and:
Upgrade flutter to the latest version
Create a new project
Copy the code from the old project in steps
If you have plugins from the old project, add them one by one as you run the emulator
(It's possible that a certain version of a plugin has a compatibility issue with flutter)

Groovy:General error during semantic analysis: java.lang.NoSuchMethodError:

Imported the gradle project from the "complete" folder and received the following error:
Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'
I am using the latest version of Eclipse, 2020-12, with groovy tools installed.
From grails guide
https://guides.grails.org/gorm-without-grails/guide/index.html
Downloaded code sample from github
https://github.com/grails-guides/gorm-without-grails.git
It seems likely to be a version mismatch, but I cannot determine how to correct this problem.
I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.
The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?
I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.
The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94

What does the rust-analyzer error "could not resolve macro `$crate::format_args`" mean and how do I fix it?

I'm using rust-analyzer version 0.2.408 on Visual Studio Code.
I'm writing a command line application that involves centering text in the terminal. This is the function I wrote to do this:
use console::{Alignment, pad_str};
fn get_padded_row(row: &str, width: u16, symbol: Option<char>) -> String {
let symbol = symbol.unwrap_or(' ');
return pad_str(row, width as usize, Alignment::Center, None)
.to_string()
.replace(' ', &symbol.to_string());
}
This function works perfectly fine, and there were no errors with it. Then I wrote a test:
#[cfg(test)]
mod tests {
use crate::get_padded_row;
#[test]
fn row_padding_dashes() {
let padded_row = get_padded_row("hello", 15, Some('-'));
assert_eq!(
padded_row, "-----hello-----".to_string(),
"`get_padded_row` was not correct, got `{}`", padded_row
);
}
}
The code still works perfectly fine. Both cargo run and cargo test work, the function passes the test, and cargo check returns no issues. But rust-analyzer gives an error, highlighting everything from the tr}; in the use statement to the p right after return: "could not resolve macro $crate::format_args rust-analyzer(macro-error)". Searching for this error returns nothing. VSCode links me to rust-analyzer user manual, which says only "This diagnostic is shown for macro expansion errors". Restarting VSCode and reinstalling rust-analyzer have done nothing. The error always comes back, and highlighting the same oddly specific region. The only way I've found to get rid of it while keeping rust-analyzer installed is to remove the test.
Judging from how the error is about macro expansion, and how removing the test fixes the issue, I'd imagine it's caused by the #[test] macro, but it's strange that rustc finds no issues at all with my code while rust-analyzer is freaking out about this error. So far, I've had better experiences with rust-analyzer than with the official Rust VSCode extension, but I'm on the verge of switching back to fix this issue.
This is a bug in rust-analyzer. For now, you can disable the warning in your settings.json:
"rust-analyzer.diagnostics.disabled": [
"macro-error"
]
The bug was fixed on nightly, so you could install the nightly binary of rust-analyzer from GitHub, or you could just wait a couple days for the fix to land on stable.
Alternatively, you could downgrade to rls version 0.2.400, because the bug was caused by a commit in version 0.2.408:
Extensions Icon -> rust-analyzer -> Manage (gear icon) -> Install Another Version
Three months later and there seems to be a bug with Nightly release? Unsure.
I added unresolved-macro-call to Diagnostics: Disabled settings for rust-analyzer.
I've tried many things, read the open issue on github, etc which is tagged as solved, but persists here.
For vscode users, open settings (json) and disable by adding:
"rust-analyzer.procMacro.enable": false

ag-grid 'IToolPanel' is declared but its value is never read

after updating to version 19 and ag-grid-community package. I'm getting following error while running ng serve:
ERROR in node_modules/ag-grid-angular/src/interfaces.ts(20,5): error TS6133: 'IToolPanel' is declared but its value is never
read.
I couldn't find any other stackoverflow question / github issue created about it.
This issue happens when you have noUnusedLocals in your tsconfig enabled.
I've reported this to ag-grid team again and they recognized that as a bug. Fix should be released in v20 version by the end of 2018.

Over 1700 errors compiling vscode, what is configured incorrectly?

I am following the GitHub instructions to contribute to the Visual Studio Code (vscode) project. The instructions I am following are here:
https://github.com/Microsoft/vscode/wiki/How-to-Contribute
I am on Windows 10 and therefore following the Windows-specific instructions.
When I run 'npm run watch' after fulfilling the pre-requisites, I get over 1700 errors when it attempts to build.
Sample errors:
[16:56:59] Finished 'clean-client' after 3.78 s
[16:56:59] Starting 'watch-client'...
[16:57:25] Error:E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(22,21): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(23,15): Cannot find name 'Object'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(40,31): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(44,80): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(50,22): Cannot find name 'Number'.
The full error list is here:
http://pastebin.com/wJgEQ18m
I am trying to find out how to troubleshoot and correct these errors. So far I have not found anything online to point me to what I did wrong in setting things up.
It turns out this was caused by a bug in the gulp-tsb project, which was just fixed with the commit below.
https://github.com/jrieken/gulp-tsb/commit/ea84a0a16a631410071ae96336ac9f3842ec41b0
Upgrading to the new gulp and typescript tools fixed the problem.