@gitlab/eslint-plugin 12.0.0 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +18 -0
- package/.tool-versions +2 -0
- package/CHANGELOG.md +22 -0
- package/docs/development.md +1 -1
- package/lib/configs/default.js +1 -2
- package/package.json +12 -12
- package/scripts/integration_test/bootstrap.sh +44 -0
- package/gitlab_schema_apollo.graphql +0 -32571
package/.editorconfig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# top-most EditorConfig file
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
# Unix-style newlines with a newline ending every file
|
|
5
|
+
[*]
|
|
6
|
+
end_of_line = lf
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
|
|
10
|
+
[*.{js,json,vue,scss,rb,haml,yml}]
|
|
11
|
+
indent_size = 2
|
|
12
|
+
|
|
13
|
+
[*.{js,json,vue,scss,rb,haml,yml,md}]
|
|
14
|
+
indent_style = space
|
|
15
|
+
charset = utf-8
|
|
16
|
+
|
|
17
|
+
[*.{md,markdown,js.snap}]
|
|
18
|
+
trim_trailing_whitespace = false
|
package/.tool-versions
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# [12.2.0](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.1.0...v12.2.0) (2022-04-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Update eslint-config-airbnb-base to be eslint@8 compatible ([d006b5b](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/d006b5b9bdcbb70d6f8ddf0a89c7c37d59dd6507))
|
|
7
|
+
* Update eslint-plugin-import to have eslint@8 support ([c03cffd](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/c03cffd795fe516cb8c9d3d4f152b53c2de91d57))
|
|
8
|
+
|
|
9
|
+
# [12.1.0](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.0.1...v12.1.0) (2022-04-07)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* update eslint-plugin-vue to 8.5.0 ([37ac645](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/37ac645f4421ce06b083625c53356e9f6c7c5679))
|
|
15
|
+
|
|
16
|
+
## [12.0.1](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.0.0...v12.0.1) (2022-03-28)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* remove duplicate rule camelcase ([9f0523a](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/9f0523a5cc6d0d94c8df9618e567c4a4a847287e))
|
|
22
|
+
|
|
1
23
|
# [12.0.0](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v11.0.0...v12.0.0) (2022-03-28)
|
|
2
24
|
|
|
3
25
|
|
package/docs/development.md
CHANGED
|
@@ -32,4 +32,4 @@ All the current rule tests are available in the `tests/lib/rules` directory.
|
|
|
32
32
|
|
|
33
33
|
### Util tests
|
|
34
34
|
|
|
35
|
-
These utilities are useful to simplify writing new tests and can be found in the `test/lib/utils` directory.
|
|
35
|
+
These utilities are useful to simplify writing new tests and can be found in the `test/lib/utils` directory.
|
package/lib/configs/default.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const [, ...restrictedGlobals] = require('eslint-config-airbnb-base/rules/variables
|
|
1
|
+
const [, ...restrictedGlobals] = require('eslint-config-airbnb-base/rules/variables').rules[
|
|
2
2
|
'no-restricted-globals'
|
|
3
3
|
];
|
|
4
4
|
|
|
@@ -26,7 +26,6 @@ module.exports = {
|
|
|
26
26
|
ignoreDestructuring: true,
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
|
-
camelcase: 'off',
|
|
30
29
|
'unicorn/filename-case': ['error', { case: 'snakeCase' }],
|
|
31
30
|
'import/prefer-default-export': 'off',
|
|
32
31
|
'import/no-default-export': 'error',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/eslint-plugin",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "GitLab package for our custom eslint rules",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
"@babel/core": "^7.17.0",
|
|
34
34
|
"@babel/eslint-parser": "^7.17.0",
|
|
35
35
|
"@babel/eslint-plugin": "^7.17.7",
|
|
36
|
-
"eslint-config-airbnb-base": "^
|
|
36
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
37
37
|
"eslint-config-prettier": "^6.10.0",
|
|
38
38
|
"eslint-plugin-babel": "^5.3.0",
|
|
39
|
-
"eslint-plugin-
|
|
40
|
-
"eslint-plugin-import": "^2.22.1",
|
|
39
|
+
"eslint-plugin-import": "^2.25.2",
|
|
41
40
|
"eslint-plugin-jest": "^23.8.2",
|
|
42
41
|
"eslint-plugin-promise": "^4.2.1",
|
|
43
|
-
"eslint-plugin-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
42
|
+
"eslint-plugin-unicorn": "^40.1.0",
|
|
43
|
+
"eslint-plugin-vue": "^8.5.0",
|
|
44
|
+
"lodash": "^4.17.21"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
|
-
"eslint": "^7.27.0"
|
|
47
|
+
"eslint": "^7.27.0 || ^8.0.0"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"eslint": "^7.27.0",
|
|
52
|
-
"glob": "^7.
|
|
53
|
-
"jest": "^
|
|
54
|
-
"prettier": "^2.
|
|
55
|
-
"pretty-quick": "^3.1.
|
|
51
|
+
"glob": "^7.2.0",
|
|
52
|
+
"jest": "^27.5.1",
|
|
53
|
+
"prettier": "^2.6.1",
|
|
54
|
+
"pretty-quick": "^3.1.3",
|
|
55
|
+
"vue-eslint-parser": "^8.0.1"
|
|
56
56
|
},
|
|
57
57
|
"release": {
|
|
58
58
|
"branches": [
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Use the unofficial bash strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
3
|
+
set -euo pipefail; export FS=$'\n\t'
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
6
|
+
SRC_DIR="$SCRIPT_DIR/../../src"
|
|
7
|
+
|
|
8
|
+
if [ "$CI" != "true" ]; then
|
|
9
|
+
echo "This script is meant to run in CI"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if [ -d "$SRC_DIR" ]; then
|
|
14
|
+
cd "$SRC_DIR" || exit 1
|
|
15
|
+
REMOTE=$(git remote)
|
|
16
|
+
DEFAULT_BRANCH=$(git symbolic-ref "refs/remotes/${REMOTE}/HEAD" | rev | cut -d '/' -f1 | rev)
|
|
17
|
+
echo "src/ already exists, pulling default branch (${DEFAULT_BRANCH})"
|
|
18
|
+
git pull "$REMOTE" "$DEFAULT_BRANCH"
|
|
19
|
+
else
|
|
20
|
+
echo "Cloning ${TARGET_REPO} into src/"
|
|
21
|
+
git clone --depth 1 "${TARGET_REPO}" "$SRC_DIR";
|
|
22
|
+
cd "$SRC_DIR" || exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
echo "Installing dependencies"
|
|
27
|
+
yarn install --frozen-lockfile
|
|
28
|
+
|
|
29
|
+
if [ -n "${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-}" ]; then
|
|
30
|
+
echo "We seem to be on a Merge Request..."
|
|
31
|
+
SHA="$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA"
|
|
32
|
+
else
|
|
33
|
+
echo "We seem to be on a branch..."
|
|
34
|
+
SHA="$CI_COMMIT_SHA"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
echo "Installing $CI_REPOSITORY_URL#$SHA"
|
|
38
|
+
yarn add --dev "${CI_REPOSITORY_URL}#${SHA}"
|
|
39
|
+
|
|
40
|
+
echo "Deduplicate dependencies"
|
|
41
|
+
# Yarn doesn't seem to be smart enough when using URL installs and might
|
|
42
|
+
# end up with a weird state, retaining outdated dependencies
|
|
43
|
+
npx yarn-deduplicate --strategy fewer yarn.lock
|
|
44
|
+
yarn install
|