Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Erasmus <jerasmus@gitlab.com>2020-09-22 11:39:52 +0300
committerJacques Erasmus <jerasmus@gitlab.com>2020-09-22 11:39:52 +0300
commit5421dfc32910144cefb01986243ed085453b69dc (patch)
tree7bfdc86e2bc294638300610cc27b030ed9385034
parentaaed8bea601bf6deb1df418755976f97747ed98f (diff)
parentb3397f40ad0f8fc5b6cbbdd6ccdf0f003178288d (diff)
Merge branch '862-replace-eslint-config-with-eslint-plugin' into 'master'
Replace @gitlab/eslint-config with @gitlab/eslint-plugin Closes #862 See merge request gitlab-org/gitlab-docs!1173
-rw-r--r--.eslintrc.yml2
-rw-r--r--content/frontend/default/default.js2
-rw-r--r--content/frontend/default/directives/stick_to_footer.js2
-rw-r--r--content/frontend/default/setup_table_of_contents.js4
-rw-r--r--content/frontend/shared/components/gl_icon.vue2
-rw-r--r--content/frontend/shared/constants.js4
-rw-r--r--package.json2
-rw-r--r--spec/frontend/shared/components/gl_icon_spec.js2
-rw-r--r--yarn.lock84
9 files changed, 66 insertions, 38 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index aa4628a9..df0333d3 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -1,6 +1,6 @@
root: true
extends:
- - '@gitlab'
+ - 'plugin:@gitlab/default'
env:
jest: true
parserOptions:
diff --git a/content/frontend/default/default.js b/content/frontend/default/default.js
index a9e9ea52..dd6e5dac 100644
--- a/content/frontend/default/default.js
+++ b/content/frontend/default/default.js
@@ -1,5 +1,5 @@
import Vue from 'vue';
-import setupTableOfContents from './setup_table_of_contents';
+import { setupTableOfContents } from './setup_table_of_contents';
import NavigationToggle from './components/navigation_toggle.vue';
import VersionBanner from './components/version_banner.vue';
diff --git a/content/frontend/default/directives/stick_to_footer.js b/content/frontend/default/directives/stick_to_footer.js
index add7201e..c8b776aa 100644
--- a/content/frontend/default/directives/stick_to_footer.js
+++ b/content/frontend/default/directives/stick_to_footer.js
@@ -17,7 +17,7 @@ const getTopOffset = (height, offsetHeight) => {
return 0;
};
-export default {
+export const StickToFooter = {
bind(el, { value }) {
let contentHeight;
const mainEl = document.querySelector(value);
diff --git a/content/frontend/default/setup_table_of_contents.js b/content/frontend/default/setup_table_of_contents.js
index 58dec30a..aa5dfa89 100644
--- a/content/frontend/default/setup_table_of_contents.js
+++ b/content/frontend/default/setup_table_of_contents.js
@@ -1,6 +1,6 @@
import Vue from 'vue';
import TableOfContents from './components/table_of_contents.vue';
-import StickToFooter from './directives/stick_to_footer';
+import { StickToFooter } from './directives/stick_to_footer';
import { parseTOC } from '../shared/toc/parse_toc';
const SIDEBAR_SELECTOR = 'doc-nav';
@@ -8,7 +8,7 @@ const MARKDOWN_TOC_ID = 'markdown-toc';
const HELP_AND_FEEDBACK_ID = 'help-and-feedback';
const MAIN_SELECTOR = '.js-main-wrapper';
-export default () => {
+export const setupTableOfContents = () => {
const sidebar = document.getElementById(SIDEBAR_SELECTOR);
const menu = document.getElementById(MARKDOWN_TOC_ID);
const main = document.querySelector(MAIN_SELECTOR);
diff --git a/content/frontend/shared/components/gl_icon.vue b/content/frontend/shared/components/gl_icon.vue
index d40aded1..79b473e3 100644
--- a/content/frontend/shared/components/gl_icon.vue
+++ b/content/frontend/shared/components/gl_icon.vue
@@ -1,6 +1,6 @@
<script>
import data from '@gitlab/svgs/dist/icons.json';
-import iconSizeOptions from '../constants';
+import { iconSizeOptions } from '../constants';
let iconValidator = () => true;
diff --git a/content/frontend/shared/constants.js b/content/frontend/shared/constants.js
index ad764b74..0fc7a0b1 100644
--- a/content/frontend/shared/constants.js
+++ b/content/frontend/shared/constants.js
@@ -1,3 +1 @@
-const iconSizeOptions = [8, 10, 12, 14, 16, 18, 24, 32, 48, 72];
-
-export default iconSizeOptions;
+export const iconSizeOptions = [8, 10, 12, 14, 16, 18, 24, 32, 48, 72];
diff --git a/package.json b/package.json
index d1c72689..f310a0c1 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
- "@gitlab/eslint-config": "^3.0.0",
+ "@gitlab/eslint-plugin": "^4.0.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-replace": "^2.3.3",
diff --git a/spec/frontend/shared/components/gl_icon_spec.js b/spec/frontend/shared/components/gl_icon_spec.js
index 81525e87..603fafef 100644
--- a/spec/frontend/shared/components/gl_icon_spec.js
+++ b/spec/frontend/shared/components/gl_icon_spec.js
@@ -1,6 +1,6 @@
import { shallowMount, createLocalVue } from '@vue/test-utils';
import GlIcon from '../../../../content/frontend/shared/components/gl_icon.vue';
-import iconSizeOptions from '../../../../content/frontend/shared/constants';
+import { iconSizeOptions } from '../../../../content/frontend/shared/constants';
const ICONS_PATH = '/path/to/icons.svg';
const TEST_SIZE = 8;
diff --git a/yarn.lock b/yarn.lock
index f33e241b..e102796f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -860,34 +860,20 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
-"@gitlab/eslint-config@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@gitlab/eslint-config/-/eslint-config-3.0.0.tgz#9a93662ffefb7792d5d0d96d876c316f2c393315"
- integrity sha512-wlMpcl4q4hTnvmdPB9yuD+ZIi39P2ZCSfp3LQYSvbSXCF3POfyjRRe4tK7cerKrawjmJmII8YvNnIg2Ip9eKnQ==
+"@gitlab/eslint-plugin@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-4.0.0.tgz#7beba53dea74f458d92040a8b2652e4fd60a6cc7"
+ integrity sha512-Gba9HXwWOLAN+O2H8WmGNPZFQ410wiGFmhgDQ5Sx4ic/N1ymtwNen2pnsaWcw8KK/1vAB/rHNUhH4Xu/l/mfMg==
dependencies:
- "@gitlab/eslint-plugin-i18n" "^1.1.0"
- "@gitlab/eslint-plugin-vue-i18n" "^2.0.0"
babel-eslint "^10.0.3"
eslint-config-airbnb-base "^14.0.0"
eslint-config-prettier "^6.10.0"
eslint-plugin-babel "^5.3.0"
eslint-plugin-filenames "^1.3.2"
eslint-plugin-import "^2.20.1"
+ eslint-plugin-jest "^23.8.2"
eslint-plugin-promise "^4.2.1"
- eslint-plugin-vue "^6.0.1"
-
-"@gitlab/eslint-plugin-i18n@^1.1.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin-i18n/-/eslint-plugin-i18n-1.1.0.tgz#e494d599e644ce3a094ea85f87dbbda41a924c5e"
- integrity sha512-Cwm7sLtQnUDqvxE9Ez8UMslyosPCpMVLxBnFb+2n6QcBZmXRao4aNSVRkmlsDZYgYegWhOGn3Qq3MLy4BSqauQ==
- dependencies:
- requireindex "~1.1.0"
-
-"@gitlab/eslint-plugin-vue-i18n@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin-vue-i18n/-/eslint-plugin-vue-i18n-2.0.0.tgz#5a01912d9d5a7524539d678f09cac6fa57d6d838"
- integrity sha512-z72ysu5AgjL/oWPckvNrMWUnkcFJhtZT0oqeSgN97NyktrvYMMpAOjSSeu2Nv+HLTD5vk9w/fG3zskp/qgT+lw==
- dependencies:
+ eslint-plugin-vue "^6.2.1"
vue-eslint-parser "^7.0.0"
"@gitlab/svgs@^1.85.0":
@@ -1252,6 +1238,11 @@
dependencies:
"@types/istanbul-lib-report" "*"
+"@types/json-schema@^7.0.3":
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
+ integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
+
"@types/json5@^0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
@@ -1306,6 +1297,29 @@
dependencies:
"@types/yargs-parser" "*"
+"@typescript-eslint/experimental-utils@^2.5.0":
+ version "2.34.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f"
+ integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==
+ dependencies:
+ "@types/json-schema" "^7.0.3"
+ "@typescript-eslint/typescript-estree" "2.34.0"
+ eslint-scope "^5.0.0"
+ eslint-utils "^2.0.0"
+
+"@typescript-eslint/typescript-estree@2.34.0":
+ version "2.34.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
+ integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
+ dependencies:
+ debug "^4.1.1"
+ eslint-visitor-keys "^1.1.0"
+ glob "^7.1.6"
+ is-glob "^4.0.1"
+ lodash "^4.17.15"
+ semver "^7.3.2"
+ tsutils "^3.17.1"
+
"@vue/component-compiler-utils@^3.0.0", "@vue/component-compiler-utils@^3.1.2":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.2.0.tgz#8f85182ceed28e9b3c75313de669f83166d11e5d"
@@ -2623,12 +2637,19 @@ eslint-plugin-import@^2.20.1:
resolve "^1.17.0"
tsconfig-paths "^3.9.0"
+eslint-plugin-jest@^23.8.2:
+ version "23.20.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz#e1d69c75f639e99d836642453c4e75ed22da4099"
+ integrity sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==
+ dependencies:
+ "@typescript-eslint/experimental-utils" "^2.5.0"
+
eslint-plugin-promise@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==
-eslint-plugin-vue@^6.0.1:
+eslint-plugin-vue@^6.2.1:
version "6.2.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe"
integrity sha512-Nhc+oVAHm0uz/PkJAWscwIT4ijTrK5fqNqz9QB1D35SbbuMG1uB6Yr5AJpvPSWg+WOw7nYNswerYh0kOk64gqQ==
@@ -2657,6 +2678,13 @@ eslint-utils@^1.4.3:
dependencies:
eslint-visitor-keys "^1.1.0"
+eslint-utils@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
+ integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
+ dependencies:
+ eslint-visitor-keys "^1.1.0"
+
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
@@ -5326,11 +5354,6 @@ require-main-filename@^2.0.0:
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
-requireindex@~1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162"
- integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI=
-
resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
@@ -6089,11 +6112,18 @@ tsconfig@^7.0.0:
strip-bom "^3.0.0"
strip-json-comments "^2.0.0"
-tslib@^1.10.0, tslib@^1.9.0:
+tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
+tsutils@^3.17.1:
+ version "3.17.1"
+ resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
+ integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
+ dependencies:
+ tslib "^1.8.1"
+
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"