eslint-config-logdna
Advanced tools
Comparing version 2.0.1 to 3.0.0
@@ -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" | ||
} | ||
}] | ||
} | ||
} |
{ | ||
"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) |
15411
13
332
3
+ Addedeslint-plugin-logdna@^1.0.0
+ Addedbuiltin-modules@3.3.0(transitive)
+ Addeddot-prop@5.3.0(transitive)
+ Addedeslint-plugin-logdna@1.0.1(transitive)
+ Addedis-builtin-module@3.2.1(transitive)
+ Addedis-obj@2.0.0(transitive)