Files
xen-orchestra/.eslintrc.js

53 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-11-17 17:42:48 +01:00
module.exports = {
2019-02-20 11:05:57 +01:00
extends: [
2019-04-19 16:27:11 +02:00
'plugin:eslint-comments/recommended',
2019-02-20 11:05:57 +01:00
'standard',
'standard-jsx',
'prettier',
'prettier/standard',
'prettier/react',
],
2018-02-07 10:39:32 +01:00
globals: {
__DEV__: true,
$Dict: true,
$Diff: true,
2018-11-13 11:24:23 +01:00
$ElementType: true,
$Exact: true,
$Keys: true,
$PropertyType: true,
$Shape: true,
2018-02-07 10:39:32 +01:00
},
2019-03-25 17:01:02 +01:00
overrides: [
{
files: ['cli.js', '*-cli.js', '**/*cli*/**/*.js'],
2019-03-25 17:01:02 +01:00
rules: {
'no-console': 'off',
},
},
],
2018-02-07 10:39:32 +01:00
parser: 'babel-eslint',
2018-08-30 11:53:27 +02:00
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
},
},
2018-02-07 10:39:32 +01:00
rules: {
// disabled because XAPI objects are using camel case
camelcase: ['off'],
2019-09-02 09:45:38 +02:00
'react/jsx-handler-names': 'off',
// disabled because not always relevant, we might reconsider in the future
//
// enabled by https://github.com/standard/eslint-config-standard/commit/319b177750899d4525eb1210686f6aca96190b2f
//
// example: https://github.com/vatesfr/xen-orchestra/blob/31ed3767c67044ca445658eb6b560718972402f2/packages/xen-api/src/index.js#L156-L157
'lines-between-class-members': 'off',
2019-03-25 17:01:02 +01:00
'no-console': ['error', { allow: ['warn', 'error'] }],
2017-12-12 12:06:32 +01:00
},
2017-11-17 17:42:48 +01:00
}