@effect-app/eslint-shared-config 0.0.4 → 0.0.6
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 +14 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/LICENSE +21 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/README.md +215 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/disable-conflict-rules.d.ts +110 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/disable-conflict-rules.js +114 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/disable-conflict-rules.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/recommended.d.ts +159 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/recommended.js +60 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/configs/recommended.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dockerfile-config-schema.json +52 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.d.ts +8 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js +188 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/graphql-config-schema.json +255 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/json-config-schema.json +187 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/malva-config-schema.json +363 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/markdown-config-schema.json +187 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/markup-config-schema.json +534 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/toml-config-schema.json +125 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/typescript-config-schema.json +1898 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/yaml-config-schema.json +126 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/index.d.ts +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/index.js +21 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/index.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/rules/dprint.d.ts +4 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/rules/dprint.js +261 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/rules/dprint.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/difference-iterator.d.ts +49 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/difference-iterator.js +129 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/difference-iterator.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/predicate.d.ts +10 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/predicate.js +20 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/util/predicate.js.map +1 -0
- package/node_modules/@ben_12/eslint-plugin-dprint/package.json +122 -0
- package/package.json +8 -2
- package/patches/@ben_12+eslint-plugin-dprint+1.7.5.patch +39 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ben_12/eslint-plugin-dprint",
|
|
3
|
+
"version": "1.7.5",
|
|
4
|
+
"description": "An ESLint plugin that fixes code with dprint",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=18.0.0"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/lib/index.js",
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"@dprint/dockerfile": "^0.3.3",
|
|
15
|
+
"@dprint/json": "^0.20.0",
|
|
16
|
+
"@dprint/markdown": "^0.19.0",
|
|
17
|
+
"@dprint/toml": "^0.7.0",
|
|
18
|
+
"@dprint/typescript": "^0.95.11",
|
|
19
|
+
"dprint-plugin-graphql": "^0.2.3",
|
|
20
|
+
"dprint-plugin-malva": "^0.14.3",
|
|
21
|
+
"dprint-plugin-markup": "^0.23.3",
|
|
22
|
+
"dprint-plugin-yaml": "^0.5.1",
|
|
23
|
+
"eslint": ">=7.0.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependenciesMeta": {
|
|
26
|
+
"@dprint/dockerfile": {
|
|
27
|
+
"optional": true
|
|
28
|
+
},
|
|
29
|
+
"@dprint/json": {
|
|
30
|
+
"optional": true
|
|
31
|
+
},
|
|
32
|
+
"@dprint/markdown": {
|
|
33
|
+
"optional": true
|
|
34
|
+
},
|
|
35
|
+
"@dprint/toml": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"@dprint/typescript": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"dprint-plugin-malva": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"dprint-plugin-markup": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"dprint-plugin-yaml": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"dprint-plugin-graphql": {
|
|
51
|
+
"optional": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@dprint/formatter": "^0.4.1",
|
|
56
|
+
"debug": "^4.1.1",
|
|
57
|
+
"diff": "^7.0.0",
|
|
58
|
+
"jsonc-parser": "^3.2.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@ben_12/eslint-plugin-dprint": "file:./test/internal-rules",
|
|
62
|
+
"@ben_12/eslint-simple-parser": "^0.1.0",
|
|
63
|
+
"@dprint/dockerfile": "^0.3.3",
|
|
64
|
+
"@dprint/json": "^0.20.0",
|
|
65
|
+
"@dprint/markdown": "^0.19.0",
|
|
66
|
+
"@dprint/toml": "^0.7.0",
|
|
67
|
+
"@dprint/typescript": "^0.95.11",
|
|
68
|
+
"@types/debug": "^4.1.5",
|
|
69
|
+
"@types/diff": "^7.0.0",
|
|
70
|
+
"@types/eslint": "^9.0.0",
|
|
71
|
+
"@types/node": "^18.0.0",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
73
|
+
"axios": "^1.7.9",
|
|
74
|
+
"dprint-plugin-graphql": "^0.2.3",
|
|
75
|
+
"dprint-plugin-malva": "^0.14.3",
|
|
76
|
+
"dprint-plugin-markup": "^0.23.3",
|
|
77
|
+
"dprint-plugin-yaml": "^0.5.1",
|
|
78
|
+
"eslint": "^9.0.0",
|
|
79
|
+
"mocha": "^11.0.0",
|
|
80
|
+
"nyc": "^17.0.0",
|
|
81
|
+
"rimraf": "^6.0.0",
|
|
82
|
+
"shx": "^0.3.4",
|
|
83
|
+
"ts-node": "^10.0.0",
|
|
84
|
+
"typescript": "~5.0.0"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
88
|
+
"codecov": "nyc report --reporter text-lcov | codecov --pipe --disable=gcov",
|
|
89
|
+
"lint": "eslint \"**/*.ts\" \"**/*.js\" \"**/*.md\"",
|
|
90
|
+
"nyc": "nyc",
|
|
91
|
+
"test": "npm run -s lint && npm run -s test:ci",
|
|
92
|
+
"test:ci:7.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
|
|
93
|
+
"test:ci:8.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
|
|
94
|
+
"test:ci:9.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
|
|
95
|
+
"test:ci": "tsc && nyc mocha \"test/rules/**/*.ts\"",
|
|
96
|
+
"watch": "mocha --require ts-node/register --watch --watch-files \"lib/**/*.ts,test/**/*.ts\" \"test/rules/**/*.ts\"",
|
|
97
|
+
"preversion": "npm test",
|
|
98
|
+
"version": "npm run -s build",
|
|
99
|
+
"postversion": "ts-node scripts/release"
|
|
100
|
+
},
|
|
101
|
+
"repository": {
|
|
102
|
+
"type": "git",
|
|
103
|
+
"url": "git+https://github.com/ben12/eslint-plugin-dprint.git"
|
|
104
|
+
},
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"registry": "https://registry.npmjs.org",
|
|
107
|
+
"access": "public"
|
|
108
|
+
},
|
|
109
|
+
"keywords": [
|
|
110
|
+
"eslint",
|
|
111
|
+
"eslintplugin",
|
|
112
|
+
"eslint-plugin",
|
|
113
|
+
"dprint",
|
|
114
|
+
"formatter"
|
|
115
|
+
],
|
|
116
|
+
"author": "Benoît Moreau <public@ben12.dev>",
|
|
117
|
+
"license": "MIT",
|
|
118
|
+
"bugs": {
|
|
119
|
+
"url": "https://github.com/ben12/eslint-plugin-dprint/issues"
|
|
120
|
+
},
|
|
121
|
+
"homepage": "https://eslint-plugin-dprint.ben12.eu"
|
|
122
|
+
}
|
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.6",
|
|
4
4
|
"description": "Shared flat ESLint base & vue configs for effect-app monorepo",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"eslint-plugin-codegen": "^0.17.0",
|
|
23
23
|
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
24
24
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
25
|
-
"@ben_12/eslint-plugin-dprint": "
|
|
25
|
+
"@ben_12/eslint-plugin-dprint": "1.7.5",
|
|
26
26
|
"eslint-plugin-formatjs": "^5.4.0",
|
|
27
27
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
28
28
|
"typescript-eslint": "8.43.0",
|
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
"@typescript-eslint/parser": "8.42.0",
|
|
43
43
|
"@effect-app/eslint-codegen-model": "1.42.3"
|
|
44
44
|
},
|
|
45
|
+
"bundledDependencies": [
|
|
46
|
+
"@ben_12/eslint-plugin-dprint"
|
|
47
|
+
],
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"patch-package": "^8.0.0"
|
|
50
|
+
},
|
|
45
51
|
"peerDependencies": {
|
|
46
52
|
"eslint": "^9.35.0",
|
|
47
53
|
"typescript": "~5.9.2",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
diff --git a/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js b/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js
|
|
2
|
+
index eb3339fc5d824d061c4dc2ca2ecd4a1c28e8631b..9bf942db4e76d76f3bd7c74c122eec9d307b7e84 100644
|
|
3
|
+
--- a/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js
|
|
4
|
+
+++ b/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/dprint.js
|
|
5
|
+
@@ -29,6 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.format = void 0;
|
|
8
|
+
const formatter_1 = require("@dprint/formatter");
|
|
9
|
+
+const execSync = require("child_process").execSync;
|
|
10
|
+
const fs = __importStar(require("fs"));
|
|
11
|
+
const JSONC = __importStar(require("jsonc-parser"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
@@ -117,7 +118,7 @@ function getFormatter(filePath, configName, configFile) {
|
|
14
|
+
return formatter;
|
|
15
|
+
}
|
|
16
|
+
else if (isPluginName(configName)) {
|
|
17
|
+
- console.warn("File %s not supported by %s", filePath, pluginsName[configName]);
|
|
18
|
+
+ //console.warn("File %s not supported by %s", filePath, pluginsName[configName]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else if (isPluginName(configName)) {
|
|
22
|
+
@@ -138,6 +139,17 @@ function getFormatter(filePath, configName, configFile) {
|
|
23
|
+
function format(configFile, overrideConfig, filePath, fileText, configName) {
|
|
24
|
+
const formatter = getFormatter(filePath, configName, configFile);
|
|
25
|
+
if (formatter) {
|
|
26
|
+
+ // hack to fix formatting inside .vue files
|
|
27
|
+
+ // please keep in mind, requires the config of dprint.json!
|
|
28
|
+
+ if (filePath.endsWith(".vue")) {
|
|
29
|
+
+ try {
|
|
30
|
+
+ const out = execSync(`./node_modules/.bin/dprint fmt --config '${configFile}' --stdin '${filePath}'`, { input: fileText, encoding: "utf-8" })
|
|
31
|
+
+ return out
|
|
32
|
+
+ } catch (e) {
|
|
33
|
+
+ console.warn(e)
|
|
34
|
+
+ return undefined
|
|
35
|
+
+ }
|
|
36
|
+
+ }
|
|
37
|
+
const request = {
|
|
38
|
+
filePath,
|
|
39
|
+
fileText,
|