1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/.dprint.json
Bartek Iwańczuk 5874fc3d0a
feat: add support for globs in the config file and CLI arguments for files (#19102)
Follow up to https://github.com/denoland/deno/pull/19084.

This commit adds support for globs in the configuration file as well 
as CLI arguments for files. 

With this change users can now use glob syntax for "include" and 
"exclude" fields, like so:

```json
{
  "lint": {
    "include": [
      "directory/test*.ts",
      "other_dir/"
    ],
    "exclude": [
      "other_dir/foo*.ts",
      "nested/nested2/*"
    ]
  },
  "test": {
    "include": [
      "data/test*.ts",
      "nested/",
      "tests/test[1-9].ts"
    ],
    "exclude": [
      "nested/foo?.ts",
      "nested/nested2/*"
    ]
  }
}
```

Or in CLI args like so:
```
// notice quotes here; these values will be passed to Deno verbatim
// and deno will perform glob expansion

$ deno fmt --ignore="data/*.ts"
$ deno lint "data/**/*.ts"
```

Closes https://github.com/denoland/deno/issues/17971
Closes https://github.com/denoland/deno/issues/6365
2023-05-23 03:39:59 +02:00

65 lines
1.9 KiB
JSON

{
"incremental": true,
"typescript": {
"deno": true
},
"markdown": {
"deno": true
},
"json": {
"deno": true
},
"exec": {
"associations": "**/*.rs",
"rustfmt": "rustfmt --config imports_granularity=item"
},
"includes": [
"**/*.{ts,tsx,js,jsx,json,md,toml,rs}"
],
"excludes": [
".cargo_home",
".git",
"cli/bench/testdata/express-router.js",
"cli/bench/testdata/npm/*",
"cli/tsc/dts/lib.d.ts",
"cli/tsc/dts/lib.scripthost.d.ts",
"cli/tsc/dts/lib.decorators*.d.ts",
"cli/tsc/dts/lib.webworker*.d.ts",
"cli/tsc/dts/lib.dom*.d.ts",
"cli/tsc/dts/lib.es*.d.ts",
"cli/tsc/dts/typescript.d.ts",
"cli/tests/node_compat/test",
"cli/tests/testdata/file_extensions/ts_with_js_extension.js",
"cli/tests/testdata/fmt/badly_formatted.json",
"cli/tests/testdata/fmt/badly_formatted.md",
"cli/tests/testdata/byte_order_mark.ts",
"cli/tests/testdata/encoding",
"cli/tests/testdata/fmt/*",
"cli/tests/testdata/lint/glob/*",
"cli/tests/testdata/test/glob/*",
"cli/tests/testdata/import_assertions/json_with_shebang.json",
"cli/tests/testdata/run/inline_js_source_map*",
"cli/tests/testdata/malformed_config/*",
"cli/tests/testdata/npm/registry/",
"cli/tests/testdata/test/markdown_windows.md",
"cli/tsc/*typescript.js",
"gh-pages",
"target",
"test_ffi/tests/test.js",
"test_util/std",
"test_util/wpt",
"third_party",
"tools/node_compat/TODO.md",
"tools/node_compat/node",
"tools/wpt/expectation.json",
"tools/wpt/manifest.json",
"ext/websocket/autobahn/reports"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.84.4.wasm",
"https://plugins.dprint.dev/json-0.17.2.wasm",
"https://plugins.dprint.dev/markdown-0.15.2.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm",
"https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab"
]
}