@gitlab/eslint-plugin 10.0.0 → 10.0.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/jest.config.js ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ moduleFileExtensions: ['js'],
3
+ transform: {
4
+ '^.+\\.js$': ['babel-jest', { sourceType: 'script' }],
5
+ },
6
+ };
@@ -79,10 +79,6 @@ function isVLiteral(node) {
79
79
  * @returns {array} In form [prefix, postfix] with the content to prepend and append to the string
80
80
  */
81
81
  function selectFixFunction({ type, value }) {
82
- // TODO: needs tests
83
- // TODO: these are gitlab specific fixes...
84
- // TODO: Need a config for the default externalization function to use
85
- // TODO: probably need withExpressionWithQuotes....
86
82
  const noQuotes = ['__(', ')'];
87
83
  const withQuotes = ['__("', '")'];
88
84
  const withExpression = ['{{ __(', ') }}'];
@@ -90,7 +86,6 @@ function selectFixFunction({ type, value }) {
90
86
 
91
87
  const hasQuotes = isWrappedWithQuotes(value);
92
88
 
93
- // TODO: double check this is still needed
94
89
  if (type === NODE_TYPES.V_TEXT) {
95
90
  return hasQuotes ? withExpression : withQuotesExpression;
96
91
  } else {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@gitlab/eslint-plugin",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "GitLab package for our custom eslint rules",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
7
  "createRule": "./scripts/createRule.js && yarn update",
8
8
  "update": "./scripts/updateFiles.js && prettier --write lib/index.js",
9
9
  "commit": "npx git-cz",
10
- "test": "mocha tests --recursive"
10
+ "test": "jest tests"
11
11
  },
12
12
  "repository": "https://gitlab.com/gitlab-org/frontend/eslint-plugin.git",
13
13
  "keywords": [
@@ -48,7 +48,7 @@
48
48
  "devDependencies": {
49
49
  "eslint": "^7.27.0",
50
50
  "glob": "^7.1.3",
51
- "mocha": "^6.2.3",
51
+ "jest": "^26.6.3",
52
52
  "prettier": "^2.2.1",
53
53
  "pretty-quick": "^3.1.0"
54
54
  },