diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /tooling/eslint-config | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'tooling/eslint-config')
-rw-r--r-- | tooling/eslint-config/conditionally_ignore.js | 19 | ||||
-rw-r--r-- | tooling/eslint-config/conditionally_ignore_ee.js | 5 |
2 files changed, 19 insertions, 5 deletions
diff --git a/tooling/eslint-config/conditionally_ignore.js b/tooling/eslint-config/conditionally_ignore.js new file mode 100644 index 00000000000..6132c1f52f4 --- /dev/null +++ b/tooling/eslint-config/conditionally_ignore.js @@ -0,0 +1,19 @@ +/* eslint-disable import/no-commonjs */ + +const IS_EE = require('../../config/helpers/is_ee_env'); +const IS_JH = require('../../config/helpers/is_jh_env'); + +const allPatterns = [ + { + ignore: !IS_EE, + pattern: 'ee/**/*.*', + }, + { + ignore: !IS_JH, + pattern: 'jh/**/*.*', + }, +]; + +const ignorePatterns = allPatterns.filter((x) => x.ignore).map((x) => x.pattern); + +module.exports = { ignorePatterns }; diff --git a/tooling/eslint-config/conditionally_ignore_ee.js b/tooling/eslint-config/conditionally_ignore_ee.js deleted file mode 100644 index e5e3c8013f4..00000000000 --- a/tooling/eslint-config/conditionally_ignore_ee.js +++ /dev/null @@ -1,5 +0,0 @@ -/* eslint-disable import/no-commonjs */ - -const IS_EE = require('../../config/helpers/is_ee_env'); - -module.exports = IS_EE ? {} : { ignorePatterns: ['ee/**/*.*'] }; |