const
for coffeescript. requires eslint-plugin-coffee
npm i -D eslint-plugin-coffee eslint-plugin-coffee-scope
module.exports = {
plugins: ['coffee', 'coffee-scope'],
parser: 'eslint-plugin-coffee',
rules: {
'coffee-scope/const': 'error'
}
}
variable = 10
variable = 20 # "Can't reassign variable 'variable'"
func = ->
variable = 30 # "Can't reassign variable 'variable'"