persea-old/.eslint.defaults.js

34 lines
697 B
JavaScript
Raw Normal View History

2020-06-17 11:01:01 -05:00
const side = require('./side');
const config = {
globals: {
process: true,
AVOCADO_CLIENT: true,
AVOCADO_SERVER: true,
},
rules: {
'babel/object-curly-spacing': 'off',
'brace-style': ['error', 'stroustrup'],
'no-bitwise': ['error', {int32Hint: true}],
'no-plusplus': 'off',
'no-underscore-dangle': 'off',
'padded-blocks': ['error', {classes: 'always'}],
yoda: 'off',
},
settings: {
'import/resolver': {
webpack: {
config: `${__dirname}/webpack.config.js`,
},
},
},
};
if ('client' === side) {
config.rules['jsx-a11y/label-has-associated-control'] = [2, {
'assert': 'either',
}];
}
module.exports = config;