camelCase ignoreDestructuring not ignored when destructuring happens in function parameters
See original GitHub issueTell 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:
- Created 5 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @Rawphs , that’s it
@liunate Feel free to open up a new issue! We’ve found that reopened stale issues tend to still not get much attention.