@effect-app/eslint-shared-config 0.0.2 → 0.0.4
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/package.json +21 -11
- package/src/dprint.json +32 -0
- package/src/eslint.vue.config.mjs +25 -24
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/eslint-shared-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Shared flat ESLint base & vue configs for effect-app monorepo",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -14,13 +14,9 @@
|
|
|
14
14
|
"default": "./src/eslint.vue.config.mjs"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
18
|
-
"eslint": "^9.35.0",
|
|
19
|
-
"typescript": "~5.9.2",
|
|
17
|
+
"dependencies": {
|
|
20
18
|
"@eslint/js": "9.35.0",
|
|
21
19
|
"@eslint/eslintrc": "^3.3.1",
|
|
22
|
-
"@typescript-eslint/parser": "8.42.0",
|
|
23
|
-
"typescript-eslint": "8.42.0",
|
|
24
20
|
"eslint-plugin-import": "^2.32.0",
|
|
25
21
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
26
22
|
"eslint-plugin-codegen": "^0.17.0",
|
|
@@ -28,14 +24,28 @@
|
|
|
28
24
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
29
25
|
"@ben_12/eslint-plugin-dprint": "^1.7.5",
|
|
30
26
|
"eslint-plugin-formatjs": "^5.4.0",
|
|
27
|
+
"@vue/eslint-config-typescript": "^14.6.0",
|
|
28
|
+
"typescript-eslint": "8.43.0",
|
|
31
29
|
"eslint-plugin-vue": "^10.4.0",
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
"dprint-plugin-malva": "^0.14.3",
|
|
31
|
+
"dprint-plugin-markup": "^0.23.3",
|
|
32
|
+
"dprint-plugin-yaml": "^0.5.1",
|
|
33
|
+
"@dprint/typescript": "^0.95.11",
|
|
34
|
+
"@eslint/compat": "1.3.2",
|
|
35
|
+
"eslint-import-resolver-webpack": "^0.13.10",
|
|
36
|
+
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
37
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
38
|
+
"eslint-watch": "^8.0.0",
|
|
39
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
40
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "8.42.0",
|
|
42
|
+
"@typescript-eslint/parser": "8.42.0",
|
|
35
43
|
"@effect-app/eslint-codegen-model": "1.42.3"
|
|
36
44
|
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"eslint": "^9.35.0",
|
|
47
|
+
"typescript": "~5.9.2",
|
|
48
|
+
"dprint": "^0.50.1"
|
|
39
49
|
},
|
|
40
50
|
"scripts": {
|
|
41
51
|
"watch": "pnpm build -w",
|
package/src/dprint.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"typescript": {
|
|
3
|
+
"indentWidth": 2,
|
|
4
|
+
"semiColons": "asi",
|
|
5
|
+
"quoteStyle": "alwaysDouble",
|
|
6
|
+
"trailingCommas": "never",
|
|
7
|
+
"arrowFunction.useParentheses": "force",
|
|
8
|
+
"memberExpression.linePerExpression": true,
|
|
9
|
+
"binaryExpression.linePerExpression": true,
|
|
10
|
+
"importDeclaration.forceSingleLine": true,
|
|
11
|
+
"exportDeclaration.forceSingleLine": true
|
|
12
|
+
},
|
|
13
|
+
"json": {},
|
|
14
|
+
"markdown": {},
|
|
15
|
+
"toml": {},
|
|
16
|
+
"malva": {},
|
|
17
|
+
"markup": {},
|
|
18
|
+
"yaml": {},
|
|
19
|
+
"excludes": [
|
|
20
|
+
"**/node_modules",
|
|
21
|
+
"**/*-lock.json"
|
|
22
|
+
],
|
|
23
|
+
"plugins": [
|
|
24
|
+
"https://plugins.dprint.dev/typescript-0.95.11.wasm",
|
|
25
|
+
"https://plugins.dprint.dev/json-0.20.0.wasm",
|
|
26
|
+
"https://plugins.dprint.dev/markdown-0.19.0.wasm",
|
|
27
|
+
"https://plugins.dprint.dev/toml-0.7.0.wasm",
|
|
28
|
+
"https://plugins.dprint.dev/g-plane/malva-v0.14.3.wasm",
|
|
29
|
+
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.23.3.wasm",
|
|
30
|
+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import formatjs from "eslint-plugin-formatjs"
|
|
2
2
|
import pluginVue from "eslint-plugin-vue"
|
|
3
3
|
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript"
|
|
4
|
-
|
|
5
4
|
import tseslint from "typescript-eslint"
|
|
6
|
-
|
|
7
5
|
import { baseConfig } from "./eslint.base.config.mjs"
|
|
8
|
-
|
|
9
6
|
import dprint from "@ben_12/eslint-plugin-dprint"
|
|
7
|
+
import { fileURLToPath } from "node:url"
|
|
8
|
+
import path from "node:path"
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
11
|
+
const __dirname = path.dirname(__filename)
|
|
12
|
+
const DEFAULT_DPRINT_CONFIG = path.join(__dirname, "dprint.json")
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* @param {string} dirName
|
|
13
16
|
* @param {boolean} [forceTS=false]
|
|
14
17
|
* @returns {import("eslint").Linter.FlatConfig[]}
|
|
15
18
|
*/
|
|
16
|
-
export function vueConfig(dirName, forceTS = false, dprintConfigFile
|
|
19
|
+
export function vueConfig(dirName, forceTS = false, dprintConfigFile ) {
|
|
20
|
+
|
|
21
|
+
if (!dprintConfigFile) dprintConfigFile = DEFAULT_DPRINT_CONFIG
|
|
22
|
+
console.log("Using dprint config file:", dprintConfigFile)
|
|
23
|
+
|
|
17
24
|
const enableTS = !!dirName && (forceTS || process.env["ESLINT_TS"])
|
|
18
25
|
|
|
19
26
|
return [
|
|
@@ -83,27 +90,21 @@ export function vueConfig(dirName, forceTS = false, dprintConfigFile = "dprint.j
|
|
|
83
90
|
],
|
|
84
91
|
"@ben_12/dprint/typescript": [
|
|
85
92
|
"error",
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"arrowFunction.useParentheses": "force",
|
|
101
|
-
"memberExpression.linePerExpression": true,
|
|
102
|
-
"binaryExpression.linePerExpression": true,
|
|
103
|
-
"importDeclaration.forceSingleLine": true,
|
|
104
|
-
"exportDeclaration.forceSingleLine": true,
|
|
93
|
+
{
|
|
94
|
+
// Usa lo stesso file config risolto in modo assoluto
|
|
95
|
+
configFile: dprintConfigFile,
|
|
96
|
+
config: {
|
|
97
|
+
indentWidth: 2,
|
|
98
|
+
semiColons: "asi",
|
|
99
|
+
quoteStyle: "alwaysDouble",
|
|
100
|
+
trailingCommas: "never",
|
|
101
|
+
"arrowFunction.useParentheses": "force",
|
|
102
|
+
"memberExpression.linePerExpression": true,
|
|
103
|
+
"binaryExpression.linePerExpression": true,
|
|
104
|
+
"importDeclaration.forceSingleLine": true,
|
|
105
|
+
"exportDeclaration.forceSingleLine": true,
|
|
106
|
+
},
|
|
105
107
|
},
|
|
106
|
-
},
|
|
107
108
|
],
|
|
108
109
|
},
|
|
109
110
|
},
|