@discourse/lint-configs 2.8.0 → 2.10.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.
- package/.prettierrc.cjs +1 -0
- package/eslint-rules/i18n-import-location.mjs +3 -3
- package/eslint.mjs +3 -1
- package/package.json +6 -5
package/.prettierrc.cjs
CHANGED
|
@@ -27,12 +27,12 @@ export default {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
if (
|
|
30
|
-
node.source.value.toLowerCase() === "discourse-common/helpers/i18n"
|
|
30
|
+
node.source.value.toLowerCase() === "discourse-common/helpers/i18n" ||
|
|
31
|
+
node.source.value.toLowerCase() === "discourse/helpers/i18n"
|
|
31
32
|
) {
|
|
32
33
|
context.report({
|
|
33
34
|
node,
|
|
34
|
-
message:
|
|
35
|
-
"Import from 'discourse-common/helpers/i18n' is not allowed. Use 'discourse-i18n' instead.",
|
|
35
|
+
message: `Import from '${node.source.value}' is not allowed. Use 'discourse-i18n' instead.`,
|
|
36
36
|
fix(fixer) {
|
|
37
37
|
const existingImport = context
|
|
38
38
|
.getSourceCode()
|
package/eslint.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import EmberESLintParser from "ember-eslint-parser";
|
|
|
7
7
|
import DecoratorPosition from "eslint-plugin-decorator-position";
|
|
8
8
|
import EmberPlugin from "eslint-plugin-ember";
|
|
9
9
|
import EmberRecommended from "eslint-plugin-ember/configs/recommended";
|
|
10
|
+
import ImportPlugin from "eslint-plugin-import";
|
|
10
11
|
import QUnitPlugin from "eslint-plugin-qunit";
|
|
11
12
|
import QUnitRecommended from "eslint-plugin-qunit/configs/recommended";
|
|
12
13
|
import SimpleImportSort from "eslint-plugin-simple-import-sort";
|
|
@@ -101,6 +102,7 @@ export default [
|
|
|
101
102
|
"decorator-position": DecoratorPosition,
|
|
102
103
|
"simple-import-sort": SimpleImportSort,
|
|
103
104
|
qunit: QUnitPlugin,
|
|
105
|
+
import: ImportPlugin,
|
|
104
106
|
discourse: {
|
|
105
107
|
rules: {
|
|
106
108
|
"i18n-import-location": i18nImport,
|
|
@@ -156,7 +158,7 @@ export default [
|
|
|
156
158
|
"valid-typeof": "error",
|
|
157
159
|
"wrap-iife": ["error", "inside"],
|
|
158
160
|
curly: "error",
|
|
159
|
-
"no-
|
|
161
|
+
"import/no-duplicates": "error",
|
|
160
162
|
"object-shorthand": ["error", "properties"],
|
|
161
163
|
"no-dupe-class-members": "error",
|
|
162
164
|
"@stylistic/js/lines-between-class-members": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discourse/lint-configs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Shareable lint configs for Discourse core, plugins, and themes",
|
|
5
5
|
"author": "Discourse",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./template-lint-rules": "./template-lint-rules/index.mjs"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"lint": "eslint --no-error-on-unmatched-pattern **/*.cjs
|
|
29
|
+
"lint": "eslint --no-error-on-unmatched-pattern \"**/*.{cjs,mjs,js}\" && pnpm prettier --check \"**/*.{cjs,mjs,js}\"",
|
|
30
30
|
"test": "cd ../test && node test.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"eslint": "^9.21.0",
|
|
39
39
|
"eslint-plugin-decorator-position": "^6.0.0",
|
|
40
40
|
"eslint-plugin-ember": "^12.5.0",
|
|
41
|
+
"eslint-plugin-import": "^2.31.0",
|
|
41
42
|
"eslint-plugin-qunit": "^8.1.2",
|
|
42
43
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
43
44
|
"eslint-plugin-sort-class-members": "^1.21.0",
|
|
44
45
|
"globals": "^16.0.0",
|
|
45
|
-
"prettier": "^
|
|
46
|
-
"prettier-plugin-ember-template-tag": "^0.
|
|
46
|
+
"prettier": "^3.5.3",
|
|
47
|
+
"prettier-plugin-ember-template-tag": "^2.0.4",
|
|
47
48
|
"stylelint": "^16.15.0",
|
|
48
49
|
"stylelint-config-standard": "^37.0.0",
|
|
49
50
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"ember-template-lint": "7.0.0",
|
|
54
55
|
"eslint": "9.21.0",
|
|
55
|
-
"prettier": "
|
|
56
|
+
"prettier": "3.5.3",
|
|
56
57
|
"stylelint": "16.15.0"
|
|
57
58
|
}
|
|
58
59
|
}
|