2017-07-25 10:02:14 +02:00
|
|
|
module.exports = {
|
2019-04-05 18:45:23 +02:00
|
|
|
extends: [
|
|
|
|
'./javascript.js',
|
|
|
|
'./typescript.js',
|
|
|
|
'./jest.js',
|
2019-10-29 14:15:33 +01:00
|
|
|
'./react.js',
|
2017-07-25 10:02:14 +02:00
|
|
|
],
|
2019-12-12 17:16:24 +01:00
|
|
|
|
|
|
|
plugins: [
|
|
|
|
'@kbn/eslint-plugin-eslint',
|
|
|
|
'prettier',
|
|
|
|
],
|
2018-11-16 00:40:01 +01:00
|
|
|
|
2019-04-05 18:45:23 +02:00
|
|
|
parserOptions: {
|
2019-06-03 19:52:38 +02:00
|
|
|
ecmaVersion: 2018
|
2018-11-16 00:40:01 +01:00
|
|
|
},
|
|
|
|
|
2017-07-25 10:02:14 +02:00
|
|
|
env: {
|
2019-06-03 19:52:38 +02:00
|
|
|
es6: true,
|
2017-07-25 10:02:14 +02:00
|
|
|
},
|
|
|
|
|
2019-12-14 23:17:59 +01:00
|
|
|
rules: {
|
|
|
|
'prettier/prettier': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
endOfLine: 'auto',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
'@kbn/eslint/module_migration': [
|
|
|
|
'error',
|
|
|
|
[
|
2019-12-09 23:59:07 +01:00
|
|
|
{
|
2019-12-14 23:17:59 +01:00
|
|
|
from: 'expect.js',
|
|
|
|
to: '@kbn/expect',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: 'mkdirp',
|
|
|
|
to: false,
|
|
|
|
disallowedMessage: `Don't use 'mkdirp', use the new { recursive: true } option of Fs.mkdir instead`
|
|
|
|
},
|
2020-06-03 19:07:11 +02:00
|
|
|
{
|
|
|
|
from: 'numeral',
|
|
|
|
to: '@elastic/numeral',
|
|
|
|
},
|
2019-12-14 23:17:59 +01:00
|
|
|
{
|
|
|
|
from: '@kbn/elastic-idx',
|
|
|
|
to: false,
|
|
|
|
disallowedMessage: `Don't use idx(), use optional chaining syntax instead https://ela.st/optchain`
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: 'x-pack',
|
|
|
|
toRelative: 'x-pack',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: 'react-router',
|
|
|
|
to: 'react-router-dom',
|
2019-11-12 15:33:54 +01:00
|
|
|
},
|
2020-06-04 13:43:21 +02:00
|
|
|
{
|
|
|
|
from: '@kbn/ui-shared-deps/monaco',
|
|
|
|
to: '@kbn/monaco',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: 'monaco-editor',
|
|
|
|
to: false,
|
|
|
|
disallowedMessage: `Don't import monaco directly, use or add exports to @kbn/monaco`
|
|
|
|
},
|
2019-04-05 18:45:23 +02:00
|
|
|
],
|
2019-12-14 23:17:59 +01:00
|
|
|
],
|
|
|
|
},
|
2019-04-05 18:45:23 +02:00
|
|
|
};
|