kibana/packages/elastic-eslint-config-kibana/.eslintrc.js
Tiago Costa 0068c87d6f
chore(NA): add elastic prefix to eslint-config-kibana (#76059)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-31 20:13:06 +01:00

72 lines
1.4 KiB
JavaScript

module.exports = {
extends: [
'./javascript.js',
'./typescript.js',
'./jest.js',
'./react.js',
],
plugins: [
'@kbn/eslint-plugin-eslint',
'prettier',
],
parserOptions: {
ecmaVersion: 2018
},
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`
},
],
],
},
};