@gitlab/eslint-plugin 12.0.1 → 12.2.1

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 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/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [12.2.1](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.2.0...v12.2.1) (2022-05-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Loosen new inherited rules ([08cacf8](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/08cacf812534b830f9aa90b9f7c6b90ea2698a56)), closes [/github.com/airbnb/javascript/blob/366bfa66380c08304101c6add46355696e90b348/packages/eslint-config-airbnb-base/rules/es6.js#L67-L68](https://gitlab.com//github.com/airbnb/javascript/blob/366bfa66380c08304101c6add46355696e90b348/packages/eslint-config-airbnb-base/rules/es6.js/issues/L67-L68)
7
+
8
+ # [12.2.0](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.1.0...v12.2.0) (2022-04-21)
9
+
10
+
11
+ ### Features
12
+
13
+ * Update eslint-config-airbnb-base to be eslint@8 compatible ([d006b5b](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/d006b5b9bdcbb70d6f8ddf0a89c7c37d59dd6507))
14
+ * Update eslint-plugin-import to have eslint@8 support ([c03cffd](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/c03cffd795fe516cb8c9d3d4f152b53c2de91d57))
15
+
16
+ # [12.1.0](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.0.1...v12.1.0) (2022-04-07)
17
+
18
+
19
+ ### Features
20
+
21
+ * update eslint-plugin-vue to 8.5.0 ([37ac645](https://gitlab.com/gitlab-org/frontend/eslint-plugin/commit/37ac645f4421ce06b083625c53356e9f6c7c5679))
22
+
1
23
  ## [12.0.1](https://gitlab.com/gitlab-org/frontend/eslint-plugin/compare/v12.0.0...v12.0.1) (2022-03-28)
2
24
 
3
25
 
@@ -1,4 +1,4 @@
1
- const [, ...restrictedGlobals] = require('eslint-config-airbnb-base/rules/variables.js').rules[
1
+ const [, ...restrictedGlobals] = require('eslint-config-airbnb-base/rules/variables').rules[
2
2
  'no-restricted-globals'
3
3
  ];
4
4
 
@@ -26,6 +26,7 @@ module.exports = {
26
26
  ignoreDestructuring: true,
27
27
  },
28
28
  ],
29
+ 'default-param-last': 'off',
29
30
  'unicorn/filename-case': ['error', { case: 'snakeCase' }],
30
31
  'import/prefer-default-export': 'off',
31
32
  'import/no-default-export': 'error',
@@ -45,6 +46,14 @@ module.exports = {
45
46
  ignorePropertyModificationsFor: ['acc', 'accumulator', 'el', 'element', 'state'],
46
47
  },
47
48
  ],
49
+ 'no-restricted-exports': [
50
+ 'error',
51
+ {
52
+ restrictedNamedExports: [
53
+ 'then', // avoid confusion when used with dynamic `import()` promise
54
+ ],
55
+ },
56
+ ],
48
57
  'no-sequences': [
49
58
  'error',
50
59
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/eslint-plugin",
3
- "version": "12.0.1",
3
+ "version": "12.2.1",
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": "^14.2.1",
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-import": "^2.22.1",
39
+ "eslint-plugin-import": "^2.25.2",
40
40
  "eslint-plugin-jest": "^23.8.2",
41
41
  "eslint-plugin-promise": "^4.2.1",
42
42
  "eslint-plugin-unicorn": "^40.1.0",
43
- "eslint-plugin-vue": "^7.5.0",
44
- "lodash": "^4.17.21",
45
- "vue-eslint-parser": "^7.0.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
51
  "glob": "^7.2.0",
53
52
  "jest": "^27.5.1",
54
53
  "prettier": "^2.6.1",
55
- "pretty-quick": "^3.1.3"
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