@discourse/lint-configs 2.24.0 → 2.25.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.
|
@@ -2,7 +2,8 @@ export default {
|
|
|
2
2
|
meta: {
|
|
3
3
|
type: "problem",
|
|
4
4
|
docs: {
|
|
5
|
-
description:
|
|
5
|
+
description:
|
|
6
|
+
"Do not use themeSetting, themeI18n, or themePrefix helpers.",
|
|
6
7
|
},
|
|
7
8
|
fixable: "code",
|
|
8
9
|
schema: [], // no options
|
|
@@ -42,6 +43,31 @@ export default {
|
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
|
|
46
|
+
return fixes;
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
} else if (modulePath === "discourse/helpers/theme-prefix") {
|
|
50
|
+
context.report({
|
|
51
|
+
node,
|
|
52
|
+
message: `Importing themePrefix is not allowed.`,
|
|
53
|
+
fix(fixer) {
|
|
54
|
+
const fixes = [fixer.remove(node)];
|
|
55
|
+
|
|
56
|
+
const importName = node.specifiers[0].local.name;
|
|
57
|
+
|
|
58
|
+
if (importName !== "themePrefix") {
|
|
59
|
+
const themePrefix = moduleScope.variables.find(
|
|
60
|
+
(v) => v.name === importName
|
|
61
|
+
);
|
|
62
|
+
themePrefix.references.forEach((ref) => {
|
|
63
|
+
const ident = ref.identifier;
|
|
64
|
+
|
|
65
|
+
if (ident?.type === "VarHead") {
|
|
66
|
+
fixes.push(fixer.replaceText(ident, "themePrefix"));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
45
71
|
return fixes;
|
|
46
72
|
},
|
|
47
73
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discourse/lint-configs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "Shareable lint configs for Discourse core, plugins, and themes",
|
|
5
5
|
"author": "Discourse",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/core": "^7.27.4",
|
|
34
|
-
"@babel/eslint-parser": "^7.27.
|
|
34
|
+
"@babel/eslint-parser": "^7.27.5",
|
|
35
35
|
"@babel/plugin-proposal-decorators": "^7.27.1",
|
|
36
|
-
"ember-template-lint": "^7.
|
|
36
|
+
"ember-template-lint": "^7.8.1",
|
|
37
37
|
"eslint": "^9.28.0",
|
|
38
38
|
"eslint-plugin-decorator-position": "^6.0.0",
|
|
39
39
|
"eslint-plugin-ember": "^12.5.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"typescript": "^5.8.3"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"ember-template-lint": "7.
|
|
54
|
+
"ember-template-lint": "7.8.1",
|
|
55
55
|
"eslint": "9.28.0",
|
|
56
56
|
"prettier": "3.5.3",
|
|
57
57
|
"stylelint": "16.20.0"
|