Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint_d

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint_d - npm Package Compare versions

Comparing version 11.0.0 to 11.1.0

9

lib/eslint-path.js

@@ -5,9 +5,12 @@ 'use strict';

exports.resolve = function (cwd) {
exports.resolve = function (cwd, eslint_path) {
if (!eslint_path) {
eslint_path = 'eslint';
}
try {
return resolver.resolve('eslint', { paths: [cwd] });
return resolver.resolve(eslint_path, { paths: [cwd] });
} catch (e) {
// module not found
return resolver.resolve('eslint');
return resolver.resolve(eslint_path);
}
};

@@ -87,9 +87,9 @@ /* eslint-disable no-sync */

function createCache(cwd) {
const eslintPath = eslint_path.resolve(cwd);
function createCache(cwd, eslint_path_arg) {
const absolute_eslint_path = eslint_path.resolve(cwd, eslint_path_arg);
return eslintCache.set(cwd, {
eslint: require(eslintPath),
eslint: require(absolute_eslint_path),
// use chalk from eslint
chalk: require(resolver.resolve('chalk', {
paths: [path.dirname(eslintPath)]
paths: [path.dirname(absolute_eslint_path)]
}))

@@ -282,8 +282,17 @@ });

let eslint_path_arg;
const eslint_path_arg_index = args.indexOf('--eslint-path');
if (eslint_path_arg_index !== -1) {
eslint_path_arg = args[eslint_path_arg_index].split('=')[1];
if (!eslint_path_arg) {
eslint_path_arg = args[eslint_path_arg_index + 1];
}
}
let cache = eslintCache.get(cwd);
if (!cache) {
cache = createCache(cwd);
cache = createCache(cwd, eslint_path_arg);
} else if (mtime > cache.last_run) {
clearRequireCache(cwd);
cache = createCache(cwd);
cache = createCache(cwd, eslint_path_arg);
}

@@ -290,0 +299,0 @@ cache.last_run = Date.now();

@@ -61,2 +61,7 @@ 'use strict';

},
{
option: 'eslint-path',
type: 'path::String',
description: 'Specify the path to the eslint module to use',
},

@@ -63,0 +68,0 @@ {

@@ -62,2 +62,7 @@ 'use strict';

},
{
option: 'eslint-path',
type: 'path::String',
description: 'Specify the path to the eslint module to use',
},

@@ -64,0 +69,0 @@ {

{
"name": "eslint_d",
"version": "11.0.0",
"version": "11.1.0",
"description": "Makes eslint the fastest linter on the planet",

@@ -30,3 +30,4 @@ "bin": "bin/eslint_d.js",

"Jose Alvarez <j.alvarez11@icloud.com>",
"Damien Cassou <damien@cassou.me>"
"Damien Cassou <damien@cassou.me>",
"James Pulec <jpulec@gmail.com>"
],

@@ -33,0 +34,0 @@ "homepage": "https://github.com/mantoni/eslint_d.js",

@@ -197,3 +197,3 @@ # eslint\_d

- `11.0.0`: eslint 4 - 8.beta, node 12 - 16
- `11.0.0`: eslint 4 - 8, node 12 - 16
- `10.0.0`: eslint 4 - 7, node 10 - 14 (using new `ESLint` API if available)

@@ -200,0 +200,0 @@ - `9.0.0`: eslint 4 - 7, node 10 - 14 (using `CLIEngine` API)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc