kibana/packages/elastic-eslint-config-kibana/.eslintrc.js
Kibana Machine 4b712fda4b
[kbn/test] move types/ftr into src (#99555) (#100228)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-17 14:49:48 -04:00

81 lines
1.7 KiB
JavaScript

module.exports = {
extends: [
'./javascript.js',
'./typescript.js',
'./jest.js',
'./react.js',
],
plugins: [
'@kbn/eslint-plugin-eslint',
'prettier',
],
parserOptions: {
ecmaVersion: 6
},
env: {
es6: true
},
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'@kbn/eslint/module_migration': [
'error',
[
{
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`
},
{
from: 'numeral',
to: '@elastic/numeral',
},
{
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',
},
{
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`
},
{
from: 'tinymath',
to: '@kbn/tinymath',
disallowedMessage: `Don't use 'tinymath', use '@kbn/tinymath'`
},
{
from: '@kbn/test/types/ftr',
to: '@kbn/test',
disallowedMessage: `import from the root of @kbn/test instead`
},
],
],
},
};