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

eslint-plugin-demofortutorial

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-demofortutorial - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

.DS_Store

8

package.json
{
"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,
},
],
});
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