Skip to content

Commit

Permalink
Fix remaining lint errors and emit lint errors in travis (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
samelhusseini authored Apr 15, 2021
1 parent 331255b commit 1be2b74
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 319 deletions.
2 changes: 1 addition & 1 deletion plugins/dev-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = (env) => {
options: {
cache: true,
formatter: 'stylish',
emitWarning: true,
emitWarning: isDevelopment,
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
useEslintrc: false,
Expand Down
8 changes: 4 additions & 4 deletions plugins/dev-tools/src/common_test_helpers.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ TestSuite.prototype.testCases = [];
* callback using given test case.
*/
export function runTestCases(testCases, createTestCallback) {
testCases.forEach(/** @type {!TestCase} */(testCase) => {
testCases.forEach((testCase) => {
let testCall = (testCase.skip ? test.skip : test);
testCall = (testCase.only ? test.only : testCall);
testCall(testCase.title, createTestCallback(testCase));
Expand All @@ -66,14 +66,14 @@ export function runTestCases(testCases, createTestCallback) {

/**
* Runs provided test suite.
* @template {TestCase} T
* @template {TestSuite} T
* @param {Array<!TestSuite<T>>} testSuites The test suites to run.
* @param {function(!TestSuite<T>):(function(T):!Function)
* } createTestCaseCallback Creates test case callback using given test
* suite.
*/
export function runTestSuites(testSuites, createTestCaseCallback) {
testSuites.forEach(/** @type {!TestSuite} */(testSuite) => {
testSuites.forEach((testSuite) => {
let suiteCall = (testSuite.skip ? suite.skip : suite);
suiteCall = (testSuite.only ? suite.only : suiteCall);
suiteCall(testSuite.title, function() {
Expand All @@ -92,7 +92,7 @@ export function captureWarnings(innerFunc) {
const msgs = [];
const nativeConsoleWarn = console.warn;
try {
console.warn = function (msg) {
console.warn = function(msg) {
msgs.push(msg);
};
innerFunc();
Expand Down
Loading

0 comments on commit 1be2b74

Please sign in to comment.