eslint-plugin-demofortutorial
Advanced tools
Comparing version 0.0.1 to 0.1.0
{ | ||
"name": "eslint-plugin-demofortutorial", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "no console time", | ||
@@ -15,7 +15,5 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"requireindex": "~1.1.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eslint": "~3.9.1", | ||
"eslint": "^5.16.0", | ||
"mocha": "^3.1.2" | ||
@@ -22,0 +20,0 @@ }, |
@@ -1,26 +0,31 @@ | ||
/** | ||
* @fileoverview no console.time() | ||
* @author Allan91 | ||
*/ | ||
"use strict"; | ||
'use strict'; | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
// Requirements | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
var rule = require("../../../lib/rules/no-console-time"), | ||
let rule = require('../../../lib/rules/no-console-time'); | ||
RuleTester = require("eslint").RuleTester; | ||
let RuleTester = require('eslint').RuleTester; | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
// Tests | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
var ruleTester = new RuleTester(); | ||
ruleTester.run("no-console-time", rule, { | ||
let ruleTester = new RuleTester({ | ||
parserOptions: { | ||
ecmaVersion: 10, | ||
}, | ||
}); | ||
ruleTester.run('no-console-time', rule, { | ||
valid: [ | ||
// give me some code that won't trigger a warning | ||
'_.time({a:1});', | ||
"_.time('abc');", | ||
"_.time(['a', 'b', 'c']);", | ||
"lodash.time('abc');", | ||
'lodash.time({a:1});', | ||
'abc.time', | ||
"lodash.time(['a', 'b', 'c']);", | ||
], | ||
@@ -30,9 +35,30 @@ | ||
{ | ||
code: "console.time('test');", | ||
errors: [{ | ||
message: "Fill me in.", | ||
type: "Me too" | ||
}] | ||
} | ||
] | ||
code: 'console.time()', | ||
errors: [ | ||
{ | ||
messageId: 'avoidMethod', | ||
}, | ||
], | ||
}, | ||
{ | ||
code: "console.time.call({}, 'hello')", | ||
errors: [ | ||
{ | ||
messageId: 'avoidMethod', | ||
}, | ||
], | ||
}, | ||
{ | ||
code: "console.time.apply({}, ['hello'])", | ||
errors: [ | ||
{ | ||
messageId: 'avoidMethod', | ||
}, | ||
], | ||
}, | ||
{ | ||
code: 'console.time.call(new Int32Array([1, 2, 3, 4, 5]));', | ||
errors: 1, | ||
}, | ||
], | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11128
0
7
112
1
- Removedrequireindex@~1.1.0
- Removedrequireindex@1.1.0(transitive)