xen-orchestra/scripts/babel-eslintrc.js
Pierre Donias 18d03a076b
fix(xo-web/backup/restore): don't use UNSAFE_componentWillReceiveProps (#6364)
Introduced by 7d6e832226

`UNSAFE_componentWillReceiveProps` method was only introduced in React 16 but we
are using React 15
`.eslintrc`: ask eslint to check the React version so that it doesn't suggest to
change it to `UNSAFE_componentWillReceiveProps`
2022-08-11 11:19:07 +02:00

39 lines
716 B
JavaScript

'use strict'
module.exports = {
overrides: [
{
files: ['src/**/*'],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
},
sourceType: 'module',
},
rules: {
// Native module (and this rule) requires file extensions, but Babel does not
'n/no-missing-import': 'off',
'n/no-unsupported-features/es-syntax': 'off',
'n/shebang': [
'error',
{
convertPath: {
'src/**/*.{,c,m}js': ['^src/(.+)$', 'dist/$1'],
},
},
],
},
},
],
settings: {
react: {
version: 'detect',
},
},
}