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`
39 lines
716 B
JavaScript
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',
|
|
},
|
|
},
|
|
}
|