How to create a Eslint Rules to validate only capital constant variable

Viewed 403

Is there any Eslint rules which is used to validate to only allow the capital variable in defined .js files..

Eslint has a Require CamelCase (camelcase) rules and use "properties": "always" to validate camelCase imports. I'm wondering if there is similar type of rules or simply can I create one to validate below example.

cosntant.js

// valid
export const EDIT_FORM = "EDIT_FORM" 

// invalid 'warning'
export const edit_form = "EDIT_FORM" 
0 Answers
Related