eslint / eslint

Find and fix problems in your JavaScript code.
https://eslint.org
MIT License
24.94k stars 4.51k forks source link

crash: Cannot read property 'meta' of undefined #11754

Closed spudly closed 5 years ago

spudly commented 5 years ago

What parser (default, Babel-ESLint, etc.) are you using? babel-eslint / @typescript-eslint/parser

Please show your full configuration:

Configuration ```js module.exports = { parser: require.resolve('babel-eslint'), parserOptions: { sourceType: 'module', }, env: { mocha: true, browser: true, es6: true, jest: true, node: true, }, settings: { react: { version: 'detect', flowVersion: 'detect', }, 'import/resolver': { node: { extensions: ['.js', '.jsx', '.ts', '.tsx'], }, }, 'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'], }, }, plugins: [ 'eslint-comments', 'flowtype', 'fp', 'import', 'jsx-a11y', 'lodash-fp', 'node', 'promise', 'react', 'unicorn', 'jest', 'react-hooks', ], rules: { 'accessor-pairs': 'off', 'array-bracket-newline': 'off', // handled by prettier 'array-bracket-spacing': 'off', // handled by prettier 'array-callback-return': 'error', 'array-element-newline': 'off', //handled by prettier 'arrow-body-style': 'off', // handled by prettier 'arrow-parens': 'off', // handled by prettier 'arrow-spacing': 'off', // handled by prettier 'block-scoped-var': 'error', 'block-spacing': 'off', // handled by prettier 'brace-style': 'off', // handled by prettier 'callback-return': 'off', camelcase: [ 'warn', { properties: 'never', ignoreDestructuring: true, }, ], 'capitalized-comments': 'off', // I can think of no reason to be strict about comments 'class-methods-use-this': [ 'off', { exceptMethods: [ 'render', 'getInitialState', 'getDefaultProps', 'getChildContext', 'componentWillMount', 'componentDidMount', 'componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', 'componentDidUpdate', 'componentWillUnmount', ], }, ], 'comma-dangle': 'off', // handled by prettier 'comma-spacing': 'off', // handled by prettier 'comma-style': 'off', // handled by prettier complexity: 'off', 'computed-property-spacing': 'off', // handled by prettier 'consistent-return': 'error', 'consistent-this': 'off', // handled by prettier 'constructor-super': 'error', curly: 'off', // handled by prettier 'default-case': [ 'error', { commentPattern: '^no default$', }, ], 'dot-location': 'off', // handled by prettier 'dot-notation': 'off', // handled by prettier, 'eol-last': 'off', // handled by prettier eqeqeq: [ 'error', 'always', { null: 'ignore', }, ], 'eslint-comments/disable-enable-pair': 'warn', 'eslint-comments/no-aggregating-enable': 'warn', 'eslint-comments/no-duplicate-disable': 'warn', 'eslint-comments/no-restricted-disable': 'off', // we should be able to trust other devs 'eslint-comments/no-unlimited-disable': 'warn', 'eslint-comments/no-unused-disable': 'warn', 'eslint-comments/no-unused-enable': 'warn', 'eslint-comments/no-use': 'off', // gotta be able to disable rules when necessary... 'flowtype/array-style-complex-type': ['warn', 'verbose'], 'flowtype/array-style-simple-type': ['warn', 'verbose'], 'flowtype/boolean-style': ['warn', 'boolean'], 'flowtype/define-flow-type': 'warn', 'flowtype/delimiter-dangle': 'off', // handled by prettier 'flowtype/generic-spacing': 'off', // handled by prettier 'flowtype/newline-after-flow-annotation': 'off', // don't want to enforce this 'flowtype/no-dupe-keys': 'off', // disabled because of eslint-plugin-flowtype#293 'flowtype/no-existential-type': 'off', // seems unnecessary 'flowtype/no-flow-fix-me-comments': 'off', // too many flow bugs to enforce this 'flowtype/no-mixed': 'off', // mixed is useful when you don't care what the type is 'flowtype/no-mutable-array': 'off', // not convinced that this is a best practice 'flowtype/no-primitive-constructor-types': 'error', 'flowtype/no-types-missing-file-annotation': 'error', 'flowtype/no-unused-expressions': 'off', // not convinced that we need bare type casts 'flowtype/no-weak-types': 'off', 'flowtype/object-type-delimiter': 'off', // handled by prettier 'flowtype/require-compound-type-alias': 'off', // can't even do `number | string`? no thanks 'flowtype/require-exact-type': 'off', // too many exact type bugs to enforce this 'flowtype/require-parameter-type': 'off', 'flowtype/require-return-type': 'off', 'flowtype/require-types-at-top': 'off', // don't want to enforce this 'flowtype/require-valid-file-annotation': 'off', 'flowtype/require-variable-type': 'off', 'flowtype/semi': 'off', // handled by prettier 'flowtype/sort-keys': 'off', 'flowtype/space-after-type-colon': 'off', // handled by prettier 'flowtype/space-before-generic-bracket': 'off', // handled by prettier 'flowtype/space-before-type-colon': 'off', // handled by prettier 'flowtype/type-id-match': 'off', 'flowtype/type-import-style': 'off', // don't want to enforce this 'flowtype/union-intersection-spacing': 'off', // handled by prettier 'flowtype/use-flow-type': 'warn', 'flowtype/valid-syntax': 'off', 'for-direction': 'error', 'fp/no-arguments': 'error', 'fp/no-class': 'off', // too heavy handed, we need classes for React components 'fp/no-delete': 'off', // too heavy handed 'fp/no-events': 'off', // too heavy handed 'fp/no-get-set': 'off', // too heavy handed 'fp/no-let': 'off', // too heavy handed 'fp/no-loops': 'off', // too heavy-handed 'fp/no-mutating-assign': 'error', 'fp/no-mutating-methods': 'off', // too heavy-handed 'fp/no-mutation': 'off', // too heavy-handed 'fp/no-nil': 'off', // too heavy handed 'fp/no-proxy': 'warn', 'fp/no-rest-parameters': 'off', // too heavy handed 'fp/no-this': 'off', // too heavy handed 'fp/no-throw': 'off', // too heavy handed 'fp/no-unused-expression': 'off', // seems to assume functions are always pure; not true 'fp/no-valueof-field': 'error', 'func-call-spacing': 'off', // handled by prettier 'func-name-matching': 'warn', 'func-names': 'off', // ick. we should not have to name anonymous functions. 'func-style': 'off', // too heavy handed. let the dev choose 'function-paren-newline': 'off', // stylistic. handled by prettier 'generator-star-spacing': 'off', // handled by prettier 'getter-return': 'error', 'global-require': 'error', 'guard-for-in': 'error', 'handle-callback-err': 'off', 'id-blacklist': 'off', 'id-length': 'off', 'id-match': 'off', 'implicit-arrow-linebreak': 'off', // handled by prettier 'import/default': 'off', // we dont always need a default export 'import/dynamic-import-chunkname': 'error', 'import/export': 'error', 'import/exports-last': 'warn', 'import/extensions': [ 'error', 'always', {js: 'never', jsx: 'never', ts: 'never', tsx: 'never'}, ], 'import/first': ['warn', 'absolute-first'], 'import/group-exports': 'off', // don't want to group exports 'import/imports-first': 'off', 'import/max-dependencies': 'off', 'import/named': 'off', 'import/namespace': 'off', 'import/newline-after-import': 'warn', 'import/no-absolute-path': 'error', 'import/no-amd': 'error', 'import/no-anonymous-default-export': 'off', 'import/no-commonjs': 'off', 'import/no-cycle': 'error', 'import/no-default-export': 'off', // why would you do that? 'import/no-deprecated': 'off', 'import/no-duplicates': 'error', 'import/no-dynamic-require': 'error', 'import/no-extraneous-dependencies': ['error', {}], 'import/no-internal-modules': 'off', 'import/no-mutable-exports': 'error', 'import/no-named-as-default-member': 'error', 'import/no-named-as-default': 'error', 'import/no-named-default': 'error', 'import/no-named-export': 'off', // why? named exports are awesome 'import/no-namespace': 'off', 'import/no-nodejs-modules': 'off', 'import/no-relative-parent-imports': 'off', // we use relative parent imports in test files 'import/no-restricted-paths': 'off', 'import/no-self-import': 'error', 'import/no-unassigned-import': 'off', 'import/no-unresolved': ['error', {commonjs: true, caseSensitive: true}], 'import/no-useless-path-segments': 'warn', 'import/no-webpack-loader-syntax': 'error', 'import/order': [ 'off', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], 'newlines-between': 'never', }, ], 'import/prefer-default-export': 'off', 'import/unambiguous': 'off', indent: 'off', // handled by prettier 'init-declarations': 'off', 'jest/consistent-test-it': [ 'warn', { fn: 'test', withinDescribe: 'test', }, ], 'jest/expect-expect': 'warn', 'jest/lowercase-name': 'warn', 'jest/no-alias-methods': 'warn', 'jest/no-disabled-tests': 'error', 'jest/no-focused-tests': 'error', 'jest/no-hooks': 'off', // agree that they should be avoided, but they're frequently required 'jest/no-identical-title': 'error', 'jest/no-jasmine-globals': 'error', 'jest/no-jest-import': 'error', 'jest/no-large-snapshots': 'warn', 'jest/no-test-callback': 'warn', 'jest/no-test-prefixes': 'warn', 'jest/no-test-return-statement': 'error', 'jest/no-truthy-falsy': 'warn', 'jest/prefer-expect-assertions': 'off', // eww. boilerplate in every test ever. no thanks 'jest/prefer-spy-on': 'off', // autofix breaks tests. so annoying. 'jest/prefer-strict-equal': 'warn', 'jest/prefer-to-be-null': 'warn', 'jest/prefer-to-be-undefined': 'warn', 'jest/prefer-to-contain': 'warn', 'jest/prefer-to-have-length': 'warn', 'jest/prefer-inline-snapshots': 'off', // i prefer it too, but don't want it to autofix them 'jest/require-tothrow-message': 'off', // don't want warnings for .not.toThrow() 'jest/valid-describe': 'error', 'jest/valid-expect-in-promise': 'error', 'jest/valid-expect': 'error', 'jest/prefer-todo': 'warn', 'jest/prefer-called-with': 'off', // not necessary IMHO 'jsx-a11y/accessible-emoji': 'warn', 'jsx-a11y/alt-text': 'warn', 'jsx-a11y/anchor-has-content': [ 'error', { components: [''], }, ], 'jsx-a11y/anchor-is-valid': 'warn', 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn', 'jsx-a11y/aria-props': 'error', 'jsx-a11y/aria-proptypes': 'error', 'jsx-a11y/aria-role': 'error', 'jsx-a11y/aria-unsupported-elements': 'error', 'jsx-a11y/click-events-have-key-events': 'off', 'jsx-a11y/control-has-associated-label': [ 'warn', { labelAttributes: ['dangerouslySetInnerHTML'], ignoreElements: ['option', 'select', 'input', 'textarea', 'link'], depth: 5, }, ], 'jsx-a11y/heading-has-content': [ 'error', { components: [''], }, ], 'jsx-a11y/html-has-lang': 'error', 'jsx-a11y/iframe-has-title': 'warn', 'jsx-a11y/img-redundant-alt': 'error', 'jsx-a11y/interactive-supports-focus': 'warn', 'jsx-a11y/label-has-associated-control': [ 'warn', { labelComponents: ['FormGroup'], labelAttributes: ['label'], controlComponents: [ 'ReactDatePicker', 'Recaptcha', 'Captcha', 'DatePicker', 'SelectBox', 'CheckBox', 'Checkbox', 'Radio', 'TypeAhead', 'Typeahead', 'TextField', 'button', 'MultiText', 'ImageForm', 'HyperlinkForm', ], assert: 'either', depth: 5, }, ], 'jsx-a11y/label-has-for': 'off', // deprecated 'jsx-a11y/lang': 'error', 'jsx-a11y/media-has-caption': 'off', 'jsx-a11y/mouse-events-have-key-events': 'off', 'jsx-a11y/no-access-key': 'error', 'jsx-a11y/no-autofocus': 'warn', 'jsx-a11y/no-distracting-elements': 'warn', 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn', 'jsx-a11y/no-noninteractive-element-interactions': 'off', // annoying. allow event delegation 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn', 'jsx-a11y/no-noninteractive-tabindex': 'warn', 'jsx-a11y/no-onchange': 'off', 'jsx-a11y/no-redundant-roles': 'warn', 'jsx-a11y/no-static-element-interactions': 'off', // annoying. allow event delegation 'jsx-a11y/role-has-required-aria-props': 'error', 'jsx-a11y/role-supports-aria-props': 'error', 'jsx-a11y/scope': 'error', 'jsx-a11y/tabindex-no-positive': 'error', 'jsx-quotes': 'off', // handled by prettier 'key-spacing': 'off', // handled by prettier 'keyword-spacing': 'off', // handled by prettier 'line-comment-position': 'off', // handled by prettier 'linebreak-style': ['error', 'unix'], 'lines-around-comment': 'off', // handled by prettier 'lines-around-directive': 'off', // handled by prettier 'lines-between-class-members': 'off', // handled by prettier 'lodash-fp/consistent-compose': 'warn', 'lodash-fp/consistent-name': ['error', '_'], 'lodash-fp/no-argumentless-calls': 'error', 'lodash-fp/no-chain': 'warn', 'lodash-fp/no-extraneous-args': 'error', 'lodash-fp/no-extraneous-function-wrapping': 'error', 'lodash-fp/no-extraneous-iteratee-args': 'error', 'lodash-fp/no-for-each': [ 'warn', { noNative: false, }, ], 'lodash-fp/no-partial-of-curried': 'error', 'lodash-fp/no-single-composition': 'error', 'lodash-fp/no-submodule-destructuring': 'error', 'lodash-fp/no-unused-result': 'error', 'lodash-fp/prefer-compact': 'error', 'lodash-fp/prefer-composition-grouping': 'error', 'lodash-fp/prefer-constant': [ 'off', { arrowFunctions: false, }, ], 'lodash-fp/prefer-flat-map': 'warn', 'lodash-fp/prefer-get': 'warn', 'lodash-fp/prefer-identity': [ 'off', { arrowFunctions: false, }, ], 'lodash-fp/preferred-alias': 'warn', 'lodash-fp/use-fp': 'off', // don't use FP. use ramda! 'max-classes-per-file': 'off', // seeing false positives 'max-depth': 'off', 'max-len': 'off', // handled by prettier 'max-lines': 'off', // there are valid reasons to have long files sometimes (like this file) 'max-lines-per-function': 'off', // jest describe blocks are really long 'max-nested-callbacks': 'off', 'max-params': 'off', 'max-statements': 'off', 'max-statements-per-line': 'off', 'multiline-comment-style': 'off', // don't enforce comment style 'multiline-ternary': 'off', // handled by prettier 'new-cap': [ 'error', { newIsCap: true, newIsCapExceptions: [], capIsNew: false, capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'], }, ], 'new-parens': 'off', // handled by prettier 'newline-after-var': 'off', // handled by prettier 'newline-before-return': 'off', // handled by prettier 'newline-per-chained-call': 'off', // handled by prettier 'no-alert': 'warn', 'no-array-constructor': 'error', 'no-async-promise-executor': 'error', 'no-await-in-loop': 'error', 'no-bitwise': 'error', 'no-buffer-constructor': 'error', 'no-caller': 'error', 'no-case-declarations': 'error', 'no-catch-shadow': 'off', 'no-class-assign': 'error', 'no-compare-neg-zero': 'error', 'no-cond-assign': ['error', 'always'], 'no-confusing-arrow': 'off', // handled by prettier 'no-console': 'warn', 'no-const-assign': 'error', 'no-constant-condition': 'warn', 'no-continue': 'error', 'no-control-regex': 'error', 'no-debugger': 'error', 'no-delete-var': 'error', 'no-div-regex': 'off', 'no-dupe-args': 'error', 'no-dupe-class-members': 'error', 'no-dupe-keys': 'error', 'no-duplicate-case': 'error', 'no-duplicate-imports': 'off', 'no-else-return': 'error', 'no-empty': 'error', 'no-empty-character-class': 'error', 'no-empty-function': [ 'error', { allow: ['arrowFunctions', 'functions', 'methods'], }, ], 'no-empty-pattern': 'error', 'no-eq-null': 'off', 'no-eval': 'error', 'no-ex-assign': 'error', 'no-extend-native': 'error', 'no-extra-bind': 'error', 'no-extra-boolean-cast': 'error', 'no-extra-label': 'error', 'no-extra-parens': 'off', // handled by prettier 'no-extra-semi': 'off', // handled by prettier 'no-fallthrough': 'error', 'no-floating-decimal': 'error', 'no-func-assign': 'error', 'no-global-assign': [ 'error', { exceptions: [], }, ], 'no-implicit-coercion': [ 'off', { boolean: false, number: true, string: true, allow: [], }, ], 'no-implicit-globals': 'off', 'no-implied-eval': 'error', 'no-inline-comments': 'off', 'no-inner-declarations': 'error', 'no-invalid-regexp': 'error', 'no-invalid-this': 'off', 'no-irregular-whitespace': 'error', 'no-iterator': 'error', 'no-label-var': 'error', 'no-labels': [ 'error', { allowLoop: false, allowSwitch: false, }, ], 'no-lone-blocks': 'error', 'no-lonely-if': 'warn', 'no-loop-func': 'error', 'no-magic-numbers': 'off', 'no-misleading-character-class': 'error', 'no-mixed-operators': 'off', // handled by prettier 'no-mixed-requires': 'off', 'no-mixed-spaces-and-tabs': 'off', // handled by prettier 'no-multi-assign': 'off', // the alternative (multiple statements) is worse 'no-multi-spaces': 'off', // handled by prettier 'no-multi-str': 'error', 'no-multiple-empty-lines': 'off', // handled by prettier 'no-native-reassign': 'off', 'no-negated-condition': 'off', 'no-negated-in-lhs': 'off', 'no-nested-ternary': 'off', // nested ternaries are useful and prettier makes them easy to read 'no-new': 'error', 'no-new-func': 'error', 'no-new-object': 'error', 'no-new-require': 'error', 'no-new-symbol': 'error', 'no-new-wrappers': 'error', 'no-obj-calls': 'error', 'no-octal': 'error', 'no-octal-escape': 'error', 'no-param-reassign': [ 'error', { props: true, }, ], 'no-path-concat': 'error', 'no-plusplus': 'off', // plusplus is good. why disallow it? 'no-process-env': 'off', 'no-process-exit': 'error', 'no-proto': 'error', 'no-prototype-builtins': 'error', 'no-redeclare': 'error', 'no-regex-spaces': 'error', 'no-restricted-globals': 'off', 'no-restricted-imports': 'off', 'no-restricted-modules': 'off', 'no-restricted-properties': [ 'error', { object: 'arguments', property: 'callee', message: 'arguments.callee is deprecated', }, { property: '__defineGetter__', message: 'Please use Object.defineProperty instead.', }, { property: '__defineSetter__', message: 'Please use Object.defineProperty instead.', }, { object: 'Math', property: 'pow', message: 'Use the exponentiation operator (**) instead.', }, ], 'no-restricted-syntax': [ 'warn', 'ForInStatement', 'ForOfStatement', 'LabeledStatement', 'WithStatement', ], 'no-return-assign': 'error', 'no-return-await': 'error', 'no-script-url': 'error', 'no-self-assign': 'error', 'no-self-compare': 'error', 'no-sequences': 'error', 'no-shadow': 'error', 'no-shadow-restricted-names': 'error', 'no-spaced-func': 'off', // handled by prettier 'no-sparse-arrays': 'error', 'no-sync': 'off', 'no-tabs': 'error', 'no-template-curly-in-string': 'error', 'no-ternary': 'off', // ternary is good. nested ternary is bad. 'no-this-before-super': 'error', 'no-throw-literal': 'error', 'no-trailing-spaces': 'off', // handled by prettier 'no-undef': 'error', 'no-undef-init': 'error', 'no-undefined': 'off', 'no-underscore-dangle': 'off', // this is a valid convention signifying private vars/methods 'no-unexpected-multiline': ['error'], 'no-unmodified-loop-condition': 'off', 'no-unneeded-ternary': [ 'warn', { defaultAssignment: false, }, ], 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', 'no-unused-expressions': [ 'error', { allowShortCircuit: false, allowTernary: false, }, ], 'no-unused-labels': 'error', 'no-unused-vars': [ 'warn', { vars: 'local', args: 'after-used', ignoreRestSiblings: true, }, ], 'no-use-before-define': ['error', 'nofunc'], 'no-useless-call': 'off', 'no-useless-catch': 'warn', 'no-useless-computed-key': 'error', 'no-useless-concat': 'error', 'no-useless-constructor': 'error', 'no-useless-escape': 'error', 'no-useless-rename': [ 'error', { ignoreDestructuring: false, ignoreImport: false, ignoreExport: false, }, ], 'no-useless-return': 'warn', 'no-var': 'error', 'no-void': 'off', // void is useful 'no-warning-comments': 'off', 'no-whitespace-before-property': 'off', // handled by prettier 'no-with': 'error', 'node/exports-style': 'off', // export style should depend on needs 'node/no-deprecated-api': 'warn', 'node/no-extraneous-import': 'off', // handled by import/no-extraneous-dependencies 'node/no-extraneous-require': 'off', // handled by import/no-extraneous-dependencies 'node/no-hide-core-modules': 'off', // deprecated 'node/no-missing-import': 'off', // handled by import/no-unresolved 'node/no-missing-require': 'off', // handled by import/no-unresolved 'node/no-unpublished-bin': 'error', 'node/no-unpublished-import': 'off', // breaks with hoisted dependencies 'node/no-unpublished-require': 'off', // breaks with hoisted dependencies 'node/no-unsupported-features': 'off', // deprecated 'node/no-unsupported-features/es-builtins': 'off', // will cause false positives for browser projects - opt-in for node projects 'node/no-unsupported-features/es-syntax': 'off', // not needed because we use babel 'node/no-unsupported-features/node-builtins': 'off', // will cause false positives for browser projects - opt-in for node projects 'node/prefer-global/buffer': 'off', 'node/prefer-global/console': 'off', 'node/prefer-global/process': 'off', 'node/prefer-global/text-decoder': 'off', 'node/prefer-global/text-encoder': 'off', 'node/prefer-global/url-search-params': 'off', 'node/prefer-global/url': 'off', 'node/process-exit-as-throw': 'error', 'node/shebang': 'error', 'nonblock-statement-body-position': 'off', // handled by prettier 'object-curly-newline': 'off', // handled by prettier 'object-curly-spacing': 'off', // handled by prettier 'object-property-newline': 'off', // handled by prettier 'object-shorthand': 'off', // handled by prettier 'one-var': ['warn', 'never'], 'one-var-declaration-per-line': 'off', // handled by prettier 'operator-assignment': ['warn', 'always'], 'operator-linebreak': 'off', // handled by prettier 'padded-blocks': 'off', // handled by prettier 'padding-line-between-statements': 'off', // handled by prettier 'prefer-arrow-callback': [ 'warn', { allowNamedFunctions: false, allowUnboundThis: true, }, ], 'prefer-const': [ 'warn', { destructuring: 'any', ignoreReadBeforeAssign: true, }, ], 'prefer-destructuring': 'off', 'prefer-numeric-literals': 'warn', 'prefer-object-spread': 'warn', 'prefer-promise-reject-errors': [ 'warn', { allowEmptyReject: true, }, ], 'prefer-reflect': 'off', 'prefer-rest-params': 'warn', 'prefer-spread': 'warn', 'prefer-template': 'warn', 'promise/always-return': 'warn', 'promise/avoid-new': 'off', // new Promise() is often necessary 'promise/catch-or-return': 'error', 'promise/no-callback-in-promise': 'off', // sometimes needed 'promise/no-native': 'off', // node supports promises nativly, browsers are polyfilled 'promise/no-nesting': 'warn', 'promise/no-new-statics': 'error', 'promise/no-promise-in-callback': 'off', // sometimes needed 'promise/no-return-in-finally': 'error', 'promise/no-return-wrap': 'warn', 'promise/param-names': 'warn', 'promise/prefer-await-to-callbacks': 'off', // need callbacks for interoperability w/ other libs 'promise/prefer-await-to-then': 'warn', 'promise/valid-params': 'error', 'quote-props': 'off', // handled by prettier quotes: 'off', // handled by prettier radix: 'error', 'react/boolean-prop-naming': 'warn', 'react/button-has-type': 'error', 'react/default-props-match-prop-types': 'off', // buggy: See yannickcr/eslint-plugin-react#1468 'react/destructuring-assignment': 'off', // no need to enforce this 'react/display-name': 'off', // annoying for SFCs 'react/forbid-component-props': 'off', 'react/forbid-dom-props': 'off', // don't want to maintain a list of forbidden dom props 'react/forbid-elements': 'off', 'react/forbid-foreign-prop-types': 'warn', 'react/forbid-prop-types': 'off', 'react/jsx-boolean-value': ['error', 'never'], 'react/jsx-child-element-spacing': 'off', // handled by prettier 'react/jsx-closing-bracket-location': 'off', // handled by prettier 'react/jsx-closing-tag-location': 'off', // handled by prettier 'react/jsx-curly-brace-presence': 'off', // handled by prettier 'react/jsx-curly-spacing': 'off', // handled by prettier, 'react/jsx-equals-spacing': 'off', // handled by prettier 'react/jsx-filename-extension': ['error', {extensions: ['.js', '.jsx', '.tsx']}], 'react/jsx-first-prop-new-line': 'off', // handled by prettier 'react/jsx-fragments': 'off', // not yet. cms-packages@master is still on babel6 'react/jsx-handler-names': 'off', 'react/jsx-indent-props': 'off', // handled by prettier 'react/jsx-indent': 'off', // handled by prettier 'react/jsx-key': 'off', 'react/jsx-max-depth': 'off', // don't want to enforce this 'react/jsx-max-props-per-line': 'off', // handled by prettier 'react/jsx-no-bind': 'off', // premature optimization 'react/jsx-no-comment-textnodes': 'error', 'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}], 'react/jsx-no-literals': 'off', 'react/jsx-no-target-blank': 'error', 'react/jsx-no-undef': ['error', {allowGlobals: true}], 'react/jsx-one-expression-per-line': 'off', // handled by prettier 'react/jsx-pascal-case': ['error', {allowAllCaps: true, ignore: []}], 'react/jsx-props-no-multi-spaces': 'warn', 'react/jsx-sort-default-props': 'off', // unnecessary 'react/jsx-sort-prop-types': 'off', 'react/jsx-sort-props': [ 'off', {ignoreCase: true, callbacksLast: false, shorthandFirst: false, shorthandLast: false}, ], 'react/jsx-space-before-closing': 'off', // deprecated 'react/jsx-tag-spacing': 'off', // handled by prettier, 'react/jsx-uses-react': ['error'], 'react/jsx-uses-vars': 'error', 'react/jsx-wrap-multilines': 'off', // handled by prettier 'react/no-access-state-in-setstate': 'off', // would result in unnecessary code changes 'react/no-array-index-key': 'warn', 'react/no-children-prop': 'error', 'react/no-danger-with-children': 'error', 'react/no-danger': 'off', // we need this too often 'react/no-deprecated': ['error'], 'react/no-did-mount-set-state': 'off', // necessary for client-only initialization 'react/no-did-update-set-state': ['error'], 'react/no-direct-mutation-state': 'off', 'react/no-find-dom-node': 'error', 'react/no-is-mounted': 'error', 'react/no-multi-comp': ['warn', {ignoreStateless: true}], 'react/no-redundant-should-component-update': 'error', 'react/no-render-return-value': 'error', 'react/no-set-state': 'off', 'react/no-string-refs': ['warn'], 'react/no-this-in-sfc': 'error', 'react/no-typos': 'error', 'react/no-unescaped-entities': 'off', // conflicts with prettier 'react/no-unknown-property': 'error', 'react/no-unsafe': 'error', 'react/no-unused-prop-types': 'off', // so. many.bugs. see https://github.com/yannickcr/eslint-plugin-react/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+prop-types 'react/no-unused-state': 'error', 'react/no-will-update-set-state': 'error', 'react/prefer-es6-class': ['error', 'always'], // createClass is removed in react 16 'react/prefer-stateless-function': 'warn', 'react/prop-types': 'off', // so. many. bugs. see https://github.com/yannickcr/eslint-plugin-react/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+prop-types 'react/react-in-jsx-scope': 'error', 'react/require-default-props': 'off', 'react/require-optimization': 'off', 'react/require-render-return': 'error', 'react/self-closing-comp': ['warn', {component: true, html: true}], 'react/sort-comp': 'off', 'react/sort-prop-types': 'off', 'react/style-prop-object': 'error', 'react/void-dom-elements-no-children': 'off', 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'require-atomic-updates': 'error', 'require-await': 'off', 'require-jsdoc': 'off', // jsdoc is terrible 'require-unicode-regexp': 'off', // unnecessary boilerplate on a regex? no thanks 'require-yield': 'off', 'rest-spread-spacing': 'off', // handled by prettier semi: 'off', // handled by prettier 'semi-spacing': 'off', // handled by prettier 'semi-style': 'off', // handled by prettier 'sort-imports': 'off', // gets annoying fast. 'sort-keys': 'off', // gets annoying fast 'sort-vars': 'off', // gets annoying fast 'space-before-blocks': 'off', // handled by prettier 'space-before-function-paren': 'off', // handled by prettier 'space-in-parens': 'off', // handled by prettier 'space-infix-ops': 'off', // handled by prettier 'space-unary-ops': 'off', // handled by prettier, 'spaced-comment': 'off', // handled by prettier strict: ['error', 'never'], 'switch-colon-spacing': 'off', // handled by prettier 'symbol-description': 'error', 'template-curly-spacing': 'off', // handled by prettier 'template-tag-spacing': 'off', // handled by prettier 'unicode-bom': 'off', // handled by prettier 'unicorn/catch-error-name': 'off', // too heavy-handed 'unicorn/custom-error-definition': 'error', 'unicorn/error-message': 'error', 'unicorn/escape-case': 'warn', 'unicorn/explicit-length-check': 'off', // i don't understand why this is necessary 'unicorn/filename-case': 'off', // too heavy-handed 'unicorn/import-index': 'off', // why enforce this? 'unicorn/new-for-builtins': 'error', 'unicorn/no-abusive-eslint-disable': 'warn', 'unicorn/no-array-instanceof': 'error', 'unicorn/no-console-spaces': 'warn', 'unicorn/no-fn-reference-in-iterator': 'off', // would result in unnecessary code changes 'unicorn/no-hex-escape': 'off', // i don't understand why this is necessary 'unicorn/no-new-buffer': 'error', 'unicorn/no-process-exit': 'off', // allows it sometimes. process.exit should not be used. ever. 'unicorn/no-unreadable-array-destructuring': 'off', // extra commas are not unreadable. 'unicorn/no-unsafe-regex': 'warn', 'unicorn/no-unused-properties': 'warn', 'unicorn/number-literal-case': 'warn', 'unicorn/prefer-add-event-listener': 'warn', 'unicorn/prefer-exponentiation-operator': 'warn', 'unicorn/prefer-node-append': 'off', // node.append() not supported by IE11 'unicorn/prefer-query-selector': 'warn', 'unicorn/prefer-spread': 'warn', 'unicorn/prefer-starts-ends-with': 'warn', 'unicorn/prefer-type-error': 'warn', 'unicorn/regex-shorthand': 'warn', 'unicorn/throw-new-error': 'warn', 'use-isnan': 'error', 'valid-jsdoc': 'warn', 'valid-typeof': [ 'error', { requireStringLiterals: true, }, ], 'vars-on-top': 'error', 'wrap-iife': 'off', // handled by prettier 'wrap-regex': 'off', // too much noise 'yield-star-spacing': 'off', // handled by prettier yoda: 'error', }, overrides: [ { files: ['*.ts', '*.tsx'], parser: require.resolve('@typescript-eslint/parser'), plugins: ['@typescript-eslint'], rules: { 'no-undef': 'off', // false positive on typescript types 'no-unused-vars': 'off', // covered by @typescript-eslint/no-unused-vars 'prefer-spread': 'off', // ts can't polyfill Symbol.iterator. we have to use Array.from() 'react/prop-types': 'off', // See eslint-plugin-react#1461 '@typescript-eslint/adjacent-overload-signatures': 'error', '@typescript-eslint/array-type': ['warn', 'generic'], '@typescript-eslint/ban-types': 'off', // what would we ban? '@typescript-eslint/ban-ts-ignore': 'warn', '@typescript-eslint/camelcase': 'off', // prettier '@typescript-eslint/class-name-casing': 'off', // prettier '@typescript-eslint/explicit-function-return-type': 'off', // eww '@typescript-eslint/explicit-member-accessibility': 'off', // eww '@typescript-eslint/generic-type-naming': 'off', // mmeh '@typescript-eslint/indent': 'off', // prettier '@typescript-eslint/interface-name-prefix': 'off', // eww '@typescript-eslint/member-delimiter-style': 'off', // prettier '@typescript-eslint/member-naming': [ 'warn', { private: '^_', }, ], '@typescript-eslint/member-ordering': 'off', // too strict '@typescript-eslint/no-angle-bracket-type-assertion': 'warn', '@typescript-eslint/no-array-constructor': 'warn', '@typescript-eslint/no-empty-interface': 'warn', // sometimes you need an empty object, right? '@typescript-eslint/no-explicit-any': 'off', // sometimes you need this '@typescript-eslint/no-extraneous-class': 'warn', '@typescript-eslint/no-for-in-array': 'error', '@typescript-eslint/no-inferrable-types': 'warn', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'warn', '@typescript-eslint/no-non-null-assertion': 'off', // REALLY useful in unit tests '@typescript-eslint/no-object-literal-type-assertion': 'off', // REALLY useful in unit tests '@typescript-eslint/no-parameter-properties': 'warn', '@typescript-eslint/no-require-imports': 'off', // other rules warn about this '@typescript-eslint/no-this-alias': [ 'warn', { allowDestructuring: true, }, ], '@typescript-eslint/no-triple-slash-reference': 'warn', '@typescript-eslint/no-type-alias': 'off', // types > interfaces IMHO '@typescript-eslint/no-unnecessary-qualifier': 'warn', '@typescript-eslint/no-unnecessary-type-assertion': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { ignoreRestSiblings: true, }, ], '@typescript-eslint/no-use-before-define': ['error', 'nofunc'], '@typescript-eslint/no-useless-constructor': 'warn', '@typescript-eslint/no-var-requires': 'off', // we have too many warnings for this as-is '@typescript-eslint/prefer-function-type': 'warn', '@typescript-eslint/prefer-interface': 'off', // types > interfaces IMHO '@typescript-eslint/prefer-namespace-keyword': 'error', '@typescript-eslint/promise-function-async': 'off', // unexpected false positives '@typescript-eslint/restrict-plus-operands': 'error', '@typescript-eslint/type-annotation-spacing': 'off', // prettier }, }, ], }; ```

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

