Skip to content

Commit df0bfe0

Browse files
committed
πŸ”– 0.1.0 (built with 5a377a1)
0 parents  commit df0bfe0

File tree

18 files changed

+465
-0
lines changed

18 files changed

+465
-0
lines changed

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Toru Nagashima
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# eslint-plugin-dprint
2+
3+
The plugin that runs [dprint] to format code in ESLint.
4+
5+
## πŸ’Ώ Installation
6+
7+
Use [npm] or a compatible tool.
8+
9+
```
10+
$ npm install -D eslint eslint-plugin-dprint
11+
```
12+
13+
If you want to use [dprint] of own version, install `@dprint/core` and `dprint-plugin-typescript` as well. This is optional.
14+
15+
```
16+
$ npm install -D @dprint/core dprint-plugin-typescript
17+
```
18+
19+
## πŸ“– Usage
20+
21+
Write your ESLint configuration:
22+
23+
```js
24+
module.exports = {
25+
plugins: ["dprint"],
26+
rules: {
27+
"dprint/dprint": [
28+
"error",
29+
{
30+
config: {
31+
// The TypeScript configuration of dprint
32+
// See also https://github.com/dprint/dprint/blob/457cbb5a2a8ded959e8185bf8528ba2b7241b7dd/packages/dprint-plugin-typescript/lib/dprint-plugin-typescript.d.ts
33+
},
34+
},
35+
],
36+
},
37+
};
38+
```
39+
40+
Then run ESLint!
41+
42+
### Rules
43+
44+
| Rule | Description |
45+
| :-------------- | :------------------------ |
46+
| [dprint/dprint] | Check code with [dprint]. |
47+
48+
### Configs
49+
50+
TBD.
51+
52+
## πŸ“° Changelog
53+
54+
See [GitHub Releases](https://github.com/mysticatea/eslint-plugin-dprint/releases).
55+
56+
## ❀️ Contributing
57+
58+
Welcome contributing!
59+
60+
Please use GitHub's Issues/PRs.
61+
62+
### Development Tools
63+
64+
- `npm test` ... Run tests. It generates code coverage into `coverage` directory.
65+
- `npm run watch` ... Run tests when files are edited.
66+
- `npm version <patch|minor|major>` ... Bump a new version.
67+
68+
[dprint]: https://github.com/dprint/dprint
69+
[npm]: https://www.npmjs.com/
70+
[dprint/dprint]: docs/rules/dprint.md

β€Žlib/configs/recommended.d.tsβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export declare const recommended: {
2+
plugins: string[];
3+
rules: {
4+
"dprint/dprint": string;
5+
};
6+
};

β€Žlib/configs/recommended.jsβ€Ž

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlib/configs/recommended.js.mapβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlib/index.d.tsβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare const _default: {
2+
configs: {
3+
recommended: {
4+
plugins: string[];
5+
rules: {
6+
"dprint/dprint": string;
7+
};
8+
};
9+
};
10+
rules: {
11+
dprint: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"requireLinebreak" | "extraLinebreak" | "requireWhitespace" | "extraWhitespace" | "requireCode" | "extraCode" | "replaceWhitespace" | "replaceCode", readonly unknown[], {
12+
Program(): void;
13+
}>;
14+
};
15+
};
16+
export = _default;

β€Žlib/index.jsβ€Ž

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlib/index.js.mapβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlib/rules/dprint.d.tsβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare type MessageId = "requireLinebreak" | "extraLinebreak" | "requireWhitespace" | "extraWhitespace" | "requireCode" | "extraCode" | "replaceWhitespace" | "replaceCode";
2+
export declare const dprint: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<MessageId, readonly unknown[], {
3+
Program(): void;
4+
}>;
5+
export {};

β€Žlib/rules/dprint.jsβ€Ž

Lines changed: 219 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)