scratch-www/src/.eslintrc.js
Paul Kaplan 4c2b588926 Include react-hooks eslint plugin to prevent hooks usage errors.
I'm including this now because when implementing the studio follow
error messaging, I made a mistake (conditionally calling useState)
that was tough to track down, and this linter plugin prevents that.
2021-06-18 11:09:43 -04:00

23 lines
558 B
JavaScript

module.exports = {
root: true,
extends: ['scratch', 'scratch/es6', 'scratch/react'],
env: {
browser: true
},
globals: {
process: true
},
plugins: ['json', 'react-hooks'],
settings: {
react: {
version: 'detect'
}
},
rules: {
'camelcase': [2, {
properties: 'never', // This is from the base `scratch` config
allow: ['^UNSAFE_'] // Allow until migrated to new lifecycle methods
}],
'react-hooks/rules-of-hooks': 'error'
}
};