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

eslint-output

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-output - npm Package Compare versions

Comparing version 1.2.3 to 2.0.0

40

app.js
#!/usr/bin/env node
const CLIEngine = require('eslint').CLIEngine;
const { CLIEngine } = require('eslint');
const path = require('path');

@@ -16,14 +16,11 @@ const yargs = require('yargs');

const cli = new CLIEngine(
Object.assign(
{
envs: ['browser', 'mocha'],
useEslintrc: true,
},
rc.cliEngineConfig,
{ cwd },
),
);
const config = {
useEslintrc: true,
...(rc.cliEngineConfig || {}),
cwd,
};
const filesToVerify = rc.files || ['.'];
const report = cli.executeOnFiles(rc.files || ['.']);
const cli = new CLIEngine(config);
const report = cli.executeOnFiles(filesToVerify);

@@ -41,5 +38,3 @@ if (quiet) {

return debug(
`a 'path' prop is required for this format (${
format.name
}), please specify and run again`,
`a 'path' prop is required for this format (${format.name}), please specify and run again`,
);

@@ -57,3 +52,3 @@ }

let formats = rc.formats;
let { formats } = rc;

@@ -65,3 +60,3 @@ if (!Array.isArray(rc.formats)) {

formats.forEach(format => {
formats.forEach((format) => {
const formatter = cli.getFormatter(format.name);

@@ -76,8 +71,11 @@ if (formatter) {

if (
report.errorCount > 0 ||
(typeof maxWarnings === 'number' && report.warningCount > maxWarnings)
) {
const isRunFailed = () => {
const exceededMaxWarnings =
typeof maxWarnings === 'number' && report.warningCount > maxWarnings;
return report.errorCount > 0 || exceededMaxWarnings;
};
if (isRunFailed()) {
process.exitCode = 1;
debug('exited with code: 1');
}

@@ -1,4 +0,8 @@

const rc = require('rc');
const { cosmiconfigSync } = require('cosmiconfig');
module.exports = rc('eslintoutput', {
const explorerSync = cosmiconfigSync('eslintoutput');
const searchedFor = explorerSync.search();
module.exports = {
files: ['.'],

@@ -11,2 +15,3 @@ formats: [

],
});
...searchedFor.config,
};
{
"name": "eslint-output",
"version": "1.2.3",
"version": "2.0.0",
"description": "export multiple formats of eslint",

@@ -27,3 +27,3 @@ "keywords": [

"lint:fix": "eslint --fix .",
"lint:outputs": "node app.js",
"lint:outputs": "DEBUG=true node app.js",
"publish": "git push origin --tags && git push origin",

@@ -35,15 +35,16 @@ "release:patch": "npm version patch && npm publish --access public",

"dependencies": {
"debug": "^4.1.0",
"rc": "^1.2.8",
"write": "^1.0.3",
"yargs": "^13.2.4"
"cosmiconfig": "^6.0.0",
"debug": "^4.1.1",
"write": "^2.0.0",
"yargs": "^15.3.1"
},
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-plugin-import": "^2.14.0"
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.2"
},
"peerDependencies": {
"eslint": ">=3"
"eslint": ">=6"
}
}

@@ -1,3 +0,2 @@

eslint-output
========
# eslint-output

@@ -10,2 +9,3 @@ [![npm version](https://badge.fury.io/js/eslint-output.svg)](https://badge.fury.io/js/eslint-output)

Install `eslint-output` using `npm` or your favorite node modules manager.
```shell

@@ -22,3 +22,2 @@ npm i --save-dev eslint-output

**Example `.eslintoutputrc`**

@@ -45,2 +44,3 @@

##### Commad line options
```

@@ -57,1 +57,4 @@ --quiet Don't report warnings, only errors

### Breaking changes
- removed explicitly setting `env: [''browser', 'mocha']`
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