mirror of https://github.com/apache/druid.git
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:
parent
2816121ef0
commit
3aec90563e
|
@ -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` — run code linters and formatter
|
- `npm run autofix` — run code linters and formatter
|
||||||
|
|
||||||
You could also run fixers individually:
|
You could also run fixers individually:
|
||||||
|
|
||||||
- `npm run eslint-fix` — run code linter and fix issues
|
- `npm run eslint-fix` — run code linter and fix issues
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue