mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Enable ts-check
This commit is contained in:
parent
019f23ed01
commit
5a96f231c1
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// @ts-check
|
||||
'use strict';
|
||||
|
||||
var updateGrammar = require('../../../build/npm/update-grammar');
|
||||
|
@ -18,10 +19,10 @@ function removeDom(grammar) {
|
|||
|
||||
function adaptToJavaScript(grammar, replacementScope) {
|
||||
grammar.name = 'JavaScript (with React support)';
|
||||
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs' ];
|
||||
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs'];
|
||||
grammar.scopeName = `source${replacementScope}`;
|
||||
|
||||
var fixScopeNames = function(rule) {
|
||||
var fixScopeNames = function (rule) {
|
||||
if (typeof rule.name === 'string') {
|
||||
rule.name = rule.name.replace(/\.tsx/g, replacementScope);
|
||||
}
|
||||
|
@ -47,8 +48,3 @@ updateGrammar.update(tsGrammarRepo, 'TypeScript.tmLanguage', './syntaxes/TypeScr
|
|||
updateGrammar.update(tsGrammarRepo, 'TypeScriptReact.tmLanguage', './syntaxes/TypeScriptReact.tmLanguage.json', grammar => removeDom(grammar));
|
||||
updateGrammar.update(tsGrammarRepo, 'TypeScriptReact.tmLanguage', '../javascript/syntaxes/JavaScript.tmLanguage.json', grammar => adaptToJavaScript(removeDom(grammar), '.js'));
|
||||
updateGrammar.update(tsGrammarRepo, 'TypeScriptReact.tmLanguage', '../javascript/syntaxes/JavaScriptReact.tmLanguage.json', grammar => adaptToJavaScript(removeDom(grammar), '.js.jsx'));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue