According to the Airbnb doc, this is the best practice for naming objects
// bad
const OBJEcttsssss = {};
// good
const thisIsMyObject = {};
But which rule I need to add to achieve the same
Here is my .eslintrc.json
{
"extends": "airbnb",
"env": {
"browser": true,
"node": true
},
"rules":{
"camelcase":true
}
}
I've added camelcase
rule but it didn't work
Also, I can't find the rules belong to the following
1) Variable naming 2) Function naming 3) Class Naming
You are not defining the rule correctly it need to be an array
eg : "camelcase": [2, {"properties": "always"}]
More info about the options there : https://eslint.org/docs/2.0.0/rules/camelcase
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.