Skip to content

Commit

Permalink
Remove logging from eslint-plugin-khan (#649)
Browse files Browse the repository at this point in the history
## Summary:
The console.logs make the CI logs really noisy and they don't need to be there.

Issue: None

## Test plan:
- yarn --cwd packages/eslint-plugin-khan test

Author: kevinbarabash

Reviewers: jeresig

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Test (macos-latest, 16.x), ✅ CodeQL, ✅ Lint, typecheck, and coverage check (ubuntu-latest, 16.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ⏭  dependabot, ✅ gerald, ✅ Analyze (javascript)

Pull Request URL: #649
  • Loading branch information
kevinbarabash authored Apr 14, 2023
1 parent d486755 commit 8c838b2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-schools-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/eslint-plugin": patch
---

Remove logging
1 change: 0 additions & 1 deletion packages/eslint-plugin-khan/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable import/no-commonjs */
module.exports = {
rules: {
"no-console": "off",
"import/extensions": "off",
"import/no-commonjs": "off",
"import/order": "off",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const checkImport = (context, rootDir, importPath, node) => {
? testRulePath
: `${testRulePath}${path.sep}`;

console.log("testImportPath = ", testImportPath);
console.log("testRulePath = ", testRulePath);

// If the path is the same, then it's a match for the error.
// If the path starts with the module listed, then it's also a match.
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
const {rules} = require("../lib/index.js");
const RuleTester = require("eslint").RuleTester;

const parserPath = require.resolve("@babel/eslint-parser");
console.log("parserPath = ", parserPath);
const parserOptions = {
parser: parserPath,
parser: require.resolve("@babel/eslint-parser"),
};

const ruleTester = new RuleTester(parserOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ const path = require("path");
const {rules} = require("../lib/index.js");
const RuleTester = require("eslint").RuleTester;

const parserPath = require.resolve("@babel/eslint-parser");
console.log("parserPath = ", parserPath);
const parserOptions = {
parser: parserPath,
parser: require.resolve("@babel/eslint-parser"),
};

const ruleTester = new RuleTester(parserOptions);
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin-khan/test/sync-tag_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const rule = rules["sync-tag"];

assert(util.execSync);
util.execSync = (command) => {
// eslint-disable-next-line no-console
console.log("execSync mock --------");
if (command.includes("filea")) {
const json = JSON.stringify({
Expand Down

0 comments on commit 8c838b2

Please sign in to comment.