Fix Jest and Prettify Checks (#15544)

* Fix jest and prettify checks

* Remove defaultQueryContext and run jest again

---------

Co-authored-by: Ghazanfar-CFLT <mghazanfar@confluent.io>
This commit is contained in:
Parth Agrawal 2024-03-09 04:06:26 +05:30 committed by GitHub
parent 2816121ef0
commit 3aec90563e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

View File

@ -46,6 +46,7 @@ The console relies on [eslint](https://eslint.org) (and various plugins), [sass-
#### Configuring WebStorm #### Configuring WebStorm
- **Preferences | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint** - **Preferences | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint**
- Select "Automatic ESLint Configuration" - Select "Automatic ESLint Configuration"
- Check "Run eslint --fix on save" - Check "Run eslint --fix on save"
@ -55,6 +56,7 @@ The console relies on [eslint](https://eslint.org) (and various plugins), [sass-
- Check "On save" - Check "On save"
#### Configuring VS Code #### Configuring VS Code
- Install `dbaeumer.vscode-eslint` extension - Install `dbaeumer.vscode-eslint` extension
- Install `esbenp.prettier-vscode` extension - Install `esbenp.prettier-vscode` extension
- Open User Settings (JSON) and set the following: - Open User Settings (JSON) and set the following:
@ -67,10 +69,11 @@ The console relies on [eslint](https://eslint.org) (and various plugins), [sass-
``` ```
#### Auto-fixing manually #### Auto-fixing manually
It is also possible to auto-fix and format code without making IDE changes by running the following script: It is also possible to auto-fix and format code without making IDE changes by running the following script:
- `npm run autofix` &mdash; run code linters and formatter - `npm run autofix` &mdash; run code linters and formatter
You could also run fixers individually: You could also run fixers individually:
- `npm run eslint-fix` &mdash; run code linter and fix issues - `npm run eslint-fix` &mdash; run code linter and fix issues

View File

@ -139,7 +139,7 @@ ace.define(
this.lineCommentStart = '--'; this.lineCommentStart = '--';
this.$id = 'ace/mode/dsql'; this.$id = 'ace/mode/dsql';
}.call(Mode.prototype)); }).call(Mode.prototype);
exports.Mode = Mode; exports.Mode = Mode;
}, },

View File

@ -25,15 +25,15 @@
ace.define( ace.define(
'ace/mode/hjson_highlight_rules', 'ace/mode/hjson_highlight_rules',
['require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules'], ['require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules'],
function(acequire, exports, module) { function (acequire, exports, module) {
'use strict'; 'use strict';
var oop = acequire('../lib/oop'); var oop = acequire('../lib/oop');
var TextHighlightRules = acequire('./text_highlight_rules').TextHighlightRules; var TextHighlightRules = acequire('./text_highlight_rules').TextHighlightRules;
var HjsonHighlightRules = function() { var HjsonHighlightRules = function () {
this.$rules = { this.$rules = {
start: [ 'start': [
{ {
include: '#comments', include: '#comments',
}, },
@ -277,23 +277,23 @@ ace.define(
'ace/mode/text', 'ace/mode/text',
'ace/mode/hjson_highlight_rules', 'ace/mode/hjson_highlight_rules',
], ],
function(acequire, exports, module) { function (acequire, exports, module) {
'use strict'; 'use strict';
var oop = acequire('../lib/oop'); var oop = acequire('../lib/oop');
var TextMode = acequire('./text').Mode; var TextMode = acequire('./text').Mode;
var HjsonHighlightRules = acequire('./hjson_highlight_rules').HjsonHighlightRules; var HjsonHighlightRules = acequire('./hjson_highlight_rules').HjsonHighlightRules;
var Mode = function() { var Mode = function () {
this.HighlightRules = HjsonHighlightRules; this.HighlightRules = HjsonHighlightRules;
}; };
oop.inherits(Mode, TextMode); oop.inherits(Mode, TextMode);
(function() { (function () {
this.lineCommentStart = '//'; this.lineCommentStart = '//';
this.blockComment = { start: '/*', end: '*/' }; this.blockComment = { start: '/*', end: '*/' };
this.$id = 'ace/mode/hjson'; this.$id = 'ace/mode/hjson';
}.call(Mode.prototype)); }).call(Mode.prototype);
exports.Mode = Mode; exports.Mode = Mode;
}, },