@ben_12/eslint-plugin-dprint 0.14.5 → 1.0.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/README.md CHANGED
@@ -32,12 +32,57 @@ $ npm install -D @dprint/json
32
32
  $ npm install -D @dprint/markdown
33
33
  $ npm install -D @dprint/toml
34
34
  $ npm install -D @dprint/typescript
35
+ $ npm install -D dprint-plugin-malva
36
+ $ npm install -D dprint-plugin-markup
35
37
  ```
36
38
 
37
39
  ## 📖 Usage
38
40
 
39
41
  Write your ESLint configuration. For example with typescript code:
40
42
 
43
+ From eslint v9 (flat configuration)
44
+
45
+ ```mjs
46
+ import tsPlugin from "@typescript-eslint/eslint-plugin";
47
+ import tsParser from "@typescript-eslint/parser";
48
+ import dprint from "@ben_12/eslint-plugin-dprint";
49
+
50
+ module.exports = {
51
+ files: ["**/*.ts", "**/*.js"],
52
+
53
+ languageOptions: {
54
+ parser: tsParser
55
+ },
56
+
57
+ plugins: {
58
+ "@typescript-eslint": tsPlugin,
59
+ "@ben_12/dprint": dprint,
60
+ },
61
+
62
+ rules: {
63
+ ...tsPlugin.configs["eslint-recommended"].rules,
64
+ ...tsPlugin.configs["recommended"].rules,
65
+ ...tsPlugin.configs["strict"].rules,
66
+ ...dprint.configs["typescript-recommended"].rules
67
+ "@ben_12/dprint/typescript": [
68
+ "error",
69
+ {
70
+ // Use dprint JSON configuration file (default: "dprint.json")
71
+ // It may be created using `dprint init` command
72
+ // See also https://dprint.dev/config/
73
+ configFile: "dprint.json",
74
+ config: {
75
+ // The TypeScript configuration of dprint
76
+ // See also https://dprint.dev/plugins/typescript/config/
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ };
82
+ ```
83
+
84
+ For old eslint (eslintrc configuration)
85
+
41
86
  ```js
42
87
  module.exports = {
43
88
  extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@ben_12/dprint/typescript-recommended"],
@@ -63,13 +108,15 @@ Then run ESLint with `--fix`!
63
108
 
64
109
  ### Available Rules
65
110
 
66
- | Rule | Description |
67
- | :-------------------------- | :------------------------------------------------ |
68
- | [@ben_12/dprint/dockerfile] | Format dockerfile code with [@dprint/dockerfile]. |
69
- | [@ben_12/dprint/json] | Format json code with [@dprint/json]. |
70
- | [@ben_12/dprint/markdown] | Format markdown code with [@dprint/markdown]. |
71
- | [@ben_12/dprint/toml] | Format toml code with [@dprint/toml]. |
72
- | [@ben_12/dprint/typescript] | Format typescript code with [@dprint/typescript]. |
111
+ | Rule | Description |
112
+ | :-------------------------- | :------------------------------------------------- |
113
+ | [@ben_12/dprint/dockerfile] | Format dockerfile code with [@dprint/dockerfile]. |
114
+ | [@ben_12/dprint/json] | Format json code with [@dprint/json]. |
115
+ | [@ben_12/dprint/markdown] | Format markdown code with [@dprint/markdown]. |
116
+ | [@ben_12/dprint/toml] | Format toml code with [@dprint/toml]. |
117
+ | [@ben_12/dprint/typescript] | Format typescript code with [@dprint/typescript]. |
118
+ | [@ben_12/dprint/malva] | Format css/scss/less/sass code with [malva]. |
119
+ | [@ben_12/dprint/markup] | Format HTML/Vue/Svelte/... code with [markup_fmt]. |
73
120
 
74
121
  ### Available Configs
75
122
 
@@ -81,6 +128,8 @@ Then run ESLint with `--fix`!
81
128
  | [plugin:@ben_12/dprint/markdown-recommended] | Enable the [@ben_12/dprint/markdown] rule. |
82
129
  | [plugin:@ben_12/dprint/toml-recommended] | Enable the [@ben_12/dprint/toml] rule. |
83
130
  | [plugin:@ben_12/dprint/typescript-recommended] | Enable the [@ben_12/dprint/typescript] rule along with the [plugin:@ben_12/dprint/disable-typescript-conflict-rules] preset. |
131
+ | [plugin:@ben_12/dprint/malva-recommended] | Enable the [@ben_12/dprint/malva] rule. |
132
+ | [plugin:@ben_12/dprint/markup-recommended] | Enable the [@ben_12/dprint/markup] rule. |
84
133
 
85
134
  - Put the [plugin:@ben_12/dprint/recommended] or [plugin:@ben_12/dprint/disable-conflict-rules] config into the last of your `extends` list in order to ensure disabling conflict rules where came from other base configurations.
86
135
 
@@ -106,15 +155,21 @@ Please use GitHub's Issues/PRs.
106
155
  [@dprint/markdown]: https://github.com/dprint/dprint-plugin-markdown
107
156
  [@dprint/toml]: https://github.com/dprint/dprint-plugin-toml
108
157
  [@dprint/typescript]: https://github.com/dprint/dprint-plugin-typescript
158
+ [malva]: https://github.com/g-plane/malva
159
+ [markup_fmt]: https://github.com/g-plane/markup_fmt
109
160
  [npm]: https://www.npmjs.com/
110
161
  [@ben_12/dprint/dockerfile]: docs/rules/dprint-dockerfile.md
111
162
  [@ben_12/dprint/json]: docs/rules/dprint-json.md
112
163
  [@ben_12/dprint/markdown]: docs/rules/dprint-markdown.md
113
164
  [@ben_12/dprint/toml]: docs/rules/dprint-toml.md
114
165
  [@ben_12/dprint/typescript]: docs/rules/dprint-typescript.md
166
+ [@ben_12/dprint/malva]: docs/rules/dprint-malva.md
167
+ [@ben_12/dprint/markup]: docs/rules/dprint-markup.md
115
168
  [plugin:@ben_12/dprint/disable-typescript-conflict-rules]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/disable-typescript-conflict-rules.ts
116
169
  [plugin:@ben_12/dprint/dockerfile-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L3
117
170
  [plugin:@ben_12/dprint/json-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L10
118
171
  [plugin:@ben_12/dprint/markdown-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L17
119
172
  [plugin:@ben_12/dprint/toml-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L24
120
173
  [plugin:@ben_12/dprint/typescript-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L31
174
+ [plugin:@ben_12/dprint/malva-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L39
175
+ [plugin:@ben_12/dprint/markup-recommended]: https://github.com/ben12/eslint-plugin-dprint/blob/master/lib/configs/recommended.ts#L46
@@ -133,3 +133,15 @@ export declare const typescriptRecommended: {
133
133
  "react/jsx-wrap-multilines": string;
134
134
  };
135
135
  };
136
+ export declare const malvaRecommended: {
137
+ plugins: string[];
138
+ rules: {
139
+ "@ben_12/dprint/malva": string;
140
+ };
141
+ };
142
+ export declare const markupRecommended: {
143
+ plugins: string[];
144
+ rules: {
145
+ "@ben_12/dprint/markup": string;
146
+ };
147
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typescriptRecommended = exports.tomlRecommended = exports.markdownRecommended = exports.jsonRecommended = exports.dockerfileRecommended = void 0;
3
+ exports.markupRecommended = exports.malvaRecommended = exports.typescriptRecommended = exports.tomlRecommended = exports.markdownRecommended = exports.jsonRecommended = exports.dockerfileRecommended = void 0;
4
4
  const disable_conflict_rules_1 = require("./disable-conflict-rules");
5
5
  exports.dockerfileRecommended = {
6
6
  plugins: ["@ben_12/dprint"],
@@ -30,4 +30,16 @@ exports.typescriptRecommended = {
30
30
  plugins: ["@ben_12/dprint"],
31
31
  rules: Object.assign(Object.assign({}, disable_conflict_rules_1.disableTypescriptConflictRules.rules), { "@ben_12/dprint/typescript": "warn" }),
32
32
  };
33
+ exports.malvaRecommended = {
34
+ plugins: ["@ben_12/dprint"],
35
+ rules: {
36
+ "@ben_12/dprint/malva": "warn",
37
+ },
38
+ };
39
+ exports.markupRecommended = {
40
+ plugins: ["@ben_12/dprint"],
41
+ rules: {
42
+ "@ben_12/dprint/markup": "warn",
43
+ },
44
+ };
33
45
  //# sourceMappingURL=recommended.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../lib/configs/recommended.ts"],"names":[],"mappings":";;;AAAA,qEAAyE;AAE5D,QAAA,qBAAqB,GAAG;IACjC,OAAO,EAAE,CAAC,gBAAgB,CAAC;IAC3B,KAA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AC,gBAAgB,CAAC;IAC3B,KAAK,kCACE,uDAA8B,CAAC,KAAK,KACvC,2BAA2B,EAAE,MAAM,GACtC;CACJ,CAAA;AAEY,QAAA,gBAAgB,GAAG;IAC5B,OAAO,EAAE,CAAC,gBAAgB,CAAC;IAC3B,KAAK,EAAE;QACH,sBAAsB,EAAE,MAAM;KACjC;CACJ,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC7B,OAAO,EAAE,CAAC,gBAAgB,CAAC;IAC3B,KAAK,EAAE;QACH,uBAAuB,EAAE,MAAM;KAClC;CACJ,CAAA"}
@@ -5,4 +5,4 @@
5
5
  * @param fileText The content of the file.
6
6
  * @returns The formatted text or undefined. It's undefined if the formatter doesn't change the text.
7
7
  */
8
- export declare function format(configFile: string, config: Record<string, unknown>, filePath: string, fileText: string): string | undefined;
8
+ export declare function format(configFile: string, config: Record<string, unknown>, filePath: string, fileText: string, configName: string): string | undefined;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-var-requires */
2
+ /* eslint-disable @typescript-eslint/no-require-imports */
3
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
5
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -32,35 +32,57 @@ const formatter_1 = require("@dprint/formatter");
32
32
  const fs = __importStar(require("fs"));
33
33
  const JSONC = __importStar(require("jsonc-parser"));
34
34
  const path_1 = __importDefault(require("path"));
35
- const plugins = [
36
- "@dprint/typescript",
37
- "@dprint/json",
38
- "@dprint/markdown",
39
- "@dprint/toml",
40
- "@dprint/dockerfile",
41
- ];
42
- const formatters = [];
43
- for (const module of plugins) {
35
+ const plugins = {
36
+ "typescript": "@dprint/typescript",
37
+ "json": "@dprint/json",
38
+ "markdown": "@dprint/markdown",
39
+ "toml": "@dprint/toml",
40
+ "dockerfile": "@dprint/dockerfile",
41
+ "malva": "dprint-plugin-malva",
42
+ "markup": "dprint-plugin-markup",
43
+ };
44
+ const formatters = Object.entries(plugins).reduce((formatters, [name, module]) => {
45
+ var _a, _b;
44
46
  try {
45
- const plugin = require(module);
47
+ let packageJson;
48
+ try {
49
+ packageJson = require(module + "/package.json");
50
+ }
51
+ catch (_) {
52
+ // plugin unavailable
53
+ return formatters;
54
+ }
46
55
  let buffer = undefined;
47
- if (plugin.getPath) {
48
- buffer = fs.readFileSync(plugin.getPath());
56
+ if ((_a = packageJson.main) === null || _a === void 0 ? void 0 : _a.endsWith(".js")) {
57
+ const plugin = require(module);
58
+ if (plugin.getPath) {
59
+ buffer = fs.readFileSync(plugin.getPath());
60
+ }
61
+ else if (plugin.getBuffer) {
62
+ buffer = plugin.getBuffer();
63
+ }
49
64
  }
50
- else if (plugin.getBuffer) {
51
- buffer = plugin.getBuffer();
65
+ else {
66
+ const [key, _] = (_b = Object.entries(packageJson.exports)
67
+ .find(([_, value]) => value.endsWith(".wasm"))) !== null && _b !== void 0 ? _b : [undefined, undefined];
68
+ if (key) {
69
+ const wasmFile = key.replace(/\.\.|^\.\/|^\.$/g, "");
70
+ buffer = fs.readFileSync(require.resolve(module + (wasmFile.length ? "/" + wasmFile : "")));
71
+ }
52
72
  }
53
73
  if (buffer) {
54
74
  const formatter = (0, formatter_1.createFromBuffer)(buffer);
55
- formatters.push(formatter);
75
+ formatters[name] = formatter;
56
76
  }
57
77
  }
58
78
  catch (e) {
59
- // plugin unavailable
79
+ console.error("Fail to load plugin", module, ":", e);
60
80
  }
61
- }
62
- function getFormatter(filePath) {
63
- for (const formatter of formatters) {
81
+ return formatters;
82
+ }, {});
83
+ function getFormatter(filePath, configName) {
84
+ const formatter = formatters[configName];
85
+ if (formatter) {
64
86
  const pluginInfo = formatter.getPluginInfo();
65
87
  const fileExtensions = pluginInfo.fileExtensions || [];
66
88
  const fileNames = pluginInfo.fileNames || [];
@@ -68,6 +90,15 @@ function getFormatter(filePath) {
68
90
  if (fileExtensions.some(ext => basename.endsWith("." + ext)) || fileNames.some(file => file === basename)) {
69
91
  return formatter;
70
92
  }
93
+ else {
94
+ console.warn("File %s not supported by %s", filePath, plugins[configName]);
95
+ }
96
+ }
97
+ else if (plugins[configName]) {
98
+ console.error("Plugin not found: %s", plugins[configName]);
99
+ }
100
+ else {
101
+ console.error("Unknown plugin for %s", configName);
71
102
  }
72
103
  return undefined;
73
104
  }
@@ -81,8 +112,8 @@ const lastConfigFile = {};
81
112
  * @param fileText The content of the file.
82
113
  * @returns The formatted text or undefined. It's undefined if the formatter doesn't change the text.
83
114
  */
84
- function format(configFile, config, filePath, fileText) {
85
- const formatter = getFormatter(filePath);
115
+ function format(configFile, config, filePath, fileText, configName) {
116
+ const formatter = getFormatter(filePath, configName);
86
117
  if (formatter) {
87
118
  const configKey = formatter.getPluginInfo().configKey;
88
119
  const newConfig = JSON.stringify(config);
@@ -1 +1 @@
1
- {"version":3,"file":"dprint.js","sourceRoot":"","sources":["../../../lib/dprint/dprint.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,iDAA+D;AAC/D,uCAAwB;AACxB,oDAAqC;AACrC,gDAAuB;AASvB,MAAM,OAAO,GAAG;IACZ,oBAAoB;IACpB,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,oBAAoB;CACd,CAAA;AAEV,MAAM,UAAU,GAAgB,EAAE,CAAA;AAElC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;IAC1B,IAAI;QACA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAW,CAAA;QACxC,IAAI,MAAM,GAAuB,SAAS,CAAA;QAC1C,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;SAC7C;aAAM,IAAI,MAAM,CAAC,SAAS,EAAE;YACzB,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAA;SAC9B;QACD,IAAI,MAAM,EAAE;YACR,M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Ac,EAAE,QAAiC;IACpE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC/C,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC5B,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;SACxB;KACJ;AACL,CAAC"}
@@ -0,0 +1,337 @@
1
+ {
2
+ "title": "Config",
3
+ "description": "Configuration for dprint-plugin-malva.",
4
+ "type": "object",
5
+ "definitions": {
6
+ "preferSingleLine": {
7
+ "description": "Control whether items should be placed on single line as possible, even they're originally on multiple lines.",
8
+ "type": "boolean"
9
+ }
10
+ },
11
+ "properties": {
12
+ "printWidth": {
13
+ "description": "The line width limitation that Malva should *(but not must)* avoid exceeding. Malva will try its best to keep line width less than this value, but it may exceed for some cases, for example, a very very long single word.",
14
+ "type": "integer",
15
+ "minimum": 0
16
+ },
17
+ "useTabs": {
18
+ "description": "Specify use space or tab for indentation.",
19
+ "type": "boolean"
20
+ },
21
+ "indentWidth": {
22
+ "description": "Size of indentation. When enabled `useTabs`, this option may be disregarded, since only one tab will be inserted when indented once.",
23
+ "type": "integer",
24
+ "minimum": 0
25
+ },
26
+ "lineBreak": {
27
+ "description": "Specify use `\\n` (LF) or `\\r\\n` (CRLF) for line break.",
28
+ "type": "string",
29
+ "enum": [
30
+ "lf",
31
+ "crlf"
32
+ ]
33
+ },
34
+ "hexCase": {
35
+ "description": "Control the case of hex color values.",
36
+ "type": "string",
37
+ "oneOf": [
38
+ {
39
+ "description": "Hex color values will be kept as-is.",
40
+ "type": "string",
41
+ "enum": [
42
+ "ignore"
43
+ ]
44
+ },
45
+ {
46
+ "description": "Hex color values will be converted to lower case.",
47
+ "type": "string",
48
+ "enum": [
49
+ "lower"
50
+ ]
51
+ },
52
+ {
53
+ "description": "Hex color values will be converted to upper case.",
54
+ "type": "string",
55
+ "enum": [
56
+ "upper"
57
+ ]
58
+ }
59
+ ]
60
+ },
61
+ "hexColorLength": {
62
+ "description": "Control the hex color values in short-hand form or long-hand form.",
63
+ "type": [
64
+ "string",
65
+ "null"
66
+ ],
67
+ "oneOf": [
68
+ {
69
+ "description": "Hex color values will be converted to short-hand form.",
70
+ "type": "string",
71
+ "enum": [
72
+ "short"
73
+ ]
74
+ },
75
+ {
76
+ "description": "Hex color values will be converted to long-hand form.",
77
+ "type": "string",
78
+ "enum": [
79
+ "long"
80
+ ]
81
+ },
82
+ {
83
+ "description": "Hex color values will be kept as-is.",
84
+ "type": "object",
85
+ "enum": [
86
+ null
87
+ ]
88
+ }
89
+ ]
90
+ },
91
+ "quotes": {
92
+ "description": "Control the quotes of strings.",
93
+ "type": "string",
94
+ "oneOf": [
95
+ {
96
+ "description": "Always use double quotes. Double quotes in strings will be escaped.",
97
+ "type": "string",
98
+ "enum": [
99
+ "alwaysDouble"
100
+ ]
101
+ },
102
+ {
103
+ "description": "Always use single quotes. Single quotes in strings will be escaped.",
104
+ "type": "string",
105
+ "enum": [
106
+ "alwaysSingle"
107
+ ]
108
+ },
109
+ {
110
+ "description": "Use double quotes as possible. However if there're double quotes in strings, quotes will be kept as-is.",
111
+ "type": "string",
112
+ "enum": [
113
+ "preferDouble"
114
+ ]
115
+ },
116
+ {
117
+ "description": "Use single quotes as possible. However if there're single quotes in strings, quotes will be kept as-is.",
118
+ "type": "string",
119
+ "enum": [
120
+ "preferSingle"
121
+ ]
122
+ }
123
+ ]
124
+ },
125
+ "operatorLinebreak": {
126
+ "description": "Control whether line break should come before or after operators.",
127
+ "type": "string",
128
+ "oneOf": [
129
+ {
130
+ "description": "Line break will come before operators.",
131
+ "type": "string",
132
+ "enum": [
133
+ "before"
134
+ ]
135
+ },
136
+ {
137
+ "description": "Line break will come after operators.",
138
+ "type": "string",
139
+ "enum": [
140
+ "after"
141
+ ]
142
+ }
143
+ ]
144
+ },
145
+ "blockSelectorLinebreak": {
146
+ "description": "Control line break behavior after selector commas.",
147
+ "type": "string",
148
+ "oneOf": [
149
+ {
150
+ "description": "Always insert line break after comma.",
151
+ "type": "string",
152
+ "enum": [
153
+ "always"
154
+ ]
155
+ },
156
+ {
157
+ "description": "If the whole selector can be put on a single line, there won't be line breaks; otherwise, there will be line breaks after each comma.",
158
+ "type": "string",
159
+ "enum": [
160
+ "consistent"
161
+ ]
162
+ },
163
+ {
164
+ "description": "Selector will be put on one line as possible. Once it exceeds `printWidth`, line break will be inserted where the code exceeds `printWidth`.",
165
+ "type": "string",
166
+ "enum": [
167
+ "wrap"
168
+ ]
169
+ }
170
+ ]
171
+ },
172
+ "omitNumberLeadingZero": {
173
+ "description": "Control whether omit leading zero before dot of numbers or not.",
174
+ "type": "boolean"
175
+ },
176
+ "trailingComma": {
177
+ "description": "Control whether trailing comma should be inserted or not.",
178
+ "type": "boolean"
179
+ },
180
+ "formatComments": {
181
+ "description": "Control whether whitespace should be inserted at the beginning and end of comments.",
182
+ "type": "boolean"
183
+ },
184
+ "alignComments": {
185
+ "description": "Control whether to tweak multi-line comments indentation.",
186
+ "type": "boolean"
187
+ },
188
+ "linebreakInPseudoParens": {
189
+ "description": "Control whether line break should be inserted in pseudo class/element parens or not if current line is too long.",
190
+ "type": "boolean"
191
+ },
192
+ "declarationOrder": {
193
+ "description": "Control the strategy of sorting CSS declarations (a.k.a. properties). If it's `null`, it won't sort CSS declarations.",
194
+ "type": [
195
+ "string",
196
+ "null"
197
+ ],
198
+ "oneOf": [
199
+ {
200
+ "description": "Order in a simple alphabetical manner from a - z. This strategy will also sort unknown properties.",
201
+ "type": "string",
202
+ "enum": [
203
+ "alphabetical"
204
+ ]
205
+ },
206
+ {
207
+ "description": "Order from most important, flow affecting properties, to least important properties. Unknown properties won't be sorted.",
208
+ "type": "string",
209
+ "enum": [
210
+ "smacss"
211
+ ]
212
+ },
213
+ {
214
+ "description": "Order properties applying outside the box model, moving inward to intrinsic changes. Unknown properties won't be sorted.",
215
+ "type": "string",
216
+ "enum": [
217
+ "concentric"
218
+ ]
219
+ },
220
+ {
221
+ "description": "Don't sort CSS declarations.",
222
+ "type": "string",
223
+ "enum": [
224
+ "null"
225
+ ]
226
+ }
227
+ ]
228
+ },
229
+ "singleLineBlockThreshold": {
230
+ "description": "Control the threshold value for putting block on a single line. If the number of statements in a block is less than or equal to this value, the block will be put on a single line as possible, but when the code can't fit on single line, it will still break into multiple lines.",
231
+ "type": [
232
+ "integer",
233
+ "null"
234
+ ],
235
+ "minimum": 0
236
+ },
237
+ "keyframeSelectorNotation": {
238
+ "description": "Control whether to use percentage or keyword (`from` and `to`) notation as keyframe selectors.",
239
+ "type": [
240
+ "string",
241
+ "null"
242
+ ],
243
+ "oneOf": [
244
+ {
245
+ "description": "Use keyword notation. This only affects `0%` and `100%`. For other percentage values, they will be kept as-is.",
246
+ "type": "string",
247
+ "enum": [
248
+ "keyword"
249
+ ]
250
+ },
251
+ {
252
+ "description": "Use percentage notation.",
253
+ "type": "string",
254
+ "enum": [
255
+ "percentage"
256
+ ]
257
+ },
258
+ {
259
+ "description": "Keyframe selector notation will be kept as-is.",
260
+ "type": "object",
261
+ "enum": [
262
+ null
263
+ ]
264
+ }
265
+ ]
266
+ },
267
+ "attrValueQuotes": {
268
+ "description": "Control whether should add quotes to attribute value in selector or not if it's not quoted.",
269
+ "type": "string",
270
+ "oneOf": [
271
+ {
272
+ "description": "Always add quotes.",
273
+ "type": "string",
274
+ "enum": [
275
+ "always"
276
+ ]
277
+ },
278
+ {
279
+ "description": "Don't add quotes to those that're not quoted. For quoted value, quotes won't be removed.",
280
+ "type": "string",
281
+ "enum": [
282
+ "ignore"
283
+ ]
284
+ }
285
+ ]
286
+ },
287
+ "preferSingleLine": {
288
+ "$ref": "#/definitions/preferSingleLine"
289
+ },
290
+ "selectors.preferSingleLine": {
291
+ "$ref": "#/definitions/preferSingleLine"
292
+ },
293
+ "functionArgs.preferSingleLine": {
294
+ "$ref": "#/definitions/preferSingleLine"
295
+ },
296
+ "sassContentAtRule.preferSingleLine": {
297
+ "$ref": "#/definitions/preferSingleLine"
298
+ },
299
+ "sassIncludeAtRule.preferSingleLine": {
300
+ "$ref": "#/definitions/preferSingleLine"
301
+ },
302
+ "sassMap.preferSingleLine": {
303
+ "$ref": "#/definitions/preferSingleLine"
304
+ },
305
+ "sassModuleConfig.preferSingleLine": {
306
+ "$ref": "#/definitions/preferSingleLine"
307
+ },
308
+ "sassParams.preferSingleLine": {
309
+ "$ref": "#/definitions/preferSingleLine"
310
+ },
311
+ "lessImportOptions.preferSingleLine": {
312
+ "$ref": "#/definitions/preferSingleLine"
313
+ },
314
+ "lessMixinArgs.preferSingleLine": {
315
+ "$ref": "#/definitions/preferSingleLine"
316
+ },
317
+ "lessMixinParams.preferSingleLine": {
318
+ "$ref": "#/definitions/preferSingleLine"
319
+ },
320
+ "singleLineTopLevelDeclarations": {
321
+ "description": "Control whether to force to format all top-level declarations on a single line.",
322
+ "type": "boolean"
323
+ },
324
+ "selectorOverrideCommentDirective": {
325
+ "description": "Text directive for overriding selector formatting.",
326
+ "type": "string"
327
+ },
328
+ "ignoreCommentDirective": {
329
+ "description": "Text directive for ignoring formatting specific statement.",
330
+ "type": "string"
331
+ },
332
+ "ignoreFileCommentDirective": {
333
+ "description": "Text directive for ignoring formatting a whole file.",
334
+ "type": "string"
335
+ }
336
+ }
337
+ }
@@ -0,0 +1,499 @@
1
+ {
2
+ "title": "Config",
3
+ "description": "Configuration for dprint-plugin-markup.",
4
+ "type": "object",
5
+ "properties": {
6
+ "printWidth": {
7
+ "description": "The line width limitation that markup_fmt should *(but not must)* avoid exceeding. markup_fmt will try its best to keep line width less than this value, but it may exceed for some cases, for example, a very very long single word.",
8
+ "type": "integer",
9
+ "minimum": 0
10
+ },
11
+ "useTabs": {
12
+ "description": "Specify use space or tab for indentation.",
13
+ "type": "boolean"
14
+ },
15
+ "indentWidth": {
16
+ "description": "Size of indentation. When enabled `useTabs`, this option may be disregarded, since only one tab will be inserted when indented once.",
17
+ "type": "integer",
18
+ "minimum": 0
19
+ },
20
+ "lineBreak": {
21
+ "description": "Specify whether use `\\n` (LF) or `\\r\\n` (CRLF) for line break.",
22
+ "type": "string",
23
+ "enum": [
24
+ "lf",
25
+ "crlf"
26
+ ]
27
+ },
28
+ "quotes": {
29
+ "description": "Control the quotes of attribute value.",
30
+ "type": "string",
31
+ "oneOf": [
32
+ {
33
+ "description": "Use double quotes as possible. However if there're double quotes in strings, quotes will be kept as-is.",
34
+ "type": "string",
35
+ "enum": [
36
+ "double"
37
+ ]
38
+ },
39
+ {
40
+ "description": "Use single quotes as possible. However if there're single quotes in strings, quotes will be kept as-is.",
41
+ "type": "string",
42
+ "enum": [
43
+ "single"
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ "formatComments": {
49
+ "description": "Control whether whitespace should be inserted at the beginning and end of comments and comments should be indented properly or not.",
50
+ "type": "boolean"
51
+ },
52
+ "scriptIndent": {
53
+ "description": "Control whether the code block in the `<script>` tag should be indented or not.",
54
+ "type": "boolean"
55
+ },
56
+ "html.scriptIndent": {
57
+ "description": "Control whether the code block in the `<script>` tag should be indented or not for HTML.",
58
+ "type": [
59
+ "boolean",
60
+ "null"
61
+ ]
62
+ },
63
+ "vue.scriptIndent": {
64
+ "description": "Control whether the code block in the `<script>` tag should be indented or not for Vue.",
65
+ "type": [
66
+ "boolean",
67
+ "null"
68
+ ]
69
+ },
70
+ "svelte.scriptIndent": {
71
+ "description": "Control whether the code block in the `<script>` tag should be indented or not for Svelte.",
72
+ "type": [
73
+ "boolean",
74
+ "null"
75
+ ]
76
+ },
77
+ "astro.scriptIndent": {
78
+ "description": "Control whether the code block in the `<script>` tag should be indented or not for Astro.",
79
+ "type": [
80
+ "boolean",
81
+ "null"
82
+ ]
83
+ },
84
+ "styleIndent": {
85
+ "description": "Control whether the code block in the `<style>` tag should be indented or not.",
86
+ "type": "boolean"
87
+ },
88
+ "html.styleIndent": {
89
+ "description": "Control whether the code block in the `<style>` tag should be indented or not for HTML.",
90
+ "type": [
91
+ "boolean",
92
+ "null"
93
+ ]
94
+ },
95
+ "vue.styleIndent": {
96
+ "description": "Control whether the code block in the `<style>` tag should be indented or not for Vue.",
97
+ "type": [
98
+ "boolean",
99
+ "null"
100
+ ]
101
+ },
102
+ "svelte.styleIndent": {
103
+ "description": "Control whether the code block in the `<style>` tag should be indented or not for Svelte.",
104
+ "type": [
105
+ "boolean",
106
+ "null"
107
+ ]
108
+ },
109
+ "astro.styleIndent": {
110
+ "description": "Control whether the code block in the `<style>` tag should be indented or not for Astro.",
111
+ "type": [
112
+ "boolean",
113
+ "null"
114
+ ]
115
+ },
116
+ "closingBracketSameLine": {
117
+ "description": "Control the closing bracket (`>`) of a multi-line element should come at the end of the last line or on the next line (with a line break).",
118
+ "type": "boolean"
119
+ },
120
+ "closingTagLineBreakForEmpty": {
121
+ "description": "When there're no children in an element, this option controls whether to insert a line break before the closing tag or not.",
122
+ "type": "string",
123
+ "oneOf": [
124
+ {
125
+ "description": "Always insert a line break before the closing tag.",
126
+ "type": "string",
127
+ "enum": [
128
+ "always"
129
+ ]
130
+ },
131
+ {
132
+ "description": "Only insert a line break if it doesn't fit the `printWidth` option.",
133
+ "type": "string",
134
+ "enum": [
135
+ "fit"
136
+ ]
137
+ },
138
+ {
139
+ "description": "Don't insert a line break.",
140
+ "type": "string",
141
+ "enum": [
142
+ "never"
143
+ ]
144
+ }
145
+ ]
146
+ },
147
+ "maxAttrsPerLine": {
148
+ "description": "Control the maximum number of attributes in one line. If this option is unset, there won't be any limitations. This option conflicts with `preferAttrsSingleLine` option.",
149
+ "type": [
150
+ "integer",
151
+ "null"
152
+ ],
153
+ "minimum": 1
154
+ },
155
+ "preferAttrsSingleLine": {
156
+ "description": "Control whether attributes should be put on single line when possible. This option conflicts with `maxAttrsPerLine` option.",
157
+ "type": "boolean"
158
+ },
159
+ "html.normal.selfClosing": {
160
+ "description": "Control whether HTML normal element should be self-closed or not if it doesn't have children.",
161
+ "type": [
162
+ "boolean",
163
+ "null"
164
+ ]
165
+ },
166
+ "html.void.selfClosing": {
167
+ "description": "Control whether HTML void element should be self-closed or not if it doesn't have children.",
168
+ "type": [
169
+ "boolean",
170
+ "null"
171
+ ]
172
+ },
173
+ "component.selfClosing": {
174
+ "description": "Control whether Vue/Svelte/Astro/Angular component should be self-closed or not if it doesn't have children.",
175
+ "type": [
176
+ "boolean",
177
+ "null"
178
+ ]
179
+ },
180
+ "svg.selfClosing": {
181
+ "description": "Control whether SVG element should be self-closed or not if it doesn't have children.",
182
+ "type": [
183
+ "boolean",
184
+ "null"
185
+ ]
186
+ },
187
+ "mathml.selfClosing": {
188
+ "description": "Control whether MathML element should be self-closed or not if it doesn't have children.",
189
+ "type": [
190
+ "boolean",
191
+ "null"
192
+ ]
193
+ },
194
+ "whitespaceSensitivity": {
195
+ "description": "Control the whitespace sensitivity before and after the children of an element.",
196
+ "type": "string",
197
+ "oneOf": [
198
+ {
199
+ "description": "Respect the default value of CSS `display` property.",
200
+ "type": "string",
201
+ "enum": [
202
+ "css"
203
+ ]
204
+ },
205
+ {
206
+ "description": "Whitespace (or the lack of it) around all tags is considered significant.",
207
+ "type": "string",
208
+ "enum": [
209
+ "strict"
210
+ ]
211
+ },
212
+ {
213
+ "description": "Whitespace (or the lack of it) around all tags is considered insignificant.",
214
+ "type": "string",
215
+ "enum": [
216
+ "ignore"
217
+ ]
218
+ }
219
+ ]
220
+ },
221
+ "component.whitespaceSensitivity": {
222
+ "description": "Control the whitespace sensitivity before and after the children of an element for components.",
223
+ "type": [
224
+ "string",
225
+ "null"
226
+ ],
227
+ "oneOf": [
228
+ {
229
+ "description": "Respect the default value of CSS `display` property.",
230
+ "type": "string",
231
+ "enum": [
232
+ "css"
233
+ ]
234
+ },
235
+ {
236
+ "description": "Whitespace (or the lack of it) around all tags is considered significant.",
237
+ "type": "string",
238
+ "enum": [
239
+ "strict"
240
+ ]
241
+ },
242
+ {
243
+ "description": "Whitespace (or the lack of it) around all tags is considered insignificant.",
244
+ "type": "string",
245
+ "enum": [
246
+ "ignore"
247
+ ]
248
+ },
249
+ {
250
+ "description": "Use the value of `whitespaceSensitivity` option.",
251
+ "type": "object",
252
+ "enum": [
253
+ null
254
+ ]
255
+ }
256
+ ]
257
+ },
258
+ "doctypeKeywordCase": {
259
+ "description": "Control the case of \"doctype\" keyword in `<!DOCTYPE>`.",
260
+ "type": "string",
261
+ "oneOf": [
262
+ {
263
+ "description": "Keep the case as-is.",
264
+ "type": "string",
265
+ "enum": [
266
+ "ignore"
267
+ ]
268
+ },
269
+ {
270
+ "description": "Print \"DOCTYPE\" in upper case.",
271
+ "type": "string",
272
+ "enum": [
273
+ "upper"
274
+ ]
275
+ },
276
+ {
277
+ "description": "Print \"doctype\" in lower case.",
278
+ "type": "string",
279
+ "enum": [
280
+ "lower"
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ "vBindStyle": {
286
+ "description": "Control Vue `v-bind` directive style.",
287
+ "type": [
288
+ "string",
289
+ "null"
290
+ ],
291
+ "oneOf": [
292
+ {
293
+ "description": "Use short-hand form like `:value`.",
294
+ "type": "string",
295
+ "enum": [
296
+ "short"
297
+ ]
298
+ },
299
+ {
300
+ "description": "Use long-hand form like `v-bind:value`.",
301
+ "type": "string",
302
+ "enum": [
303
+ "long"
304
+ ]
305
+ },
306
+ {
307
+ "description": "Style of `v-bind` directive won't be changed.",
308
+ "type": "object",
309
+ "enum": [
310
+ null
311
+ ]
312
+ }
313
+ ]
314
+ },
315
+ "vOnStyle": {
316
+ "description": "Control Vue `v-on` directive style.",
317
+ "type": [
318
+ "string",
319
+ "null"
320
+ ],
321
+ "oneOf": [
322
+ {
323
+ "description": "Use short-hand form like `@click`.",
324
+ "type": "string",
325
+ "enum": [
326
+ "short"
327
+ ]
328
+ },
329
+ {
330
+ "description": "Use long-hand form like `v-on:click`.",
331
+ "type": "string",
332
+ "enum": [
333
+ "long"
334
+ ]
335
+ },
336
+ {
337
+ "description": "Style of `v-on` directive won't be changed.",
338
+ "type": "object",
339
+ "enum": [
340
+ null
341
+ ]
342
+ }
343
+ ]
344
+ },
345
+ "vForDelimiterStyle": {
346
+ "description": "Control Vue `v-for` directive delimiter style.",
347
+ "type": [
348
+ "string",
349
+ "null"
350
+ ],
351
+ "oneOf": [
352
+ {
353
+ "description": "Use `in` as `v-for` delimiter.",
354
+ "type": "string",
355
+ "enum": [
356
+ "in"
357
+ ]
358
+ },
359
+ {
360
+ "description": "Use `of` as `v-for` delimiter.",
361
+ "type": "string",
362
+ "enum": [
363
+ "of"
364
+ ]
365
+ },
366
+ {
367
+ "description": "Style of `v-for` directive delimiter won't be changed.",
368
+ "type": "object",
369
+ "enum": [
370
+ null
371
+ ]
372
+ }
373
+ ]
374
+ },
375
+ "vSlotStyle": {
376
+ "description": "Control Vue `v-slot` directive style.",
377
+ "type": [
378
+ "string",
379
+ "null"
380
+ ],
381
+ "oneOf": [
382
+ {
383
+ "description": "Use short-hand form like `#default` or `#named`.",
384
+ "type": "string",
385
+ "enum": [
386
+ "short"
387
+ ]
388
+ },
389
+ {
390
+ "description": "Use long-hand form like `v-slot:default` or `v-slot:named`.",
391
+ "type": "string",
392
+ "enum": [
393
+ "long"
394
+ ]
395
+ },
396
+ {
397
+ "description": "For default slot, use `v-slot` (shorter than `#default`); otherwise, use short-hand form.",
398
+ "type": "string",
399
+ "enum": [
400
+ "vSlot"
401
+ ]
402
+ },
403
+ {
404
+ "description": "Style of `v-slot` directive won't be changed.",
405
+ "type": "object",
406
+ "enum": [
407
+ null
408
+ ]
409
+ }
410
+ ]
411
+ },
412
+ "component.vSlotStyle": {
413
+ "description": "Control Vue `v-slot` directive style for Vue components.",
414
+ "type": [
415
+ "string",
416
+ "null"
417
+ ],
418
+ "enum": [
419
+ "short",
420
+ "long",
421
+ "vSlot",
422
+ null
423
+ ]
424
+ },
425
+ "default.vSlotStyle": {
426
+ "description": "Control Vue `v-slot` directive style for default slot.",
427
+ "type": [
428
+ "string",
429
+ "null"
430
+ ],
431
+ "enum": [
432
+ "short",
433
+ "long",
434
+ "vSlot",
435
+ null
436
+ ]
437
+ },
438
+ "named.vSlotStyle": {
439
+ "description": "Control Vue `v-slot` directive style for named slot.",
440
+ "type": [
441
+ "string",
442
+ "null"
443
+ ],
444
+ "enum": [
445
+ "short",
446
+ "long",
447
+ "vSlot",
448
+ null
449
+ ]
450
+ },
451
+ "vBindSameNameShortHand": {
452
+ "description": "Control whether Vue attribute should be written in short-hand form or not if attribute name and value are same.",
453
+ "type": [
454
+ "boolean",
455
+ "null"
456
+ ]
457
+ },
458
+ "strictSvelteAttr": {
459
+ "description": "Control whether Svelte attribute value should be in strict mode or not.",
460
+ "type": "boolean"
461
+ },
462
+ "svelteAttrShorthand": {
463
+ "description": "Control whether Svelte attribute should be written in short-hand form or not when possible.",
464
+ "type": [
465
+ "boolean",
466
+ "null"
467
+ ]
468
+ },
469
+ "svelteDirectiveShorthand": {
470
+ "description": "Control whether Svelte directive should be written in short-hand form or not when possible.",
471
+ "type": [
472
+ "boolean",
473
+ "null"
474
+ ]
475
+ },
476
+ "astroAttrShorthand": {
477
+ "description": "Control whether Astro attribute should be written in short-hand form or not when possible.",
478
+ "type": [
479
+ "boolean",
480
+ "null"
481
+ ]
482
+ },
483
+ "scriptFormatter": {
484
+ "description": "Tell markup_fmt what script formatter you are using.",
485
+ "type": [
486
+ "string",
487
+ "null"
488
+ ]
489
+ },
490
+ "ignoreCommentDirective": {
491
+ "description": "Text directive for ignoring formatting specific element or node.",
492
+ "type": "string"
493
+ },
494
+ "ignoreFileCommentDirective": {
495
+ "description": "Text directive for ignoring formatting a whole file.",
496
+ "type": "string"
497
+ }
498
+ }
499
+ }
package/dist/lib/index.js CHANGED
@@ -11,6 +11,8 @@ module.exports = {
11
11
  "markdown-recommended": recommended_1.markdownRecommended,
12
12
  "toml-recommended": recommended_1.tomlRecommended,
13
13
  "typescript-recommended": recommended_1.typescriptRecommended,
14
+ "malva-recommended": recommended_1.malvaRecommended,
15
+ "markup-recommended": recommended_1.markupRecommended,
14
16
  },
15
17
  rules: dprint_1.dprintRules,
16
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAAA,6EAAiF;AACjF,uDAM8B;AAC9B,2CAA4C;AAE5C,MAAM,CAAC,OAAO,GAAG;IACb,OAAO,EAAE;QACL,mCAAmC,EAAE,uDAA8B;QACnE,wBAAwB,EAAE,mCAAqB;QAC/C,kBAAkB,EAAE,6BAAe;QACnC,sBAAsB,EAAE,iCAAmB;QAC3C,kBAAkB,EAAE,6BAAe;QACnC,wBAAwB,EAAE,mCAAqB;KAClD;IACD,KAAK,EAAE,oBAAW;CACrB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAAA,6EAAiF;AACjF,uDAQ8B;AAC9B,2CAA4C;AAE5C,MAAM,CAAC,OAAO,GAAG;IACb,OAAO,EAAE;QACL,mCAAmC,EAAE,uDAA8B;QACnE,wBAAwB,EAAE,mCAAqB;QAC/C,kBAAkB,EAAE,6BAAe;QACnC,sBAAsB,EAAE,iCAAmB;QAC3C,kBAAkB,EAAE,6BAAe;QACnC,wBAAwB,EAAE,mCAAqB;QAC/C,mBAAmB,EAAE,8BAAgB;QACrC,oBAAoB,EAAE,+BAAiB;KAC1C;IACD,KAAK,EAAE,oBAAW;CACrB,CAAA"}
@@ -8,7 +8,9 @@ const path_1 = __importDefault(require("path"));
8
8
  const dockerfile_config_schema_json_1 = __importDefault(require("../dprint/dockerfile-config-schema.json"));
9
9
  const dprint_1 = require("../dprint/dprint");
10
10
  const json_config_schema_json_1 = __importDefault(require("../dprint/json-config-schema.json"));
11
+ const malva_config_schema_json_1 = __importDefault(require("../dprint/malva-config-schema.json"));
11
12
  const markdown_config_schema_json_1 = __importDefault(require("../dprint/markdown-config-schema.json"));
13
+ const markup_config_schema_json_1 = __importDefault(require("../dprint/markup-config-schema.json"));
12
14
  const toml_config_schema_json_1 = __importDefault(require("../dprint/toml-config-schema.json"));
13
15
  const typescript_config_schema_json_1 = __importDefault(require("../dprint/typescript-config-schema.json"));
14
16
  const difference_iterator_1 = require("../util/difference-iterator");
@@ -19,6 +21,8 @@ const configSchemas = [
19
21
  { name: "markdown", configSchema: markdown_config_schema_json_1.default },
20
22
  { name: "toml", configSchema: toml_config_schema_json_1.default },
21
23
  { name: "typescript", configSchema: typescript_config_schema_json_1.default },
24
+ { name: "malva", configSchema: malva_config_schema_json_1.default },
25
+ { name: "markup", configSchema: markup_config_schema_json_1.default },
22
26
  ];
23
27
  const messages = {
24
28
  requireLinebreak: "Require line break(s).",
@@ -207,13 +211,13 @@ exports.dprintRules = configSchemas.map((config) => ({
207
211
  const fileText = sourceCode.getText();
208
212
  const options = (_c = context.options[0]) !== null && _c !== void 0 ? _c : defaultOptions;
209
213
  const configFile = (_d = options.configFile) !== null && _d !== void 0 ? _d : "dprint.json";
210
- const config = options.config || {};
214
+ const configOpt = options.config || {};
211
215
  // Needs an absolute path
212
216
  if (!filePath || !path_1.default.isAbsolute(filePath)) {
213
217
  return;
214
218
  }
215
219
  // Does format
216
- const formattedText = (0, dprint_1.format)(configFile, config, filePath, fileText);
220
+ const formattedText = (0, dprint_1.format)(configFile, configOpt, filePath, fileText, config.name);
217
221
  if (typeof formattedText !== "string") {
218
222
  return;
219
223
  }
@@ -221,7 +225,7 @@ exports.dprintRules = configSchemas.map((config) => ({
221
225
  },
222
226
  }),
223
227
  },
224
- })).reduce((r1, r2) => (Object.assign(Object.assign({}, r1), r2)));
228
+ })).reduce((r1, r2) => (Object.assign(Object.assign({}, r1), r2)), {});
225
229
  function generateLintReports(fileText, formattedText, sourceCode, context) {
226
230
  for (const d of difference_iterator_1.DifferenceIterator.iterate(fileText, formattedText)) {
227
231
  const loc = d.type === "add"
@@ -1 +1 @@
1
- {"version":3,"file":"dprint.js","sourceRoot":"","sources":["../../../lib/rules/dprint.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,4GAA4E;AAC5E,6CAAyC;AACzC,gGAAgE;AAChE,wGAAwE;AACxE,gGAAg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;KACL;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ben_12/eslint-plugin-dprint",
3
- "version": "0.14.5",
3
+ "version": "1.0.0",
4
4
  "description": "An ESLint plugin that fixes code with dprint",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -16,6 +16,8 @@
16
16
  "@dprint/markdown": "^0.17.8",
17
17
  "@dprint/toml": "^0.6.3",
18
18
  "@dprint/typescript": "^0.93.3",
19
+ "dprint-plugin-malva": "^0.11.1",
20
+ "dprint-plugin-markup": "^0.18.0",
19
21
  "eslint": ">=7.0.0"
20
22
  },
21
23
  "peerDependenciesMeta": {
@@ -33,6 +35,12 @@
33
35
  },
34
36
  "@dprint/typescript": {
35
37
  "optional": true
38
+ },
39
+ "dprint-plugin-malva": {
40
+ "optional": true
41
+ },
42
+ "dprint-plugin-markup": {
43
+ "optional": true
36
44
  }
37
45
  },
38
46
  "dependencies": {
@@ -46,10 +54,11 @@
46
54
  "@ben_12/eslint-simple-parser": "^0.1.0",
47
55
  "@types/debug": "^4.1.5",
48
56
  "@types/diff": "^5.0.0",
49
- "@types/eslint": "^8.44.4",
57
+ "@types/eslint": "^9.0.0",
50
58
  "@types/node": "^18.0.0",
51
- "@typescript-eslint/eslint-plugin": "^6.0.0",
52
- "eslint": "^8.50.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
60
+ "axios": "^1.7.9",
61
+ "eslint": "^9.0.0",
53
62
  "mocha": "^10.0.0",
54
63
  "nyc": "^15.0.1",
55
64
  "rimraf": "^5.0.0",
@@ -62,6 +71,9 @@
62
71
  "codecov": "nyc report --reporter text-lcov | codecov --pipe --disable=gcov",
63
72
  "lint": "eslint \"**/*.ts\" \"**/*.js\" \"**/*.md\"",
64
73
  "test": "npm run -s lint && npm run -s test:ci",
74
+ "test:ci:7.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
75
+ "test:ci:8.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
76
+ "test:ci:9.x": "tsc && nyc mocha \"test/rules/**/*.ts\"",
65
77
  "test:ci": "tsc && nyc mocha \"test/rules/**/*.ts\"",
66
78
  "watch": "mocha --require ts-node/register --watch --watch-files \"lib/**/*.ts,test/**/*.ts\" \"test/rules/**/*.ts\"",
67
79
  "preversion": "npm test",