Socket
Socket
Sign inDemoInstall

eslint-plugin-unicorn

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-unicorn - npm Package Compare versions

Comparing version 6.0.1 to 7.0.0

rules/no-console-spaces.js

23

index.js

@@ -13,3 +13,3 @@ 'use strict';

parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2019,
sourceType: 'module'

@@ -21,5 +21,15 @@ },

rules: {
'unicorn/catch-error-name': ['error', {name: 'error'}],
'unicorn/catch-error-name': [
'error',
{
name: 'error'
}
],
'unicorn/explicit-length-check': 'error',
'unicorn/filename-case': ['error', {case: 'kebabCase'}],
'unicorn/filename-case': [
'error',
{
case: 'kebabCase'
}
],
'unicorn/no-abusive-eslint-disable': 'error',

@@ -44,3 +54,8 @@ 'unicorn/no-process-exit': 'error',

'unicorn/prefer-add-event-listener': 'error',
'unicorn/prefer-exponentiation-operator': 'error'
'unicorn/prefer-exponentiation-operator': 'error',
'unicorn/no-console-spaces': 'error',
'unicorn/no-unreadable-array-destructuring': 'error',
'unicorn/no-unused-properties': 'off',
'unicorn/prefer-node-append': 'error',
'unicorn/prefer-query-selector': 'error'
}

@@ -47,0 +62,0 @@ }

23

package.json
{
"name": "eslint-plugin-unicorn",
"version": "6.0.1",
"version": "7.0.0",
"description": "Various awesome ESLint rules",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "nyc ava",
"test": "xo && nyc ava",
"integration": "./test/integration/test.js"

@@ -42,17 +42,18 @@ },

"lodash.upperfirst": "^4.2.0",
"safe-regex": "^1.1.0"
"safe-regex": "^2.0.1"
},
"devDependencies": {
"ava": "*",
"chalk": "^2.0.1",
"ava": "^1.1.0",
"babel-eslint": "^10.0.0",
"chalk": "^2.4.2",
"coveralls": "^3.0.0",
"del": "^3.0.0",
"eslint": "^5.0.0",
"eslint-ava-rule-tester": "^2.0.0",
"execa": "^0.10.0",
"eslint": "^5.12.0",
"eslint-ava-rule-tester": "^3.0.0",
"execa": "^1.0.0",
"listr": "^0.14.1",
"nyc": "^12.0.2",
"pify": "^3.0.0",
"nyc": "^13.1.0",
"pify": "^4.0.1",
"tempy": "^0.2.1",
"xo": "*"
"xo": "^0.23.0"
},

@@ -59,0 +60,0 @@ "peerDependencies": {

@@ -9,3 +9,5 @@ # eslint-plugin-unicorn [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master)

[**Propose or contribute a new rule ➡**](.github/contributing.md)
## Install

@@ -30,3 +32,3 @@

"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2019,
"sourceType": "module"

@@ -38,5 +40,15 @@ },

"rules": {
"unicorn/catch-error-name": ["error", {"name": "error"}],
"unicorn/catch-error-name": [
"error",
{
"name": "error"
}
],
"unicorn/explicit-length-check": "error",
"unicorn/filename-case": ["error", {"case": "kebabCase"}],
"unicorn/filename-case": [
"error",
{
"case": "kebabCase"
}
],
"unicorn/no-abusive-eslint-disable": "error",

@@ -60,3 +72,8 @@ "unicorn/no-process-exit": "error",

"unicorn/no-unsafe-regex": "off",
"unicorn/prefer-add-event-listener": "error"
"unicorn/prefer-add-event-listener": "error",
"unicorn/no-console-spaces": "error",
"unicorn/no-unreadable-array-destructuring": "error",
"unicorn/no-unused-properties": "off",
"unicorn/prefer-node-append": "error",
"unicorn/prefer-query-selector": "error"
}

@@ -92,3 +109,8 @@ }

- [prefer-add-event-listener](docs/rules/prefer-add-event-listener.md) - Prefer `addEventListener` over `on`-functions. *(fixable)*
- [prefer-exponentiation-operator](docs/rules/prefer-exponentiation-operator.md) - Prefer the exponentiation operator over `Math.pow()` *(fixable)*
- [prefer-exponentiation-operator](docs/rules/prefer-exponentiation-operator.md) - Prefer the exponentiation operator over `Math.pow()` *(fixable)*
- [no-console-spaces](docs/rules/no-console-spaces.md) - Do not use leading/trailing space between `console.log` parameters. *(fixable)*
- [no-unreadable-array-destructuring](docs/rules/no-unreadable-array-destructuring.md) - Disallow unreadable array destructuring.
- [no-unused-properties](docs/rules/no-unused-properties.md) - Disallow unused object properties.
- [prefer-node-append](docs/rules/prefer-node-append.md) - Prefer `append` over `appendChild`. *(fixable)*
- [prefer-query-selector](docs/rules/prefer-query-selector.md) - Prefer `querySelector` over `getElementById`, `querySelectorAll` over `getElementsByClassName` and `getElementsByTagName`. *(partly fixable)*

@@ -119,6 +141,5 @@

- [Sindre Sorhus](https://github.com/sindresorhus)
- [James Talmage](https://github.com/jamestalmage)
- [Jeroen Engels](https://github.com/jfmengels)
- [Sam Verschueren](https://github.com/SamVerschueren)
- [John Wu](https://github.com/johnwu93)
- [futpib](https://github.com/futpib)

@@ -125,0 +146,0 @@

@@ -51,2 +51,6 @@ 'use strict';

if (node.id === null) {
return;
}
const {name} = node.id;

@@ -53,0 +57,0 @@ const className = getClassName(name);

@@ -30,3 +30,3 @@ 'use strict';

return fixer.replaceText(node, replacement);
}
};

@@ -40,3 +40,3 @@ const create = context => {

message: 'Prefer the exponentiation operator over `Math.pow()`.',
fix: fixer => fix(context, node, fixer),
fix: fixer => fix(context, node, fixer)
});

@@ -43,0 +43,0 @@ }

@@ -64,3 +64,3 @@ 'use strict';

message,
fix: fixer => fixer.replaceTextRange(args[0].range, fixed),
fix: fixer => fixer.replaceTextRange(args[0].range, fixed)
});

@@ -67,0 +67,0 @@ }

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