Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/flow-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const childProcess = require('child_process')
const flow = require('flow-bin')
const fs = require('fs')
const path = require('path')
const {join} = require('path')

const execFile = (file, args) =>
new Promise((resolve, reject) => {
Expand Down Expand Up @@ -86,7 +86,7 @@ async function grepFlowFiles() {
;(async function() {
let threshold = 0

const packageJsonPath = path.join(process.cwd(), 'package.json')
const packageJsonPath = join(process.cwd(), 'package.json')
if (fs.existsSync(packageJsonPath)) {
const packageJson = require(packageJsonPath)
threshold = (packageJson.flow && packageJson.flow.coverageThreshold) || 0
Expand Down
1 change: 1 addition & 0 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = {
'no-regex-spaces': 'error',
'no-return-assign': 'error',
'no-self-assign': 'error',
'no-shadow': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/dependency-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ module.exports = {

checkEntriesWhitelist(filename)

function recordImport(filename, symbol) {
let symbols = imports.get(filename)
function recordImport(importPath, symbol) {
let symbols = imports.get(importPath)
if (!symbols) {
symbols = new Set()
imports.set(filename, symbols)
imports.set(importPath, symbols)
}

if (symbol) {
Expand Down