question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

camelCase ignoreDestructuring not ignored when destructuring happens in function parameters

See original GitHub issue

Tell us about your environment

  • **ESLint Version:**5.11.1
  • **Node Version:**10.9.0
  • npm Version: 6.4.1

What parser (default, Babel-ESLint, etc.) are you using? babel-eslint Please show your full configuration:

Configuration
module.exports = {
  root: true,
  extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
  plugins: ['prettier', 'react'],
  parser: 'babel-eslint',
  parserOptions: {
    ecmaVersion: 8,
    sourceType: 'module',
    ecmaFeatures: {
      jsx: true,
    },
  },
  rules: {
    camelcase: ['error', { ignoreDestructuring: true }],
    'react/jsx-filename-extension': [0],
  },
};

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

import React from 'react';

const SectionFormattedText = ({ field_formatted_text }) => (
  <div dangerouslySetInnerHTML={{ __html: field_formatted_text.processed }} />
);

export default SectionFormattedText;
eslint --ignore-path .gitignore \"**/*.{js,jsx}\"",

What did you expect to happen? camelCased field_formatted_text to be ignored

What actually happened? Please include the actual, raw output from ESLint. 4:43 error Identifier 'field_formatted_text' is not in camel case camelcase

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dcorbcommented, Aug 2, 2019

Thanks @Rawphs , that’s it

0reactions
kaicataldocommented, Aug 14, 2019

@liunate Feel free to open up a new issue! We’ve found that reopened stale issues tend to still not get much attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent Error with Default {} when Destructuring
When you call a function and you forget to pass an argument. The value is by default undefined . function hi(person) { ...
Read more >
camelcase - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
camelCase in front, snake_case in the back : r/javascript - Reddit
So when I get some data from the back, things are always in snake_case. Now the trouble is I want to be able...
Read more >
Disable check of camel case rule in eslint - Stack Overflow
Just get the same camelcase error without any change. The eslint documentation says just disable the entire rule but does not specify a...
Read more >
eslint | Yarn - Package Manager
... 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic) ... (Afnan Fahim); 9f18a81 Fix: Ignore destructuring assignment in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found