Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
enable rules that have no violations
  • Loading branch information
SimenB committed Dec 28, 2023
commit 9e03139e5b40c622a34d67edfadefed3b3c15c60
97 changes: 43 additions & 54 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ module.exports = {
'no-undef': 'off',
'no-unused-vars': 'off',
'sort-keys': 'off',
'unicorn/no-static-only-class': 'off',
},
},
// demonstration of matchers usage
Expand Down Expand Up @@ -413,6 +414,19 @@ module.exports = {
'no-unused-vars': 'off',
},
},
{
files: 'e2e/native-esm/wasm-bindgen/index_bg.js',
rules: {
'unicorn/prefer-code-point': 'off',
'unicorn/prefer-optional-catch-binding': 'off',
},
},
{
files: 'packages/jest-mock/src/__tests__/**/*',
rules: {
'unicorn/no-static-only-class': 'off',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down Expand Up @@ -541,9 +555,7 @@ module.exports = {
'no-multi-str': 'error',
'no-multiple-empty-lines': 'off',
'no-native-reassign': ['error', {exceptions: ['Map', 'Set']}],
'no-negated-condition': 'off',
'no-negated-in-lhs': 'error',
'no-nested-ternary': 'off',
'no-new': 'warn',
'no-new-func': 'error',
'no-new-object': 'warn',
Expand Down Expand Up @@ -626,108 +638,85 @@ module.exports = {
'wrap-regex': 'off',
yoda: 'off',

// TODO: turn most of these rules on at some point
// doesn't work without ESModuleInterop
'unicorn/import-style': 'off',
// we're a CJS project
'unicorn/prefer-module': 'off',

// enforced by `@typescript-eslint/no-this-alias` already
'unicorn/no-this-assignment': 'off',

// nah
'unicorn/consistent-destructuring': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/no-lonely-if': 'off',
'unicorn/no-null': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/prefer-event-target': 'off',
'unicorn/prefer-switch': 'off',
'unicorn/prefer-ternary': 'off',
'unicorn/switch-case-braces': 'off',

// TODO: enable for `.mjs` files
'unicorn/prefer-top-level-await': 'off',

// TODO: decide whether or not we want these
'unicorn/filename-case': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/prefer-reflect-apply': 'off',

// TODO: turn on at some point
'unicorn/better-regex': 'off',
'unicorn/catch-error-name': 'off',
'unicorn/consistent-destructuring': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/custom-error-definition': 'off',
'unicorn/empty-brace-spaces': 'off',
'unicorn/error-message': 'off',
'unicorn/escape-case': 'off',
'unicorn/expiring-todo-comments': 'off',
'unicorn/filename-case': 'off',
'unicorn/import-style': 'off',
'unicorn/new-for-builtins': 'off',
'unicorn/no-abusive-eslint-disable': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-method-this-argument': 'off',
'unicorn/no-array-push-push': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/no-console-spaces': 'off',
'unicorn/no-document-cookie': 'off',
'unicorn/no-empty-file': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/no-hex-escape': 'off',
'unicorn/no-instanceof-array': 'off',
'unicorn/no-invalid-remove-event-listener': 'off',
'unicorn/no-keyword-prefix': 'off',
'unicorn/no-lonely-if': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/no-new-array': 'off',
'unicorn/no-new-buffer': 'off',
'unicorn/no-null': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/no-static-only-class': 'off',
'unicorn/no-thenable': 'off',
'unicorn/no-this-assignment': 'off',
'unicorn/no-typeof-undefined': 'off',
'unicorn/no-unnecessary-await': 'off',
'unicorn/no-unnecessary-polyfills': 'off',
'unicorn/no-unreadable-array-destructuring': 'off',
'unicorn/no-unreadable-iife': 'off',
'unicorn/no-unused-properties': 'off',
'unicorn/no-useless-fallback-in-spread': 'off',
'unicorn/no-useless-length-check': 'off',
'unicorn/no-useless-promise-resolve-reject': 'off',
'unicorn/no-useless-spread': 'off',
'unicorn/no-useless-switch-case': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/no-zero-fractions': 'off',
'unicorn/number-literal-case': 'off',
'unicorn/prefer-add-event-listener': 'off',
'unicorn/prefer-array-find': 'off',
'unicorn/prefer-array-flat': 'off',
'unicorn/prefer-array-flat-map': 'off',
'unicorn/prefer-array-index-of': 'off',
'unicorn/prefer-array-some': 'off',
'unicorn/prefer-at': 'off',
'unicorn/prefer-blob-reading-methods': 'off',
'unicorn/prefer-code-point': 'off',
'unicorn/prefer-date-now': 'off',
'unicorn/prefer-dom-node-append': 'off',
'unicorn/prefer-dom-node-dataset': 'off',
'unicorn/prefer-dom-node-remove': 'off',
'unicorn/prefer-dom-node-text-content': 'off',
'unicorn/prefer-event-target': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-json-parse-buffer': 'off',
'unicorn/prefer-keyboard-event-key': 'off',
'unicorn/prefer-logical-operator-over-ternary': 'off',
'unicorn/prefer-math-trunc': 'off',
'unicorn/prefer-modern-dom-apis': 'off',
'unicorn/prefer-modern-math-apis': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-native-coercion-functions': 'off',
'unicorn/prefer-negative-index': 'off',
'unicorn/prefer-node-protocol': 'off',
'unicorn/prefer-number-properties': 'off',
'unicorn/prefer-object-from-entries': 'off',
'unicorn/prefer-optional-catch-binding': 'off',
'unicorn/prefer-prototype-methods': 'off',
'unicorn/prefer-query-selector': 'off',
'unicorn/prefer-reflect-apply': 'off',
'unicorn/prefer-regexp-test': 'off',
'unicorn/prefer-set-has': 'off',
'unicorn/prefer-set-size': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prefer-string-starts-ends-with': 'off',
'unicorn/prefer-string-trim-start-end': 'off',
'unicorn/prefer-switch': 'off',
'unicorn/prefer-ternary': 'off',
'unicorn/prefer-top-level-await': 'off',
'unicorn/prefer-type-error': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/relative-url-style': 'off',
'unicorn/require-array-join-separator': 'off',
'unicorn/require-number-to-fixed-digits-argument': 'off',
'unicorn/require-post-message-target-origin': 'off',
'unicorn/string-content': 'off',
'unicorn/switch-case-braces': 'off',
'unicorn/text-encoding-identifier-case': 'off',
'unicorn/throw-new-error': 'off',
},
Expand Down