Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

chore(deps): update dependency @netlify/eslint-config-node to ^3.0.3 #490

Merged
merged 3 commits into from
May 30, 2021
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
824 changes: 259 additions & 565 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"yargs": "^15.4.1"
},
"devDependencies": {
"@netlify/eslint-config-node": "^3.0.1",
"@netlify/eslint-config-node": "^3.0.3",
"adm-zip": "^0.5.0",
"ava": "^2.4.0",
"cpy": "^8.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const getConfigForFunction = ({ config, func }) => {
}

// It's safe to mutate the array because it's local to this function.
// eslint-disable-next-line fp/no-mutating-methods
const matches = Object.keys(config)
.filter((expression) => minimatch(func.name, expression))
.map((expression) => {
Expand Down
1 change: 0 additions & 1 deletion src/node_dependencies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const listFilesUsingLegacyBundler = async function ({ srcPath, mainFile, srcDir,

// We sort so that the archive's checksum is deterministic.
// Mutating is fine since `Array.filter()` returns a shallow copy
// eslint-disable-next-line fp/no-mutating-methods
const filteredFiles = uniqueFiles.filter(isNotJunk).sort()
return filteredFiles
}
Expand Down
3 changes: 0 additions & 3 deletions src/node_dependencies/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ const resolvePathPreserveSymlinksForDir = function (path, basedir) {
// see https://github.com/browserify/resolve/issues/188#issuecomment-679010477
// we return the first resolved location or the first error if all failed
const resolvePathPreserveSymlinks = async function (path, baseDirs) {
// eslint-disable-next-line fp/no-let
let firstError
// eslint-disable-next-line fp/no-loops
for (const basedir of baseDirs) {
try {
// eslint-disable-next-line no-await-in-loop
return await resolvePathPreserveSymlinksForDir(path, basedir)
} catch (error) {
// eslint-disable-next-line fp/no-mutation
firstError = firstError || error
}
}
Expand Down
1 change: 0 additions & 1 deletion src/runtimes/node/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const findFunctionsInPaths = async function (paths) {
const functions = await Promise.all(paths.map(getFunctionAtPath))

// It's fine to mutate the array since its scope is local to this function.
// eslint-disable-next-line fp/no-mutating-methods
const sortedFunctions = functions.filter(Boolean).sort((fA, fB) => {
// We first sort the functions array to put directories first. This is so
// that `{name}/{name}.js` takes precedence over `{name}.js`.
Expand Down
9 changes: 3 additions & 6 deletions src/runtimes/node/native_modules/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const packageName = /^([^@][^/]*|@[^/]*\/[^/]+)(?:\/|$)/

const findNativeModule = (packageJsonPath, cache) => {
if (cache[packageJsonPath] === undefined) {
// eslint-disable-next-line fp/no-mutation, no-param-reassign, promise/prefer-await-to-then
// eslint-disable-next-line no-param-reassign, promise/prefer-await-to-then
cache[packageJsonPath] = readPackageJson(packageJsonPath).then(
(data) => [Boolean(isNativeModule(data), data), data],
() => [],
Expand All @@ -33,10 +33,8 @@ const externalNativeModulesPlugin = (externalizedModules) => ({

if (!package) return

// eslint-disable-next-line fp/no-let
let directory = args.resolveDir

// eslint-disable-next-line fp/no-loops
while (true) {
if (path.basename(directory) !== 'node_modules') {
const modulePath = path.join(directory, 'node_modules', package[1])
Expand All @@ -48,11 +46,11 @@ const externalNativeModulesPlugin = (externalizedModules) => ({
if (isNative === true) {
// eslint-disable-next-line max-depth
if (externalizedModules[args.path] === undefined) {
// eslint-disable-next-line fp/no-mutation, no-param-reassign
// eslint-disable-next-line no-param-reassign
externalizedModules[args.path] = {}
}

// eslint-disable-next-line fp/no-mutation, no-param-reassign
// eslint-disable-next-line no-param-reassign
externalizedModules[args.path][modulePath] = packageJsonData.version

return { path: args.path, external: true }
Expand All @@ -70,7 +68,6 @@ const externalNativeModulesPlugin = (externalizedModules) => ({
break
}

// eslint-disable-next-line fp/no-mutation
directory = parentDirectory
}
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/no-extraneous-dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module.exports = require('@org/test')