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 4.2.1 to 5.0.0

15

.eslintrc.json

@@ -233,18 +233,5 @@ {

"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"
}
}],
"logdna/tap-no-deprecated-aliases": 2,
"sensible/check-require": [2, "always"]
}
}

21

CHANGELOG.md
## Changelog
# [5.0.0](https://github.com/logdna/eslint-config-logdna/compare/v4.2.1...v5.0.0) (2021-04-16)
### Features
* **rules**: switch to tap-no-deprecated-aliases rule [9ee6480](https://github.com/logdna/eslint-config-logdna/commit/9ee64807d7056ae42988c5597ca19695cbc12960) - Mike Del Tito
### **BREAKING CHANGES**
* **rules:** Un-aliased tap assertion methods will now be enforced
tap@15.0.0 deprecated the use of aliases for assertion methods, which
invalidates the concept of a "preferred" alias. This switches over to
a new rule for requiring the use of un-aliased assertion methods.
This rule is auto-fixable, and the changes it enforces are backwards
compatible with older versions of tap.
Ref: LOG-9396
## [4.2.1](https://github.com/logdna/eslint-config-logdna/compare/v4.2.0...v4.2.1) (2021-04-16)

@@ -4,0 +25,0 @@

{
"name": "eslint-config-logdna",
"version": "4.2.1",
"version": "5.0.0",
"description": "LogDNA's preferred eslint config to be used across all projects",

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

"test": "tools/test.sh",
"tap": "tap",
"release": "semantic-release",

@@ -45,3 +46,3 @@ "release:dry": "npm run release -- --dry-run --no-ci --branches ${BRANCH_NAME:-main}"

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

@@ -48,0 +49,0 @@ "eslint-plugin-sensible": "^2.3.1"

@@ -19,3 +19,3 @@ 'use strict'

const result = cli.executeOnText(code)
t.strictEqual(result.errorCount, 0, 'error count')
t.equal(result.errorCount, 0, 'error count')
}).catch(threw)

@@ -16,4 +16,4 @@ 'use strict'

const result = cli.executeOnFiles(['no-eol-fixture'])
t.strictEqual(result.errorCount, 1, 'error count')
t.strictEqual(result.results[0].messages[0].ruleId, 'eol-last', 'missing newline')
t.equal(result.errorCount, 1, 'error count')
t.equal(result.results[0].messages[0].ruleId, 'eol-last', 'missing newline')
})

@@ -23,6 +23,6 @@

const result = cli.executeOnFiles(['max-len-fixture'])
t.strictEqual(result.errorCount, 1, 'error count')
t.equal(result.errorCount, 1, 'error count')
const messages = result.results[0].messages
t.strictEqual(messages[0].ruleId, 'max-len', 'max length exceeded')
t.equal(messages[0].ruleId, 'max-len', 'max length exceeded')
t.match(

@@ -37,4 +37,4 @@ messages[0].message

const result = cli.executeOnFiles(['no-debugger-fixture'])
t.strictEqual(result.errorCount, 1, 'error count')
t.strictEqual(result.results[0].messages[0].ruleId, 'no-debugger', 'missing newline')
t.equal(result.errorCount, 1, 'error count')
t.equal(result.results[0].messages[0].ruleId, 'no-debugger', 'missing newline')
})

@@ -45,5 +45,5 @@

const messages = result.results[0].messages
t.strictEqual(result.errorCount, 5, 'error count')
t.equal(result.errorCount, 6, 'error count')
t.strictEqual(
t.equal(
messages[0].ruleId

@@ -53,3 +53,3 @@ , 'logdna/require-file-extension'

)
t.strictEqual(
t.equal(
messages[0].message

@@ -60,3 +60,3 @@ , 'Missing file extension for local module.'

t.strictEqual(
t.equal(
messages[1].ruleId

@@ -66,3 +66,3 @@ , 'sensible/check-require'

)
t.strictEqual(
t.equal(
messages[1].message

@@ -73,4 +73,4 @@ , 'Missing require: ./test/basic. Path does not exist'

t.strictEqual(messages[2].ruleId, 'logdna/grouped-require', 'require grouping')
t.strictEqual(
t.equal(messages[2].ruleId, 'logdna/grouped-require', 'require grouping')
t.equal(
messages[2].message

@@ -81,23 +81,34 @@ , 'Expected \'builtin\' require before \'local\' require.'

t.strictEqual(
t.equal(
messages[3].ruleId
, 'logdna/tap-consistent-assertions'
, 'consistent assertions'
, 'logdna/tap-no-deprecated-aliases'
, 'no deprecated assertions'
)
t.strictEqual(
t.equal(
messages[3].message
, 'The "strictEqual" alias is preferred over "isEqual"'
, 'message expected preferred alias'
, 'The "isEqual" alias is deprecated in favor of "equal"'
, 'message expected non-deprecated method'
)
t.strictEqual(
t.equal(
messages[4].ruleId
, 'logdna/tap-consistent-assertions'
, 'consistent assertions'
, 'logdna/tap-no-deprecated-aliases'
, 'no deprecated assertions'
)
t.strictEqual(
t.equal(
messages[4].message
, 'The "deepEqual" alias is preferred over "same"'
, 'message expected preferred alias'
, 'The "deepEqual" alias is deprecated in favor of "same"'
, 'message expected non-deprecated method'
)
t.equal(
messages[5].ruleId
, 'logdna/tap-no-deprecated-aliases'
, 'no deprecated assertions'
)
t.equal(
messages[5].message
, 'The "tearDown" alias is deprecated in favor of "teardown"'
, 'message expected non-deprecated method'
)
})

@@ -123,7 +134,7 @@ }).catch(threw)

const result = cli.executeOnText(code)
t.strictEqual(result.errorCount, 1, 'error count')
t.equal(result.errorCount, 1, 'error count')
const messages = result.results[0].messages
t.strictEqual(messages[0].ruleId, 'arrow-parens', 'arrow-parens is the rule id')
t.strictEqual(
t.equal(messages[0].ruleId, 'arrow-parens', 'arrow-parens is the rule id')
t.equal(
messages[0].message

@@ -139,6 +150,6 @@ , 'Expected parentheses around arrow function argument.'

const result = cli.executeOnText(code)
t.strictEqual(result.errorCount, 1, 'error count')
t.equal(result.errorCount, 1, 'error count')
const messages = result.results[0].messages
t.strictEqual(
t.equal(
messages[0].ruleId

@@ -148,3 +159,3 @@ , 'arrow-body-style'

)
t.strictEqual(
t.equal(
messages[0].message

@@ -160,7 +171,7 @@ , 'Expected block statement surrounding arrow body.'

const result = cli.executeOnText(code)
t.strictEqual(result.errorCount, 1, 'error count')
t.equal(result.errorCount, 1, 'error count')
const messages = result.results[0].messages
t.strictEqual(messages[0].ruleId, 'func-style', 'func-style is the rule id')
t.strictEqual(
t.equal(messages[0].ruleId, 'func-style', 'func-style is the rule id')
t.equal(
messages[0].message

@@ -167,0 +178,0 @@ , 'Expected a function declaration.'

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