Just ran eslint. The issue doesn't seem to be related to any specific JS code.

eslint scripts "packages/*/src/**/*.js" "packages/*/__test__/**/*.js"

What did you expect to happen?

Display errors & warnings

What actually happened? Please include the actual, raw output from ESLint.

crashed with error: Cannot read property 'meta' of undefined

Output ``` ~/w/cms-packages-3 r/16.075 ❯ yarn run lint yarn run v1.12.3 $ eslint scripts "packages/*/src/**/*.js" "packages/*/__test__/**/*.js" TypeError: Cannot read property 'meta' of undefined at rules.forEach (/Users/ssorense/workspace/cms-packages-3/node_modules/eslint/lib/cli.js:97:34) at Map.forEach () at printResults (/Users/ssorense/workspace/cms-packages-3/node_modules/eslint/lib/cli.js:96:11) at Object.execute (/Users/ssorense/workspace/cms-packages-3/node_modules/eslint/lib/cli.js:217:17) at Object. (/Users/ssorense/workspace/cms-packages-3/node_modules/eslint/bin/eslint.js:78:28) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ~/w/cms-packages-3 r/16.075 ❯ ```

Are you willing to submit a pull request to fix this bug?

Unfortunately, I don't have time to contribute. I wish I could.

mysticatea commented 5 years ago

Thank you for the report.

It sounds like https://github.com/jest-community/eslint-plugin-jest/issues/268. Would you try to use the latest eslint-plugin-jest?

eslint-deprecated[bot] commented 5 years ago

Unfortunately, it looks like there wasn't enough interest from the team or community to implement this change. While we wish we'd be able to accommodate everyone's requests, we do need to prioritize. We've found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn't mean the idea isn't interesting or useful, just that it's not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.