Socket
Socket
Sign inDemoInstall

@eslint/eslintrc

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint/eslintrc - npm Package Compare versions

Comparing version 1.4.1 to 2.0.0

33

lib/flat-compat.js

@@ -56,13 +56,2 @@ /**

// check for special settings for eslint:all and eslint:recommended:
if (eslintrcConfig.settings) {
if (eslintrcConfig.settings["eslint:all"] === true) {
return ["eslint:all"];
}
if (eslintrcConfig.settings["eslint:recommended"] === true) {
return ["eslint:recommended"];
}
}
// copy over simple translations

@@ -219,3 +208,5 @@ for (const key of keysToCopy) {

baseDirectory = process.cwd(),
resolvePluginsRelativeTo = baseDirectory
resolvePluginsRelativeTo = baseDirectory,
recommendedConfig,
allConfig
} = {}) {

@@ -227,4 +218,18 @@ this.baseDirectory = baseDirectory;

resolvePluginsRelativeTo,
getEslintAllConfig: () => ({ settings: { "eslint:all": true } }),
getEslintRecommendedConfig: () => ({ settings: { "eslint:recommended": true } })
getEslintAllConfig: () => {
if (!allConfig) {
throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor.");
}
return allConfig;
},
getEslintRecommendedConfig: () => {
if (!recommendedConfig) {
throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor.");
}
return recommendedConfig;
}
});

@@ -231,0 +236,0 @@ }

{
"name": "@eslint/eslintrc",
"version": "1.4.1",
"version": "2.0.0",
"description": "The legacy ESLintRC config file format for ESLint",

@@ -5,0 +5,0 @@ "type": "module",

@@ -25,2 +25,3 @@ # ESLintRC Library

import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import path from "path";

@@ -34,4 +35,6 @@ import { fileURLToPath } from "url";

const compat = new FlatCompat({
baseDirectory: __dirname, // optional; default: process.cwd()
resolvePluginsRelativeTo: __dirname // optional
baseDirectory: __dirname, // optional; default: process.cwd()
resolvePluginsRelativeTo: __dirname, // optional
recommendedConfig: js.configs.recommended, // optional
allConfig: js.configs.all, // optional
});

@@ -38,0 +41,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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