@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/CHANGELOG.md +7 -0
- package/CONTRIBUTING.md +40 -0
- package/docs/development.md +15 -0
- package/gitlab_schema_apollo.graphql +29355 -0
- package/jest.config.js +6 -0
- package/lib/utils/rule-utils.js +0 -5
- package/package.json +3 -3
package/jest.config.js
ADDED
package/lib/utils/rule-utils.js
CHANGED
|
@@ -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.
|
|
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": "
|
|
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
|
-
"
|
|
51
|
+
"jest": "^26.6.3",
|
|
52
52
|
"prettier": "^2.2.1",
|
|
53
53
|
"pretty-quick": "^3.1.0"
|
|
54
54
|
},
|