@zendeskgarden/eslint-config
Advanced tools
Comparing version 35.0.0 to 36.0.0
{ | ||
"name": "@zendeskgarden/eslint-config", | ||
"version": "35.0.0", | ||
"version": "36.0.0", | ||
"description": "Garden ESLint config", | ||
@@ -26,13 +26,13 @@ "license": "Apache-2.0", | ||
"@babel/eslint-parser": "^7.15.0", | ||
"eslint": "^8.50.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-node": "^11.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.23.0", | ||
"@babel/eslint-parser": "7.22.15", | ||
"@typescript-eslint/eslint-plugin": "6.7.2", | ||
"@typescript-eslint/parser": "6.7.2", | ||
"eslint": "8.50.0", | ||
"eslint-plugin-jest": "27.4.0", | ||
"eslint-plugin-jsx-a11y": "6.7.1", | ||
"@babel/core": "7.23.6", | ||
"@babel/eslint-parser": "7.23.3", | ||
"@typescript-eslint/eslint-plugin": "6.15.0", | ||
"@typescript-eslint/parser": "6.15.0", | ||
"eslint": "8.56.0", | ||
"eslint-plugin-jest": "27.6.0", | ||
"eslint-plugin-jsx-a11y": "6.8.0", | ||
"eslint-plugin-node": "11.1.0", | ||
@@ -47,3 +47,3 @@ "eslint-plugin-notice": "0.9.10", | ||
"standard-version": "9.5.0", | ||
"typescript": "5.2.2" | ||
"typescript": "5.3.3" | ||
}, | ||
@@ -50,0 +50,0 @@ "keywords": [ |
@@ -9,4 +9,4 @@ /** | ||
const bestPractices = require('../rules/best-practices').rules; | ||
const es6 = require('../rules/es6').rules; | ||
const possibleErrors = require('../rules/possible-errors').rules; | ||
const stylisticIssues = require('../rules/stylistic-issues').rules; | ||
@@ -19,5 +19,5 @@ module.exports = { | ||
'dot-notation': 0, | ||
'key-spacing': 0, | ||
'no-implied-eval': 0, | ||
'no-throw-literal': 0, | ||
'prefer-destructuring': 0, | ||
'require-await': 0, | ||
@@ -29,4 +29,2 @@ | ||
'@typescript-eslint/dot-notation': bestPractices['dot-notation'], | ||
// enforce consistent spacing between keys and values in object literal properties | ||
'@typescript-eslint/key-spacing': stylisticIssues['key-spacing'], | ||
// requires that `.toString()` is only called on objects which provide useful information when stringified | ||
@@ -73,4 +71,10 @@ '@typescript-eslint/no-base-to-string': 2, | ||
'@typescript-eslint/no-unsafe-return': 2, | ||
// require unary negation to take a number | ||
'@typescript-eslint/no-unsafe-unary-minus': 2, | ||
// disallow unnecessary template literals | ||
'@typescript-eslint/no-useless-template-literals': 2, | ||
// prefers a non-null assertion over explicit type cast when possible | ||
'@typescript-eslint/non-nullable-type-assertion-style': 1, | ||
// require destructuring from arrays and/or objects | ||
'@typescript-eslint/prefer-destructuring': es6['prefer-destructuring'], | ||
// enforce includes method over `indexOf` method | ||
@@ -77,0 +81,0 @@ '@typescript-eslint/prefer-includes': 2, |
@@ -19,14 +19,8 @@ /** | ||
// Disable ESLint rules that are handled by TypeScript | ||
'brace-style': 0, | ||
'class-methods-use-this': 0, | ||
'comma-dangle': 0, | ||
'comma-spacing': 0, | ||
'constructor-super': 0, | ||
'default-param-last': 0, | ||
'func-call-spacing': 0, | ||
'getter-return': 0, | ||
'indent': 0, | ||
'init-declarations': 0, | ||
'keyword-spacing': 0, | ||
'lines-between-class-members': 0, | ||
'no-array-constructor': 0, | ||
@@ -38,4 +32,2 @@ 'no-const-assign': 0, | ||
'no-empty-function': 0, | ||
'no-extra-parens': 0, | ||
'no-extra-semi': 0, | ||
'no-func-assign': 0, | ||
@@ -61,7 +53,2 @@ 'no-import-assign': 0, | ||
'no-unused-vars': 0, | ||
'object-curly-spacing': 0, | ||
'quotes': 0, | ||
'semi': 0, | ||
'space-before-function-paren': 0, | ||
'space-infix-ops': 0, | ||
'valid-typeof': 0, | ||
@@ -79,4 +66,2 @@ | ||
'@typescript-eslint/ban-types': 2, | ||
// enforce consistent brace style for blocks | ||
'@typescript-eslint/brace-style': stylisticIssues['brace-style'], | ||
// ensures that literals on classes are exposed in a consistent style | ||
@@ -87,6 +72,2 @@ '@typescript-eslint/class-literal-property-style': 2, | ||
bestPractices['class-methods-use-this'], | ||
// require or disallow trailing comma | ||
'@typescript-eslint/comma-dangle': stylisticIssues['comma-dangle'], | ||
// enforces consistent spacing before and after commas | ||
'@typescript-eslint/comma-spacing': stylisticIssues['comma-spacing'], | ||
// enforce or disallow the use of the record type | ||
@@ -112,7 +93,2 @@ '@typescript-eslint/consistent-indexed-object-style': 2, | ||
'@typescript-eslint/explicit-module-boundary-types': 2, | ||
// require or disallow spacing between function identifiers and their invocations | ||
'@typescript-eslint/func-call-spacing': | ||
stylisticIssues['func-call-spacing'], | ||
// enforce consistent indentation | ||
'@typescript-eslint/indent': stylisticIssues.indent, | ||
// require or disallow initialization in variable declarations | ||
@@ -122,5 +98,2 @@ '@typescript-eslint/init-declarations': variables['init-declarations'], | ||
'@typescript-eslint/keyword-spacing': stylisticIssues['keyword-spacing'], | ||
// require or disallow an empty line between class members | ||
'@typescript-eslint/lines-between-class-members': | ||
stylisticIssues['lines-between-class-members'], | ||
// require a specific member delimiter style for interfaces and type literals | ||
@@ -167,6 +140,2 @@ '@typescript-eslint/member-delimiter-style': 2, | ||
'@typescript-eslint/no-extra-non-null-assertion': 2, | ||
// disallow unnecessary parentheses | ||
'@typescript-eslint/no-extra-parens': possibleErrors['no-extra-parens'], | ||
// disallow unnecessary semicolons | ||
'@typescript-eslint/no-extra-semi': possibleErrors['no-extra-semi'], | ||
// forbids the use of classes as namespaces | ||
@@ -227,5 +196,2 @@ '@typescript-eslint/no-extraneous-class': 2, | ||
'@typescript-eslint/no-var-requires': 2, | ||
// enforce consistent spacing inside braces | ||
'@typescript-eslint/object-curly-spacing': | ||
stylisticIssues['object-curly-spacing'], | ||
// prefer usage of `as const` over literal type | ||
@@ -247,11 +213,2 @@ '@typescript-eslint/prefer-as-const': 2, | ||
'@typescript-eslint/prefer-ts-expect-error': 2, | ||
// enforce the consistent use of either backticks, double, or single quotes | ||
'@typescript-eslint/quotes': stylisticIssues.quotes, | ||
// require or disallow semicolons instead of ASI | ||
'@typescript-eslint/semi': stylisticIssues.semi, | ||
// enforces consistent spacing before function parenthesis | ||
'@typescript-eslint/space-before-function-paren': | ||
stylisticIssues['space-before-function-paren'], | ||
// ensure there are spaces around infix operators | ||
'@typescript-eslint/space-infix-ops': stylisticIssues['space-infix-ops'], | ||
// sets preference level for triple slash directives versus ES6-style import declarations | ||
@@ -258,0 +215,0 @@ '@typescript-eslint/triple-slash-reference': 2, |
@@ -30,4 +30,2 @@ /** | ||
'default-param-last': 2, | ||
// enforces consistent newlines before or after dots | ||
'dot-location': [2, 'property'], | ||
// encourages use of dot notation whenever possible | ||
@@ -73,4 +71,2 @@ 'dot-notation': [2, { allowKeywords: true }], | ||
'no-fallthrough': 2, | ||
// disallow the use of leading or trailing decimal points in numeric literals | ||
'no-floating-decimal': 2, | ||
// disallow assignments to native objects or read-only global variables | ||
@@ -96,4 +92,2 @@ 'no-global-assign': 2, | ||
'no-magic-numbers': 0, | ||
// disallow use of multiple spaces | ||
'no-multi-spaces': 2, | ||
// disallow use of multiline strings | ||
@@ -174,4 +168,2 @@ 'no-multi-str': 2, | ||
'vars-on-top': 2, | ||
// require immediate function invocation to be wrapped in parentheses | ||
'wrap-iife': [2, 'any'], | ||
// require or disallow Yoda conditions | ||
@@ -178,0 +170,0 @@ 'yoda': 2 |
@@ -12,14 +12,6 @@ /** | ||
'arrow-body-style': 0, | ||
// require parens in arrow function arguments | ||
'arrow-parens': [2, 'as-needed'], | ||
// require space before/after arrow function's arrow | ||
'arrow-spacing': 2, | ||
// verify calls of `super()` in constructors | ||
'constructor-super': 2, | ||
// enforce the spacing around the `*` in generator functions | ||
'generator-star-spacing': 0, | ||
// disallow modifying variables of class declarations | ||
'no-class-assign': 0, | ||
// disallow arrow functions where they could be confused with comparisons | ||
'no-confusing-arrow': 2, | ||
// disallow modifying variables that are declared using `const` | ||
@@ -65,13 +57,7 @@ 'no-const-assign': 2, | ||
'require-yield': 0, | ||
// enforce spacing between rest and spread operators and their expressions | ||
'rest-spread-spacing': 2, | ||
// sort import declarations within module | ||
'sort-imports': 1, | ||
// require symbol descriptions | ||
'symbol-description': 2, | ||
// enforce spacing around embedded expressions of template strings | ||
'template-curly-spacing': [2, 'never'], | ||
// enforce spacing around the `*` in `yield*` expressions | ||
'yield-star-spacing': [2, 'after'] | ||
'symbol-description': 2 | ||
} | ||
}; |
@@ -46,6 +46,2 @@ /** | ||
'no-extra-boolean-cast': 2, | ||
// disallow unnecessary parentheses | ||
'no-extra-parens': [2, 'functions'], | ||
// disallow unnecessary semicolons | ||
'no-extra-semi': 2, | ||
// disallow overwriting functions written as function declarations | ||
@@ -52,0 +48,0 @@ 'no-func-assign': 2, |
@@ -10,12 +10,2 @@ /** | ||
rules: { | ||
// enforce linebreaks after opening and before closing array brackets | ||
'array-bracket-newline': [2, 'consistent'], | ||
// enforce spacing inside array brackets | ||
'array-bracket-spacing': [2, 'never'], | ||
// enforce line breaks after each array element | ||
'array-element-newline': 0, | ||
// disallow or enforce spaces inside of single line blocks | ||
'block-spacing': [2, 'always'], | ||
// enforce one true brace style | ||
'brace-style': [2, '1tbs', { allowSingleLine: true }], | ||
// require camel case names | ||
@@ -25,19 +15,4 @@ 'camelcase': [2, { properties: 'never' }], | ||
'capitalize-comments': 0, | ||
// disallow or enforce trailing commas | ||
'comma-dangle': 2, | ||
// enforce spacing before and after comma | ||
'comma-spacing': [2, { | ||
before: false, | ||
after: true | ||
}], | ||
// enforce one true comma style | ||
'comma-style': [2, 'last'], | ||
// require or disallow padding inside computed properties | ||
'computed-property-spacing': [2, 'never'], | ||
// enforces consistent naming when capturing the current execution context | ||
'consistent-this': [0, 'self'], | ||
// enforce newline at the end of file, with no multiple empty lines | ||
'eol-last': 2, | ||
// require or disallow spacing between function identifiers and their invocations | ||
'func-call-spacing': 2, | ||
// require function names to match the name of the variable or property to which they are assigned | ||
@@ -49,6 +24,2 @@ 'func-name-matching': 2, | ||
'func-style': 0, | ||
// enforce line breaks between arguments of a function call | ||
'function-call-argument-newline': [2, 'consistent'], | ||
// enforce consistent line breaks inside function parentheses | ||
'function-paren-newline': 2, | ||
// disallow specified identifiers | ||
@@ -60,13 +31,2 @@ 'id-denylist': 0, | ||
'id-match': 0, | ||
// enforce the location of arrow function bodies with implicit returns | ||
'implicit-arrow-linebreak': 2, | ||
// this option sets a specific tab width for your code | ||
'indent': [2, 2, { SwitchCase: 1 }], | ||
// specify whether double or single quotes should be used in JSX attributes | ||
'jsx-quotes': 0, | ||
// enforces spacing between keys and values in object literal properties | ||
'key-spacing': [2, { | ||
beforeColon: false, | ||
afterColon: true | ||
}], | ||
// enforce spacing before and after keywords | ||
@@ -76,8 +36,2 @@ 'keyword-spacing': 2, | ||
'line-comment-position': 0, | ||
// disallow mixed 'LF' and 'CRLF' as linebreaks | ||
'linebreak-style': 0, | ||
// enforces empty lines around comments | ||
'lines-around-comment': 0, | ||
// require or disallow an empty line between class members | ||
'lines-between-class-members': 2, | ||
// require or disallow logical assignment logical operator shorthand | ||
@@ -87,7 +41,2 @@ 'logical-assignment-operators': 2, | ||
'max-depth': [0, 4], | ||
// specify the maximum length of a line in your program | ||
'max-len': [1, 80, 2, { | ||
ignoreComments: true, | ||
ignoreUrls: true | ||
}], | ||
// enforce a maximum number of lines per file | ||
@@ -103,14 +52,6 @@ 'max-lines': 0, | ||
'max-statements': [0, 10], | ||
// specify the maximum number of statements allowed per line | ||
'max-statements-per-line': [2, { max: 1 }], | ||
// enforce a particular style for multiline comments | ||
'multiline-comment-style': 0, | ||
// enforce newlines between operands of ternary expressions | ||
'multiline-ternary': 0, | ||
// require a capital letter for constructors | ||
'new-cap': [2, { newIsCap: true }], | ||
// disallow the omission of parentheses when invoking a constructor with no arguments | ||
'new-parens': 2, | ||
// enforce newline after each call when chaining the calls | ||
'newline-per-chained-call': 0, | ||
// disallow use of the `Array` constructor | ||
@@ -126,10 +67,4 @@ 'no-array-constructor': 2, | ||
'no-lonely-if': 2, | ||
// disallow mixed binary operators | ||
'no-mixed-operators': 2, | ||
// disallow mixed spaces and tabs for indentation | ||
'no-mixed-spaces-and-tabs': 2, | ||
// disallow use of chained assignment expressions | ||
'no-multi-assign': 2, | ||
// disallow multiple empty lines | ||
'no-multiple-empty-lines': [2, { max: 2 }], | ||
// disallow negated conditions | ||
@@ -145,8 +80,4 @@ 'no-negated-condition': 2, | ||
'no-restricted-syntax': 0, | ||
// disallow all tabs | ||
'no-tabs': 2, | ||
// disallow the use of ternary operators | ||
'no-ternary': 0, | ||
// disallow trailing whitespace at the end of lines | ||
'no-trailing-spaces': 2, | ||
// disallow dangling underscores in identifiers | ||
@@ -156,49 +87,6 @@ 'no-underscore-dangle': 0, | ||
'no-unneeded-ternary': 2, | ||
// disallow whitespace before properties | ||
'no-whitespace-before-property': 2, | ||
// enforce the location of single-line statements | ||
'nonblock-statement-body-position': 2, | ||
// enforce consistent line breaks inside braces | ||
'object-curly-newline': 0, | ||
// require or disallow padding inside curly braces | ||
'object-curly-spacing': [2, 'always'], | ||
// enforce placing object properties on separate lines | ||
'object-property-newline': 2, | ||
// allow just one var statement per function | ||
'one-var': [2, 'never'], | ||
// require or disallow an newline around variable declarations | ||
'one-var-declaration-per-line': [2, 'initializations'], | ||
// require assignment operator shorthand where possible or prohibit it entirely | ||
'operator-assignment': 0, | ||
// enforce operators to be placed before or after line breaks | ||
'operator-linebreak': [2, 'after'], | ||
// enforce padding within blocks | ||
'padded-blocks': [2, { blocks: 'never' }], | ||
// require or disallow padding lines between statements | ||
'padding-line-between-statements': [1, | ||
{ | ||
blankLine: 'always', | ||
prev: 'directive', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'any', | ||
prev: 'directive', | ||
next: 'directive' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: ['const', 'let', 'var'], | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'any', | ||
prev: ['const', 'let', 'var'], | ||
next: ['const', 'let', 'var'] | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'return' | ||
}], | ||
// disallow the use of `Math.pow` in favor of the `**` operator | ||
@@ -210,15 +98,2 @@ 'prefer-exponentiation-operator': 1, | ||
'prefer-object-spread': 1, | ||
// require quotes around object literal property names | ||
'quote-props': [2, 'consistent-as-needed'], | ||
// specify whether double or single quotes should be used | ||
'quotes': [2, 'single', 'avoid-escape'], | ||
// require or disallow use of semicolons instead of ASI | ||
'semi': [2, 'always'], | ||
// enforce spacing before and after semicolons | ||
'semi-spacing': [2, { | ||
before: false, | ||
after: true | ||
}], | ||
// enforce location of semicolons | ||
'semi-style': 2, | ||
// require object keys to be sorted | ||
@@ -228,30 +103,5 @@ 'sort-keys': 0, | ||
'sort-vars': 0, | ||
// require or disallow space before blocks | ||
'space-before-blocks': 2, | ||
// require or disallow space before function opening parenthesis | ||
'space-before-function-paren': [2, { | ||
anonymous: 'never', | ||
named: 'never', | ||
asyncArrow: 'always' | ||
}], | ||
// require or disallow spaces inside parentheses | ||
'space-in-parens': 2, | ||
// require spaces around operators | ||
'space-infix-ops': 2, | ||
// Require or disallow spaces before/after unary operators | ||
'space-unary-ops': 0, | ||
// require or disallow a space immediately following the `//` or `/*` in a comment | ||
'spaced-comment': [2, 'always', { | ||
exceptions: ['-', '+'], | ||
markers: ['=', '!'] // space here to support sprockets directives | ||
}], | ||
// enforce spacing around colons of switch statements | ||
'switch-colon-spacing': 2, | ||
// require or disallow spacing between template tags and their literals | ||
'template-tag-spacing': 2, | ||
// require or disallow Unicode byte order mark (BOM) | ||
'unicode-bom': 2, | ||
// require regex literals to be wrapped in parentheses | ||
'wrap-regex': 0 | ||
'unicode-bom': 2 | ||
} | ||
}; |
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
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
70627
1271