You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[License header](#license-header) ([slurp year from git](#retroactively-slurp-years-from-git-history))
@@ -704,6 +705,7 @@ Currently, none of the available options can be configured yet. It uses only the
704
705
<tsfmt/> <!-- has its own section below -->
705
706
<prettier/> <!-- has its own section below -->
706
707
<eslint/> <!-- has its own section below -->
708
+
<rome/> <!-- has its own section below -->
707
709
708
710
<licenseHeader>
709
711
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
@@ -814,6 +816,7 @@ For details, see the [npm detection](#npm-detection), [`.npmrc` detection](#npmr
814
816
815
817
<prettier/> <!-- has its own section below -->
816
818
<eslint/> <!-- has its own section below -->
819
+
<rome/> <!-- has its own section below -->
817
820
818
821
<licenseHeader>
819
822
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
@@ -890,6 +893,7 @@ For details, see the [npm detection](#npm-detection), [`.npmrc` detection](#npmr
890
893
<simple /> <!-- has its own section below -->
891
894
<gson /> <!-- has its own section below -->
892
895
<jackson /> <!-- has its own section below -->
896
+
<rome /> <!-- has its own section below -->
893
897
</json>
894
898
</configuration>
895
899
```
@@ -1220,6 +1224,153 @@ to true.
1220
1224
<aname="format"></a>
1221
1225
<aname="custom rules"></a>
1222
1226
1227
+
## Rome
1228
+
1229
+
[homepage](https://rome.tools/). [changelog](https://github.com/rome/tools/blob/main/CHANGELOG.md). Rome is a formatter that for the Frontend written in Rust, which has a native binary,
1230
+
does not require Node.js and as such, is pretty fast. It can currently format
1231
+
JavaScript, TypeScript, JSX, and JSON, and may support
Absolute paths are used as-is. Relative paths are resolved against the project's
1313
+
base directory. To use a pre-installed Rome binary on the user's path, specify
1314
+
just a name without any slashes / backslashes:
1315
+
1316
+
1317
+
```xml
1318
+
<rome>
1319
+
<!-- Uses the "rome" command, which must be on the user's path. -->
1320
+
<pathToExe>rome</pathToExe>
1321
+
</rome>
1322
+
```
1323
+
1324
+
### Rome configuration file
1325
+
1326
+
Rome is a biased formatter and linter without many options, but there are a few
1327
+
basic options. Rome uses a file named [rome.json](https://docs.rome.tools/configuration/)
1328
+
for its configuration. When none is specified, the default configuration from
1329
+
Rome is used. To use a custom configuration:
1330
+
1331
+
```xml
1332
+
<rome>
1333
+
<!-- Must point to the directory with the "rome.json" config file -->
1334
+
<!-- Relative paths are resolved against the project's base directory -->
1335
+
<configPath>${project.basedir}</configPath>
1336
+
</rome>
1337
+
```
1338
+
1339
+
### Rome input Language
1340
+
1341
+
By default, Rome detects the language / syntax of the files to format
1342
+
automatically from the file extension. This may fail if your source code files
1343
+
have unusual extensions for some reason. If you are using the generic format,
1344
+
you can force a certain language like this:
1345
+
1346
+
```xml
1347
+
<configuration>
1348
+
<formats>
1349
+
<format>
1350
+
<includes>
1351
+
<include>src/**/typescript/**/*.mjson</include>
1352
+
</includes>
1353
+
1354
+
<rome>
1355
+
<version>12.0.0</version>
1356
+
<language>json</language>
1357
+
</prettier>
1358
+
</rome>
1359
+
1360
+
</formats>
1361
+
</configuration>
1362
+
```
1363
+
1364
+
The following languages are currently recognized:
1365
+
1366
+
*`js` -- JavaScript
1367
+
*`jsx` -- JavaScript + JSX (React)
1368
+
*`js?` -- JavaScript, with or without JSX, depending on the file extension
1369
+
*`ts` -- TypeScript
1370
+
*`tsx` -- TypeScript + JSX (React)
1371
+
*`ts?` -- TypeScript, with or without JSX, depending on the file extension
1372
+
*`json` -- JSON
1373
+
1223
1374
## Generic steps
1224
1375
1225
1376
[Prettier](#prettier), [eclipse wtp](#eclipse-web-tools-platform), and [license header](#license-header) are available in every format, and they each have their own section. As mentioned in the [quickstart](#quickstart), there are a variety of simple generic steps which are also available in every format, here are examples of these:
0 commit comments