New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-uploadcare

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-config-uploadcare - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.release-it.json

0

.eslintrc.js

@@ -0,0 +0,0 @@ module.exports = {

@@ -5,3 +5,4 @@ module.exports = {

'./lib/rules/stylistic.js',
'./lib/rules/react.js',
].map(require.resolve),
}

161

lib/rules/best-practices.js

@@ -5,135 +5,154 @@ 'use strict'

rules: {
/* Enforces getter/setter pairs in objects */
/* Enforces getter/setter pairs in objects */
'accessor-pairs': 0,
/* treat var statements as if they were block scoped */
/* treat var statements as if they were block scoped */
'block-scoped-var': 0,
/* specify the maximum cyclomatic complexity allowed in a program */
/* specify the maximum cyclomatic complexity allowed in a program */
'complexity': [0, 11],
/* require return statements to either always or never specify values */
/* require return statements to either always or never specify values */
'consistent-return': 0,
/* specify curly brace conventions for all control statements */
/* specify curly brace conventions for all control statements */
'curly': [0, 'all'],
/* require default case in switch statements */
/* require default case in switch statements */
'default-case': 0,
/* enforces consistent newlines before or after dots */
/* enforces consistent newlines before or after dots */
'dot-location': 0,
/* encourages use of dot notation whenever possible */
/* encourages use of dot notation whenever possible */
'dot-notation': [0, {allowKeywords: true}],
/* require the use of === and !== */
'eqeqeq': 0,
/* make sure for-in loops have an if statement */
/* require the use of === and !== */
'eqeqeq': 2,
/* make sure for-in loops have an if statement */
'guard-for-in': 0,
/* disallow the use of alert, confirm, and prompt */
/* disallow the use of alert, confirm, and prompt */
'no-alert': 0,
/* disallow use of arguments.caller or arguments.callee */
/* disallow use of arguments.caller or arguments.callee */
'no-caller': 0,
/* disallow lexical declarations in case clauses */
/* disallow lexical declarations in case clauses */
'no-case-declarations': 0,
/* disallow the use of console */
/* disallow the use of console */
'no-console': ['error'],
/* disallow division operators explicitly at beginning of regular expression */
/* disallow division operators explicitly at beginning of regular expression */
'no-div-regex': 0,
/* disallow duplicate arguments in function definitions */
/* disallow duplicate arguments in function definitions */
'no-dupe-args': 'error',
/* disallow duplicate keys in object literals */
/* disallow duplicate keys in object literals */
'no-dupe-keys': 'error',
/* disallow a duplicate case label */
/* disallow a duplicate case label */
'no-duplicate-case': 'error',
/* disallow else after a return in an if */
/* disallow else after a return in an if */
'no-else-return': 0,
/* disallow empty block statements */
/* disallow empty block statements */
'no-empty': 0,
/* disallow use of empty destructuring patterns */
/* disallow use of empty destructuring patterns */
'no-empty-pattern': 0,
/* disallow comparisons to null without a type-checking operator */
/* disallow comparisons to null without a type-checking operator */
'no-eq-null': 0,
/* disallow use of eval() */
/* disallow use of eval() */
'no-eval': 0,
/* disallow adding to native types */
/* disallow adding to native types */
'no-extend-native': 0,
/* disallow unnecessary function binding */
/* disallow unnecessary function binding */
'no-extra-bind': 0,
/* disallow fallthrough of case statements */
/* disallow fallthrough of case statements */
'no-fallthrough': 2,
/* disallow the use of leading or trailing decimal points in numeric literals */
/* disallow the use of leading or trailing decimal points in numeric literals */
'no-floating-decimal': 0,
/* disallow the type conversions with shorter notations */
/* disallow the type conversions with shorter notations */
'no-implicit-coercion': 0,
/* disallow use of eval()-like methods */
/* disallow use of eval()-like methods */
'no-implied-eval': 0,
/* disallow this keywords outside of classes or class-like objects */
/* disallow this keywords outside of classes or class-like objects */
'no-invalid-this': 0,
/* disallow usage of __iterator__ property */
/* disallow usage of __iterator__ property */
'no-iterator': 0,
/* disallow use of labeled statements */
/* disallow use of labeled statements */
'no-labels': 0,
/* disallow unnecessary nested blocks */
/* disallow unnecessary nested blocks */
'no-lone-blocks': 0,
/* disallow creation of functions within loops */
/* disallow creation of functions within loops */
'no-loop-func': 0,
/* disallow the use of magic numbers */
/* disallow the use of magic numbers */
'no-magic-numbers': 0,
/* disallow use of multiple spaces */
/* disallow use of multiple spaces */
'no-multi-spaces': 0,
/* disallow use of multiline strings */
/* disallow use of multiline strings */
'no-multi-str': 0,
/* disallow reassignments of native objects */
/* disallow reassignments of native objects */
'no-native-reassign': 0,
/* disallow use of new operator for Function object */
/* disallow use of new operator for Function object */
'no-new-func': 0,
/* disallows creating new instances of String,Number, and Boolean */
/* disallows creating new instances of String,Number, and Boolean */
'no-new-wrappers': 0,
/* disallow use of new operator when not part of the assignment or comparison */
/* disallow use of new operator when not part of the assignment or comparison */
'no-new': 0,
/* disallow use of octal escape sequences in string literals, such as */
/* var foo = 'Copyright \251'; */
/* disallow use of octal escape sequences in string literals, such as */
/* var foo = 'Copyright \251'; */
'no-octal-escape': 0,
/* disallow use of (old style) octal literals */
/* disallow use of (old style) octal literals */
'no-octal': 2,
/* disallow reassignment of function parameters */
'no-param-reassign': [2, {props: false}],
/* disallow use of process.env */
/* disallow reassignment of function parameters */
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: [
'acc', // for reduce accumulators
'accumulator', // for reduce accumulators
'e', // for e.returnvalue
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
'response', // for Express responses
],
},
],
/* disallow use of process.env */
'no-process-env': 0,
/* disallow usage of __proto__ property */
/* disallow usage of __proto__ property */
'no-proto': 0,
/* disallow declaring the same variable more then once */
/* disallow declaring the same variable more then once */
'no-redeclare': 2,
/* disallow use of assignment in return statement */
/* disallow use of assignment in return statement */
'no-return-assign': 0,
/* disallow use of `javascript:` urls. */
/* disallow use of `javascript:` urls. */
'no-script-url': 0,
/* disallow comparisons where both sides are exactly the same */
/* disallow comparisons where both sides are exactly the same */
'no-self-compare': 0,
/* disallow use of comma operator */
/* disallow use of comma operator */
'no-sequences': 0,
/* restrict what can be thrown as an exception */
/* restrict what can be thrown as an exception */
'no-throw-literal': 0,
/* disallow usage of expressions in statement position */
/* disallow usage of expressions in statement position */
'no-unused-expressions': 'off',
/* disallow unused variables */
/* disallow unused variables */
'no-unused-vars': 'error',
/* disallow unnecessary .call() and .apply() */
/* disallow unnecessary .call() and .apply() */
'no-useless-call': 0,
/* disallow unnecessary concatenation of literals or template literals */
/* disallow unnecessary concatenation of literals or template literals */
'no-useless-concat': 0,
/* disallow use of void operator */
/* disallow use of void operator */
'no-void': 0,
/* disallow usage of configurable warning terms in comments: e.g. todo */
'no-warning-comments': [0, {
terms: ['todo', 'fixme', 'xxx'],
location: 'start',
}],
/* disallow use of the with statement */
/* disallow usage of configurable warning terms in comments: e.g. todo */
'no-warning-comments': [
0,
{
terms: ['todo', 'fixme', 'xxx'],
location: 'start',
},
],
/* disallow use of the with statement */
'no-with': 0,
/* require use of the second argument for parseInt() */
/* require use of the second argument for parseInt() */
'radix': [2, 'as-needed'],
/* disallow strict mode directives */
/* disallow strict mode directives */
'strict': 'off',
/* requires to declare all vars on top of their containing scope */
/* requires to declare all vars on top of their containing scope */
'vars-on-top': 0,
/* require immediate function invocation to be wrapped in parentheses */
/* require immediate function invocation to be wrapped in parentheses */
'wrap-iife': 0,
/* require or disallow Yoda conditions */
/* require or disallow Yoda conditions */
'yoda': [0, 'never'],
/* disallow use of undeclared variables unless mentioned in a global block */
'no-undef': 'error',
},
}

