down votefavorite 
<https://stackoverflow.com/questions/47591578/create-eslint-rule-based-on-content-from-several-files#>

In my project I have app.js file and functions.json file. The app.js file 
contains some javascript logic and functions.js file contains a simple 
array with names of valid functions that can be used in app.js.

The functions names are dynamic and not known, that is why i need to create 
a custom rule.

I need to create an eslint rule validating that all functions listed in 
functions.js file are used in app.js. In case that not all of the functions 
are used or some other function is used (not from the list), i need to 
report an error.

Should i create a processor for function.json to get its content ? Or maybe 
i need to use fs module and get the function.json content before my rule 
runs on app.js file ? Any other ideas ?



-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to