@discourse/lint-configs 2.11.0 → 2.11.2
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.
|
@@ -33,6 +33,15 @@ export default {
|
|
|
33
33
|
node,
|
|
34
34
|
message: `Import from '${node.source.value}' is not allowed. Use 'discourse-i18n' instead.`,
|
|
35
35
|
fix(fixer) {
|
|
36
|
+
const canSafelyReplace =
|
|
37
|
+
node.specifiers.length === 1 &&
|
|
38
|
+
node.specifiers[0].type === "ImportDefaultSpecifier" &&
|
|
39
|
+
node.specifiers[0].local.name === "i18n";
|
|
40
|
+
|
|
41
|
+
if (!canSafelyReplace) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
36
45
|
const existingImport = context
|
|
37
46
|
.getSourceCode()
|
|
38
47
|
.ast.body.find(
|
package/eslint.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discourse/lint-configs",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "Shareable lint configs for Discourse core, plugins, and themes",
|
|
5
5
|
"author": "Discourse",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"test": "cd ../test && node test.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/core": "^7.26.
|
|
34
|
-
"@babel/eslint-parser": "^7.26.
|
|
33
|
+
"@babel/core": "^7.26.10",
|
|
34
|
+
"@babel/eslint-parser": "^7.26.10",
|
|
35
35
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
36
36
|
"ember-template-lint": "^7.0.1",
|
|
37
37
|
"eslint": "^9.22.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"globals": "^16.0.0",
|
|
45
45
|
"prettier": "^3.5.3",
|
|
46
46
|
"prettier-plugin-ember-template-tag": "^2.0.4",
|
|
47
|
-
"stylelint": "^16.
|
|
47
|
+
"stylelint": "^16.16.0",
|
|
48
48
|
"stylelint-config-standard": "^37.0.0",
|
|
49
49
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
50
50
|
"typescript": "^5.8.2"
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"ember-template-lint": "7.0.1",
|
|
54
54
|
"eslint": "9.22.0",
|
|
55
55
|
"prettier": "3.5.3",
|
|
56
|
-
"stylelint": "16.
|
|
56
|
+
"stylelint": "16.16.0"
|
|
57
57
|
}
|
|
58
58
|
}
|
package/template-lint.config.cjs
CHANGED