reddichat-flat/.eslint.defaults.js

35 lines
721 B
JavaScript
Raw Normal View History

2020-07-12 03:45:53 -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',
2020-07-12 21:07:47 -05:00
'no-shadow': 'off',
2020-07-12 03:45:53 -05:00
'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;