mirror of
https://github.com/google/blockly.git
synced 2026-01-05 16:10:09 +01:00
refactor: Be more selective in eslint ignorance (#5955)
Rather than ignoring blockly_uncompressed.js, gulpfile.js and core/utils/global.js entirely, add suitable eslint-disable directives to those files so that they lint cleanly (and migrate gulpfile to use const instead of var).
This commit is contained in:
committed by
GitHub
parent
5078dcbc6d
commit
00a75ca048
@@ -1,10 +1,7 @@
|
||||
*_compressed*.js
|
||||
blockly_uncompressed.js
|
||||
gulpfile.js
|
||||
/msg/*
|
||||
/build/*
|
||||
/dist/*
|
||||
/core/utils/global.js
|
||||
/tests/blocks/*
|
||||
/tests/themes/*
|
||||
/tests/compile/*
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
/* eslint-disable no-var */
|
||||
|
||||
/**
|
||||
* Blockly uncompiled-mode startup code. If running in a browser
|
||||
* loads closure/goog/base.js and tests/deps.js, then (in any case)
|
||||
* requires Blockly.requires.
|
||||
*/
|
||||
(function(globalThis) {
|
||||
/* eslint-disable no-undef */
|
||||
/* eslint-disable-next-line no-undef */
|
||||
var IS_NODE_JS = !!(typeof module !== 'undefined' && module.exports);
|
||||
|
||||
if (IS_NODE_JS) {
|
||||
@@ -52,4 +54,5 @@
|
||||
// Load the rest of Blockly.
|
||||
document.write('<script>goog.require(\'Blockly\');</script>');
|
||||
}
|
||||
/* eslint-disable-next-line no-invalid-this */
|
||||
})(this);
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
goog.module('Blockly.utils.global');
|
||||
|
||||
|
||||
/* eslint-disable no-undef, no-invalid-this */
|
||||
|
||||
/**
|
||||
* Reference to the global object.
|
||||
*
|
||||
|
||||
17
gulpfile.js
17
gulpfile.js
@@ -8,16 +8,17 @@
|
||||
* @fileoverview Gulp script to build Blockly for Node & NPM.
|
||||
* Run this script by calling "npm install" in this directory.
|
||||
*/
|
||||
/* eslint-env node */
|
||||
|
||||
var gulp = require('gulp');
|
||||
const gulp = require('gulp');
|
||||
|
||||
var buildTasks = require('./scripts/gulpfiles/build_tasks');
|
||||
var packageTasks = require('./scripts/gulpfiles/package_tasks');
|
||||
var gitTasks = require('./scripts/gulpfiles/git_tasks');
|
||||
var licenseTasks = require('./scripts/gulpfiles/license_tasks');
|
||||
var appengineTasks = require('./scripts/gulpfiles/appengine_tasks');
|
||||
var releaseTasks = require('./scripts/gulpfiles/release_tasks');
|
||||
var cleanupTasks = require('./scripts/gulpfiles/cleanup_tasks');
|
||||
const buildTasks = require('./scripts/gulpfiles/build_tasks');
|
||||
const packageTasks = require('./scripts/gulpfiles/package_tasks');
|
||||
const gitTasks = require('./scripts/gulpfiles/git_tasks');
|
||||
const licenseTasks = require('./scripts/gulpfiles/license_tasks');
|
||||
const appengineTasks = require('./scripts/gulpfiles/appengine_tasks');
|
||||
const releaseTasks = require('./scripts/gulpfiles/release_tasks');
|
||||
const cleanupTasks = require('./scripts/gulpfiles/cleanup_tasks');
|
||||
|
||||
module.exports = {
|
||||
deployDemos: appengineTasks.deployDemos,
|
||||
|
||||
Reference in New Issue
Block a user