mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-13 01:01:29 -05:00
4c2b588926
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.
23 lines
558 B
JavaScript
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'
|
|
}
|
|
};
|