New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-logdna

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-logdna - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

test/fixtures/logdna-plugin-fixture

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2020-11-18, Version 3.0.0 (Stable)
* [[b6f3269db5](https://github.com/logdna/eslint-config-logdna/commit/b6f3269db5)] - **(SEMVER-MAJOR)** feat!: add eslint-plugin-logdna and associated config (Mike Del Tito)
# 2020-10-27, Version 2.0.1 (Stable)

@@ -2,0 +6,0 @@

@@ -19,3 +19,4 @@ {

"node",
"sensible"
"sensible",
"logdna"
],

@@ -223,4 +224,20 @@ "rules": {

"yoda": 0,
"sensible/check-require": [2, "always"]
"sensible/check-require": [2, "always"],
"logdna/grouped-require": 2,
"logdna/require-file-extension": 2,
"logdna/tap-consistent-assertions": [2, {
"preferredMap": {
"error": "error",
"equal": "strictEqual",
"not": "notStrictEqual",
"same": "deepEqual",
"notSame": "notDeepEqual",
"strictSame": "strictDeepEqual",
"strictNotSame": "strictDeepNotEqual",
"match": "match",
"notMatch": "notMatch",
"type": "type"
}
}]
}
}

3

package.json
{
"name": "eslint-config-logdna",
"version": "2.0.1",
"version": "3.0.0",
"description": "LogDNA's preferred eslint config to be used across all projects",

@@ -44,2 +44,3 @@ "main": "index.js",

"dependencies": {
"eslint-plugin-logdna": "^1.0.0",
"eslint-plugin-node": "^11.1.0",

@@ -46,0 +47,0 @@ "eslint-plugin-sensible": "^2.1.0"

@@ -9,2 +9,3 @@ 'use strict'

const MAX_LEN_CODE = path.join(__dirname, 'fixtures', 'max-len-fixture')
const LOGDNA_PLUGIN_CODE = path.join(__dirname, 'fixtures', 'logdna-plugin-fixture')

@@ -15,3 +16,4 @@ const readFile = fs.promises.readFile

useEslintrc: false
, configFile: 'eslintrc.json'
, cwd: __dirname
, configFile: '../eslintrc.json'
})

@@ -35,2 +37,37 @@

})
t.test('plugin-logdna', async (t) => {
const code = await readFile(LOGDNA_PLUGIN_CODE, 'utf8')
const result = cli.executeOnText(code)
t.equal(result.errorCount, 4, 'error count')
const messages = result.results[0].messages
t.equal(messages[0].ruleId, 'logdna/require-file-extension', 'file extension required')
t.equal(
messages[0].message
, 'Missing file extension for local module.'
, 'message expected file extension'
)
t.equal(messages[1].ruleId, 'logdna/grouped-require', 'require grouping')
t.equal(
messages[1].message
, 'Expected \'builtin\' require before \'local\' require.'
, 'message expected for grouped require'
)
t.equal(messages[2].ruleId, 'logdna/tap-consistent-assertions', 'consistent assertions')
t.equal(
messages[2].message
, 'The "strictEqual" alias is preferred over "isEqual"'
, 'message expected preferred alias'
)
t.equal(messages[3].ruleId, 'logdna/tap-consistent-assertions', 'consistent assertions')
t.equal(
messages[3].message
, 'The "deepEqual" alias is preferred over "same"'
, 'message expected preferred alias'
)
})
}).catch(threw)
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