kibana/packages/eslint-config-kibana/.eslintrc.js

33 lines
473 B
JavaScript
Raw Normal View History

Move eslint-config-kibana into core (#12725) * Initial commit * added actual config * version 0.0.1 * version 0.0.2 * [no-const-assign] Disallow assignment to const http://eslint.org/docs/rules/no-const-assign * [no-redeclare] Disallow redeclaring variables http://eslint.org/docs/rules/no-redeclare * version 0.0.3 * [no-unused-vars]: Disallow declaration of variables that are not used in the code. * Bump to 0.1.0. * upgrade deps in preperation for babel6 transition * 0.2.0-alpha1 * use yaml for readability * 0.2.0 * update/pin peed dependency versions * 0.2.1 * [quotes] allow template literals This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes * 0.2.2 * add object-curly-spacing and no-global-assign rules * sort .eslintrc.yaml rules * 0.3.0 * add basic react support * 0.4.0 * Disallow using 'context' in tests * 0.5.0 * move from .eslintrc.yaml to .eslintrc.js without .json generation (#6) * Implement import plugin (#7) * update deps * include eslint-plugin-import * Dereference import config (#8) * reorganize existing rules into groups * defreference eslint-plugin-import "recommended" config Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js * 0.6.0 * set environment info for import rule * 0.6.1 * update peerDependencies * 0.7.0 * Move eslint-config-kibana into packages directory
2017-07-25 10:02:14 +02:00
module.exports = {
Migrate from tslint (#33826) * chore(NA): remove tslint dependencies, configs and enable eslint typescript parser. * fix(NA): apply recommend eslint typescript rule.s * chore(NA): upgrade eslint package versions. * chore(NA): split javascript eslint config in an override section. * chore(NA): split all eslint configs with overrides. * chore(NA): remove missing console.log. * chore(NA): change eslint splits and overrides order. * chore(NA): replace tslint disable comments with eslint ones. * chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export * chore(NA): fixed multiple eslint typescript rule failures. * chore(NA): add tarfet folder to the eslint ignore. * chore(NA): apply prettier rule to ts type file. * chore(NA): remove last mentions to tslint * chore(NA): add old defined rules * chore(NA): missing port rules website * chore(na): ordered rules * chore(NA): solved eslint typescript problems. * chore(NA): fix spaced comment problems. * chore(NA): fix some more eslint typescript rules: import/order no-empty-interface * chore(NA): fix last rules and comment out what are the ones still failing. * chore(NA): comment out camelcase rule. * chore(NA): regenerate kbn pm dist. * chore(NA): updated snapshots. * chore(NA): updated snapshots. * chore(NA): disabled sort-keys rule. * chore(NA): remove rule prefer-arrow/prefer-arrow-functions. * chore(NA): fix for @typescript-eslint/no-var-requires rule. * chore(NA): fixes for @typescript-eslint/camelcase rule. * chore(NA): fix typo on eslint config kibana typescript. Co-Authored-By: mistic <tiagoffcc@hotmail.com> * chore(NA): remove legacy note after the intellij upgrade to 2019.1 * fix(NA): import order plugin. * chore(NA): fix ts ignore positions after auto fix. * fix(NA): performance issue with typescript eslint. * refact(NA): eslint configs organization. * chore(NA): apply resticted paths to ts files too. * chore(NA): split comment from eslint ignore.
2019-04-05 18:45:23 +02:00
extends: [
'./javascript.js',
'./typescript.js',
'./jest.js',
Move eslint-config-kibana into core (#12725) * Initial commit * added actual config * version 0.0.1 * version 0.0.2 * [no-const-assign] Disallow assignment to const http://eslint.org/docs/rules/no-const-assign * [no-redeclare] Disallow redeclaring variables http://eslint.org/docs/rules/no-redeclare * version 0.0.3 * [no-unused-vars]: Disallow declaration of variables that are not used in the code. * Bump to 0.1.0. * upgrade deps in preperation for babel6 transition * 0.2.0-alpha1 * use yaml for readability * 0.2.0 * update/pin peed dependency versions * 0.2.1 * [quotes] allow template literals This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes * 0.2.2 * add object-curly-spacing and no-global-assign rules * sort .eslintrc.yaml rules * 0.3.0 * add basic react support * 0.4.0 * Disallow using 'context' in tests * 0.5.0 * move from .eslintrc.yaml to .eslintrc.js without .json generation (#6) * Implement import plugin (#7) * update deps * include eslint-plugin-import * Dereference import config (#8) * reorganize existing rules into groups * defreference eslint-plugin-import "recommended" config Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js * 0.6.0 * set environment info for import rule * 0.6.1 * update peerDependencies * 0.7.0 * Move eslint-config-kibana into packages directory
2017-07-25 10:02:14 +02:00
],
Migrate from tslint (#33826) * chore(NA): remove tslint dependencies, configs and enable eslint typescript parser. * fix(NA): apply recommend eslint typescript rule.s * chore(NA): upgrade eslint package versions. * chore(NA): split javascript eslint config in an override section. * chore(NA): split all eslint configs with overrides. * chore(NA): remove missing console.log. * chore(NA): change eslint splits and overrides order. * chore(NA): replace tslint disable comments with eslint ones. * chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export * chore(NA): fixed multiple eslint typescript rule failures. * chore(NA): add tarfet folder to the eslint ignore. * chore(NA): apply prettier rule to ts type file. * chore(NA): remove last mentions to tslint * chore(NA): add old defined rules * chore(NA): missing port rules website * chore(na): ordered rules * chore(NA): solved eslint typescript problems. * chore(NA): fix spaced comment problems. * chore(NA): fix some more eslint typescript rules: import/order no-empty-interface * chore(NA): fix last rules and comment out what are the ones still failing. * chore(NA): comment out camelcase rule. * chore(NA): regenerate kbn pm dist. * chore(NA): updated snapshots. * chore(NA): updated snapshots. * chore(NA): disabled sort-keys rule. * chore(NA): remove rule prefer-arrow/prefer-arrow-functions. * chore(NA): fix for @typescript-eslint/no-var-requires rule. * chore(NA): fixes for @typescript-eslint/camelcase rule. * chore(NA): fix typo on eslint config kibana typescript. Co-Authored-By: mistic <tiagoffcc@hotmail.com> * chore(NA): remove legacy note after the intellij upgrade to 2019.1 * fix(NA): import order plugin. * chore(NA): fix ts ignore positions after auto fix. * fix(NA): performance issue with typescript eslint. * refact(NA): eslint configs organization. * chore(NA): apply resticted paths to ts files too. * chore(NA): split comment from eslint ignore.
2019-04-05 18:45:23 +02:00
plugins: ['@kbn/eslint-plugin-eslint'],
Migrate from tslint (#33826) * chore(NA): remove tslint dependencies, configs and enable eslint typescript parser. * fix(NA): apply recommend eslint typescript rule.s * chore(NA): upgrade eslint package versions. * chore(NA): split javascript eslint config in an override section. * chore(NA): split all eslint configs with overrides. * chore(NA): remove missing console.log. * chore(NA): change eslint splits and overrides order. * chore(NA): replace tslint disable comments with eslint ones. * chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export * chore(NA): fixed multiple eslint typescript rule failures. * chore(NA): add tarfet folder to the eslint ignore. * chore(NA): apply prettier rule to ts type file. * chore(NA): remove last mentions to tslint * chore(NA): add old defined rules * chore(NA): missing port rules website * chore(na): ordered rules * chore(NA): solved eslint typescript problems. * chore(NA): fix spaced comment problems. * chore(NA): fix some more eslint typescript rules: import/order no-empty-interface * chore(NA): fix last rules and comment out what are the ones still failing. * chore(NA): comment out camelcase rule. * chore(NA): regenerate kbn pm dist. * chore(NA): updated snapshots. * chore(NA): updated snapshots. * chore(NA): disabled sort-keys rule. * chore(NA): remove rule prefer-arrow/prefer-arrow-functions. * chore(NA): fix for @typescript-eslint/no-var-requires rule. * chore(NA): fixes for @typescript-eslint/camelcase rule. * chore(NA): fix typo on eslint config kibana typescript. Co-Authored-By: mistic <tiagoffcc@hotmail.com> * chore(NA): remove legacy note after the intellij upgrade to 2019.1 * fix(NA): import order plugin. * chore(NA): fix ts ignore positions after auto fix. * fix(NA): performance issue with typescript eslint. * refact(NA): eslint configs organization. * chore(NA): apply resticted paths to ts files too. * chore(NA): split comment from eslint ignore.
2019-04-05 18:45:23 +02:00
parserOptions: {
ecmaVersion: 2018
},
Move eslint-config-kibana into core (#12725) * Initial commit * added actual config * version 0.0.1 * version 0.0.2 * [no-const-assign] Disallow assignment to const http://eslint.org/docs/rules/no-const-assign * [no-redeclare] Disallow redeclaring variables http://eslint.org/docs/rules/no-redeclare * version 0.0.3 * [no-unused-vars]: Disallow declaration of variables that are not used in the code. * Bump to 0.1.0. * upgrade deps in preperation for babel6 transition * 0.2.0-alpha1 * use yaml for readability * 0.2.0 * update/pin peed dependency versions * 0.2.1 * [quotes] allow template literals This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes * 0.2.2 * add object-curly-spacing and no-global-assign rules * sort .eslintrc.yaml rules * 0.3.0 * add basic react support * 0.4.0 * Disallow using 'context' in tests * 0.5.0 * move from .eslintrc.yaml to .eslintrc.js without .json generation (#6) * Implement import plugin (#7) * update deps * include eslint-plugin-import * Dereference import config (#8) * reorganize existing rules into groups * defreference eslint-plugin-import "recommended" config Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js * 0.6.0 * set environment info for import rule * 0.6.1 * update peerDependencies * 0.7.0 * Move eslint-config-kibana into packages directory
2017-07-25 10:02:14 +02:00
env: {
es6: true,
Move eslint-config-kibana into core (#12725) * Initial commit * added actual config * version 0.0.1 * version 0.0.2 * [no-const-assign] Disallow assignment to const http://eslint.org/docs/rules/no-const-assign * [no-redeclare] Disallow redeclaring variables http://eslint.org/docs/rules/no-redeclare * version 0.0.3 * [no-unused-vars]: Disallow declaration of variables that are not used in the code. * Bump to 0.1.0. * upgrade deps in preperation for babel6 transition * 0.2.0-alpha1 * use yaml for readability * 0.2.0 * update/pin peed dependency versions * 0.2.1 * [quotes] allow template literals This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes * 0.2.2 * add object-curly-spacing and no-global-assign rules * sort .eslintrc.yaml rules * 0.3.0 * add basic react support * 0.4.0 * Disallow using 'context' in tests * 0.5.0 * move from .eslintrc.yaml to .eslintrc.js without .json generation (#6) * Implement import plugin (#7) * update deps * include eslint-plugin-import * Dereference import config (#8) * reorganize existing rules into groups * defreference eslint-plugin-import "recommended" config Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js * 0.6.0 * set environment info for import rule * 0.6.1 * update peerDependencies * 0.7.0 * Move eslint-config-kibana into packages directory
2017-07-25 10:02:14 +02:00
},
rules: {
Migrate from tslint (#33826) * chore(NA): remove tslint dependencies, configs and enable eslint typescript parser. * fix(NA): apply recommend eslint typescript rule.s * chore(NA): upgrade eslint package versions. * chore(NA): split javascript eslint config in an override section. * chore(NA): split all eslint configs with overrides. * chore(NA): remove missing console.log. * chore(NA): change eslint splits and overrides order. * chore(NA): replace tslint disable comments with eslint ones. * chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export * chore(NA): fixed multiple eslint typescript rule failures. * chore(NA): add tarfet folder to the eslint ignore. * chore(NA): apply prettier rule to ts type file. * chore(NA): remove last mentions to tslint * chore(NA): add old defined rules * chore(NA): missing port rules website * chore(na): ordered rules * chore(NA): solved eslint typescript problems. * chore(NA): fix spaced comment problems. * chore(NA): fix some more eslint typescript rules: import/order no-empty-interface * chore(NA): fix last rules and comment out what are the ones still failing. * chore(NA): comment out camelcase rule. * chore(NA): regenerate kbn pm dist. * chore(NA): updated snapshots. * chore(NA): updated snapshots. * chore(NA): disabled sort-keys rule. * chore(NA): remove rule prefer-arrow/prefer-arrow-functions. * chore(NA): fix for @typescript-eslint/no-var-requires rule. * chore(NA): fixes for @typescript-eslint/camelcase rule. * chore(NA): fix typo on eslint config kibana typescript. Co-Authored-By: mistic <tiagoffcc@hotmail.com> * chore(NA): remove legacy note after the intellij upgrade to 2019.1 * fix(NA): import order plugin. * chore(NA): fix ts ignore positions after auto fix. * fix(NA): performance issue with typescript eslint. * refact(NA): eslint configs organization. * chore(NA): apply resticted paths to ts files too. * chore(NA): split comment from eslint ignore.
2019-04-05 18:45:23 +02:00
'@kbn/eslint/module_migration': [
'error',
[
{
from: 'expect.js',
to: '@kbn/expect',
},
{
from: 'x-pack',
toRelative: 'x-pack',
},
],
],
Move eslint-config-kibana into core (#12725) * Initial commit * added actual config * version 0.0.1 * version 0.0.2 * [no-const-assign] Disallow assignment to const http://eslint.org/docs/rules/no-const-assign * [no-redeclare] Disallow redeclaring variables http://eslint.org/docs/rules/no-redeclare * version 0.0.3 * [no-unused-vars]: Disallow declaration of variables that are not used in the code. * Bump to 0.1.0. * upgrade deps in preperation for babel6 transition * 0.2.0-alpha1 * use yaml for readability * 0.2.0 * update/pin peed dependency versions * 0.2.1 * [quotes] allow template literals This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes * 0.2.2 * add object-curly-spacing and no-global-assign rules * sort .eslintrc.yaml rules * 0.3.0 * add basic react support * 0.4.0 * Disallow using 'context' in tests * 0.5.0 * move from .eslintrc.yaml to .eslintrc.js without .json generation (#6) * Implement import plugin (#7) * update deps * include eslint-plugin-import * Dereference import config (#8) * reorganize existing rules into groups * defreference eslint-plugin-import "recommended" config Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js * 0.6.0 * set environment info for import rule * 0.6.1 * update peerDependencies * 0.7.0 * Move eslint-config-kibana into packages directory
2017-07-25 10:02:14 +02:00
}
Migrate from tslint (#33826) * chore(NA): remove tslint dependencies, configs and enable eslint typescript parser. * fix(NA): apply recommend eslint typescript rule.s * chore(NA): upgrade eslint package versions. * chore(NA): split javascript eslint config in an override section. * chore(NA): split all eslint configs with overrides. * chore(NA): remove missing console.log. * chore(NA): change eslint splits and overrides order. * chore(NA): replace tslint disable comments with eslint ones. * chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export * chore(NA): fixed multiple eslint typescript rule failures. * chore(NA): add tarfet folder to the eslint ignore. * chore(NA): apply prettier rule to ts type file. * chore(NA): remove last mentions to tslint * chore(NA): add old defined rules * chore(NA): missing port rules website * chore(na): ordered rules * chore(NA): solved eslint typescript problems. * chore(NA): fix spaced comment problems. * chore(NA): fix some more eslint typescript rules: import/order no-empty-interface * chore(NA): fix last rules and comment out what are the ones still failing. * chore(NA): comment out camelcase rule. * chore(NA): regenerate kbn pm dist. * chore(NA): updated snapshots. * chore(NA): updated snapshots. * chore(NA): disabled sort-keys rule. * chore(NA): remove rule prefer-arrow/prefer-arrow-functions. * chore(NA): fix for @typescript-eslint/no-var-requires rule. * chore(NA): fixes for @typescript-eslint/camelcase rule. * chore(NA): fix typo on eslint config kibana typescript. Co-Authored-By: mistic <tiagoffcc@hotmail.com> * chore(NA): remove legacy note after the intellij upgrade to 2019.1 * fix(NA): import order plugin. * chore(NA): fix ts ignore positions after auto fix. * fix(NA): performance issue with typescript eslint. * refact(NA): eslint configs organization. * chore(NA): apply resticted paths to ts files too. * chore(NA): split comment from eslint ignore.
2019-04-05 18:45:23 +02:00
};