@@ -5,20 +5,23 @@ 'use strict'

rules: {
/* disallows spaces inside array brackets */
/* disallows spaces inside array brackets */
'array-bracket-spacing': ['error', 'never'],
/* Require braces in arrow function body */
/* Require braces in arrow function body */
'arrow-body-style': ['error', 'as-needed', {requireReturnForObjectLiteral: false}],
/* requires one or more spaces inside single-line blocks */
/* requires one or more spaces inside single-line blocks */
'block-spacing': 'error',
/* enforces one true brace style */
/* enforces one true brace style */
'brace-style': ['error', 'stroustrup', {allowSingleLine: true}],
/* enforces camelcase style, does not check property names */
/* enforces camelcase style, does not check property names */
'camelcase': ['error', {properties: 'never'}],
/* disallows trailing commas */
/* disallows trailing commas */
'comma-dangle': ['error', 'always-multiline'],
/* disallows spaces before commas, requires one or more spaces after commas */
'comma-spacing': ['error', {
before: false,
after: true,
}],
/*
/* disallows spaces before commas, requires one or more spaces after commas */
'comma-spacing': [
'error',
{
before: false,
after: true,
},
],
/*
* requires a comma after and on the same line

@@ -28,157 +31,172 @@ * as an array element, object property, or variable declaration

'comma-style': ['error', 'last'],
/* disallows spaces inside computed property brackets */
/* disallows spaces inside computed property brackets */
'computed-property-spacing': ['error', 'never'],
/* enforces consistent naming when capturing the current execution context */
/* enforces consistent naming when capturing the current execution context */
'consistent-this': ['error', 'that'],
/* enforce newline at the end of file, with no multiple empty lines */
/* enforce newline at the end of file, with no multiple empty lines */
'eol-last': 'error',
/* require function expressions to have a name */
/* require function expressions to have a name */
'func-names': ['error', 'never'],
/* enforces use of function declarations, allows the use of arrow functions */
/* enforces use of function declarations, allows the use of arrow functions */
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
/*
/*
* this option enforces minimum and maximum identifier lengths
* (variable names, property names etc.)
*/
'id-length': 'error',
/* require identifiers to match the provided regular expression */
'id-length': ['error', {exceptions: ['x', 'y', 'e', 'i', 'j', 'a', 'b', 'h']}],
/* require identifiers to match the provided regular expression */
'id-match': 'error',
/* this option sets a specific tab width for your code */
'indent': ['error', 2],
/* specify whether double or single quotes should be used in JSX attributes */
/* this option sets a specific tab width for your code */
'indent': ['error', 2, {SwitchCase: 2}],
/* specify whether double or single quotes should be used in JSX attributes */
'jsx-quotes': ['error', 'prefer-single'],
/* enforces spacing between keys and values in object literal properties */
'key-spacing': ['error', {
beforeColon: false,
afterColon: true,
}],
/* enforce consistent spacing before and after keywords */
'keyword-spacing': ['error', {
before: true,
after: true,
}],
/* disallow mixed 'LF' and 'CRLF' as linebreaks */
/* enforces spacing between keys and values in object literal properties */
'key-spacing': [
'error',
{
beforeColon: false,
afterColon: true,
},
],
/* enforce consistent spacing before and after keywords */
'keyword-spacing': [
'error',
{
before: true,
after: true,
},
],
/* disallow mixed 'LF' and 'CRLF' as linebreaks */
'linebreak-style': 'off',
/* enforces empty lines around comments */
/* enforces empty lines around comments */
'lines-around-comment': 'off',
/* specify the maximum depth that blocks can be nested */
/* specify the maximum depth that blocks can be nested */
'max-depth': ['error', 4],
/* specify the maximum length of a line in your program */
'max-len': ['error', {
code: 120,
tabWidth: 2,
comments: 100,
ignoreUrls: true,
}],
/* enforce a maximum number of lines per file */
/* specify the maximum length of a line in your program */
'max-len': [
'error',
{
code: 120,
tabWidth: 2,
comments: 100,
ignoreUrls: true,
},
],
/* enforce a maximum number of lines per file */
'max-lines': 'off',
/* specify the maximum depth callbacks can be nested */
'max-nested-callbacks': ['error', 2],
/* limits the number of parameters that can be used in the function declaration. */
'max-params': ['error', 3],
/* enforce a maximum number of statements allowed per line */
/* specify the maximum depth callbacks can be nested */
'max-nested-callbacks': ['error', 3],
/* limits the number of parameters that can be used in the function declaration. */
'max-params': ['error', 4],
/* enforce a maximum number of statements allowed per line */
'max-statements-per-line': ['error', {max: 1}],
/* specify the maximum number of statement allowed in a function */
'max-statements': ['error', 10],
/* require a capital letter for constructors */
/* specify the maximum number of statement allowed in a function */
'max-statements': ['error', 12],
/* require a capital letter for constructors */
'new-cap': 'error',
/* disallow the omission of parentheses when invoking a constructor with no arguments */
/* disallow the omission of parentheses when invoking a constructor with no arguments */
'new-parens': 'error',
/* allow/disallow an empty newline after var statement */
/* allow/disallow an empty newline after var statement */
'newline-after-var': 'error',
/* require an empty line before return statements */
/* require an empty line before return statements */
'newline-before-return': 'error',
/* require a newline after each call in a method chain */
/* require a newline after each call in a method chain */
'newline-per-chained-call': 'error',
/* disallow use of the Array constructor */
/* disallow use of the Array constructor */
'no-array-constructor': 'error',
/* disallow use of bitwise operators */
/* disallow use of bitwise operators */
'no-bitwise': 'error',
/* disallow use of the continue statement */
/* disallow use of the continue statement */
'no-continue': 'error',
/* disallow comments inline after code */
'no-inline-comments': 'error',
/* disallow if as the only statement in an else block */
/* disallow comments inline after code */
'no-inline-comments': 'off',
/* disallow if as the only statement in an else block */
'no-lonely-if': 'error',
/* disallow mixed binary operators */
/* disallow mixed binary operators */
'no-mixed-operators': 'error',
/* disallow mixed spaces and tabs for indentation */
/* disallow mixed spaces and tabs for indentation */
'no-mixed-spaces-and-tabs': 'error',
/* disallow multiple empty lines */
/* disallow multiple empty lines */
'no-multiple-empty-lines': ['error', {max: 2}],
/* disallow negated conditions */
/* disallow negated conditions */
'no-negated-condition': 'error',
/* disallow nested ternary expressions */
/* disallow nested ternary expressions */
'no-nested-ternary': 'error',
/* disallow use of the Object constructor */
/* disallow use of the Object constructor */
'no-new-object': 'error',
/* disallow use of unary operators, ++ and -- */
'no-plusplus': 'error',
/* disallow use of certain syntax in code */
/* disallow use of unary operators, ++ and -- */
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
/* disallow use of certain syntax in code */
'no-restricted-syntax': 'error',
/* disallow space between function identifier and application */
/* disallow space between function identifier and application */
'no-spaced-func': 'error',
/* disallow tabs in file */
/* disallow tabs in file */
'no-tabs': 'off',
/* disallow the use of ternary operators */
/* disallow the use of ternary operators */
'no-ternary': 'off',
/* disallow trailing whitespace at the end of lines */
/* disallow trailing whitespace at the end of lines */
'no-trailing-spaces': 'error',
/* disallow dangling underscores in identifiers */
/* disallow dangling underscores in identifiers */
'no-underscore-dangle': 'error',
/* disallow the use of Boolean literals in conditional expressions */
/* disallow the use of Boolean literals in conditional expressions */
'no-unneeded-ternary': 'error',
/* disallow whitespace before properties */
/* disallow whitespace before properties */
'no-whitespace-before-property': 'error',
/* require or disallow padding inside curly braces */
/* require or disallow padding inside curly braces */
'object-curly-newline': ['error', {multiline: true}],
/* require or disallow padding inside curly braces */
/* require or disallow padding inside curly braces */
'object-curly-spacing': ['error', 'never'],
/* enforce placing object properties on separate lines */
/* enforce placing object properties on separate lines */
'object-property-newline': 'error',
/* require or disallow newlines around var declarations */
/* require or disallow newlines around var declarations */
'one-var-declaration-per-line': 'error',
/* allow just one var statement per function */
/* allow just one var statement per function */
'one-var': ['error', 'never'],
/* require assignment operator shorthand where possible or prohibit it entirely */
/* require assignment operator shorthand where possible or prohibit it entirely */
'operator-assignment': ['error', 'always'],
/* enforce operators to be placed before or after line breaks */
/* enforce operators to be placed before or after line breaks */
'operator-linebreak': 'error',
/* enforce padding within blocks */
/* enforce padding within blocks */
'padded-blocks': ['error', 'never'],
/* require quotes around object literal property names */
/* require quotes around object literal property names */
'quote-props': ['error', 'consistent-as-needed'],
/* specify whether double or single quotes should be used */
/* specify whether double or single quotes should be used */
'quotes': ['error', 'single'],
/* Require JSDoc comment */
/* Require JSDoc comment */
'require-jsdoc': 'error',
/* enforce spacing before and after semicolons */
'semi-spacing': [2, {
before: false,
after: true,
}],
/* require or disallow use of semicolons instead of ASI */
/* enforce spacing before and after semicolons */
'semi-spacing': [
2,
{
before: false,
after: true,
},
],
/* require or disallow use of semicolons instead of ASI */
'semi': ['error', 'never'],
/* sort variables within the same declaration block */
/* sort variables within the same declaration block */
'sort-vars': 'error',
/* require or disallow space before blocks */
/* require or disallow space before blocks */
'space-before-blocks': ['error', 'always'],
/* require or disallow space before function opening parenthesis */
/* require or disallow space before function opening parenthesis */
'space-before-function-paren': ['error', 'never'],
/* require or disallow spaces inside parentheses */
/* require or disallow spaces inside parentheses */
'space-in-parens': ['error', 'never'],
/* require spaces around operators */
/* require spaces around operators */
'space-infix-ops': 'error',
/* Require or disallow spaces before/after unary operators */
'space-unary-ops': ['error', {
words: true,
nonwords: false,
}],
/* require or disallow a space immediately following the // or /* in a comment */
/* Require or disallow spaces before/after unary operators */
'space-unary-ops': [
'error',
{
words: true,
nonwords: false,
},
],
/* require or disallow a space immediately following the // or /* in a comment */
'spaced-comment': 'error',
/* require or disallow Unicode byte order mark (BOM) */
/* require or disallow Unicode byte order mark (BOM) */
'unicode-bom': ['error', 'never'],
/* require regex literals to be wrapped in parentheses */
/* require regex literals to be wrapped in parentheses */
'wrap-regex': 'error',
},
}
{
"name": "eslint-config-uploadcare",
"version": "1.1.0",
"version": "1.2.0",
"description": "Uploadcare's base JS ESLint config",

@@ -8,3 +8,4 @@ "main": "index.js",

"lint": "eslint .",
"fix": "npm run lint -- --fix"
"fix": "npm run lint -- --fix",
"release": "release-it"
},

@@ -28,3 +29,8 @@ "repository": {

},
"homepage": "https://github.com/uploadcare/eslint-config-uploadcare#readme"
"homepage": "https://github.com/uploadcare/eslint-config-uploadcare#readme",
"devDependencies": {
"@uploadcare/release-it": "^1.0.1",
"eslint": "^5.1.0",
"eslint-plugin-react": "^7.10.0"
}
}
# eslint-config-uploadcare
This package provides [Uploadcare](https://uploadcare.com/)'s .eslintrc as an extensible shared config.
This package provides [Uploadcare](https://uploadcare.com/) `.eslintrc` as an extensible shared config.

@@ -13,3 +13,3 @@ ## Usage

Add `eslint-config-uploadcare` to your .eslintrc
Add `eslint-config-uploadcare` to your `.eslintrc`

@@ -19,1 +19,6 @@ ```json

```
## Contributors
* [@Zmoki](https://github.com/Zmoki)
* [@Akurganow](https://github.com/Akurganow)

Sorry, the diff of this file is not supported yet

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