Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
adjsky committed Oct 31, 2024
1 parent fd77918 commit 595a796
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 402 deletions.
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"deno.enable": true,
"editor.defaultFormatter": "denoland.vscode-deno",
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
"deno.enable": true,
"editor.defaultFormatter": "denoland.vscode-deno",
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
48 changes: 24 additions & 24 deletions core/build_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import denoJson from "./deno.json" with { type: "json" };
await emptyDir("./npm");

await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {},
test: false,
package: {
name: "resulto",
version: denoJson.version,
description:
"TypeScript implementation of the Result type from Rust with async support",
author: "adjsky",
repository: {
"type": "git",
"url": "git+https://github.com/adjsky/resulto.git",
},
keywords: [
"result",
"rust",
],
license: "MIT",
},
postBuild() {
Deno.copyFileSync("../LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {},
test: false,
package: {
name: "resulto",
version: denoJson.version,
description:
"TypeScript implementation of the Result type from Rust with async support",
author: "adjsky",
repository: {
"type": "git",
"url": "git+https://github.com/adjsky/resulto.git",
},
keywords: [
"result",
"rust",
],
license: "MIT",
},
postBuild() {
Deno.copyFileSync("../LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});
28 changes: 14 additions & 14 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"tasks": {
"test": "deno test --allow-read --allow-env --allow-sys"
},
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
"@std/assert": "jsr:@std/assert@^1.0.6",
"@std/testing": "jsr:@std/testing@^1.0.3"
},
"fmt": {
"useTabs": true
},
"workspace": ["./eslint-plugin", "./core"],
"lock": false,
"nodeModulesDir": "auto"
"tasks": {
"test": "deno test --allow-read --allow-env --allow-sys"
},
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
"@std/assert": "jsr:@std/assert@^1.0.6",
"@std/testing": "jsr:@std/testing@^1.0.3"
},
"fmt": {
"useTabs": true
},
"workspace": ["./eslint-plugin", "./core"],
"lock": false,
"nodeModulesDir": "auto"
}
28 changes: 14 additions & 14 deletions eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ npm install --save-dev eslint @eslint/js typescript typescript-eslint eslint-plu

```json
{
"compilerOptions": {
"strict": true
}
"compilerOptions": {
"strict": true
}
}
```

Expand All @@ -31,9 +31,9 @@ import resulto from "eslint-plugin-resulto";
import ts from "typescript-eslint";

export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
resulto.configs.recommended,
js.configs.recommended,
...ts.configs.recommended,
resulto.configs.recommended,
);
```

Expand All @@ -51,14 +51,14 @@ To make this work in TypeScript without making ESLint or tsc angry you need to:

```js
export default ts.config({
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
varsIgnorePattern: "^_",
},
],
},
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
varsIgnorePattern: "^_",
},
],
},
});
```

Expand Down
62 changes: 31 additions & 31 deletions eslint-plugin/build_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ import denoJson from "./deno.json" with { type: "json" };
await emptyDir("./npm");

await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {},
test: false,
package: {
name: "eslint-plugin-resulto",
version: denoJson.version,
description: "ESLint plugin for resulto",
author: "adjsky",
repository: {
"type": "git",
"url": "git+https://github.com/adjsky/resulto.git",
},
keywords: [
"result",
"rust",
"eslint",
"plugin",
],
license: "MIT",
peerDependencies: {
"@typescript-eslint/parser": "8.x",
},
dependencies: {
"@typescript-eslint/utils": "^8.5.0",
},
},
postBuild() {
Deno.copyFileSync("../LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {},
test: false,
package: {
name: "eslint-plugin-resulto",
version: denoJson.version,
description: "ESLint plugin for resulto",
author: "adjsky",
repository: {
"type": "git",
"url": "git+https://github.com/adjsky/resulto.git",
},
keywords: [
"result",
"rust",
"eslint",
"plugin",
],
license: "MIT",
peerDependencies: {
"@typescript-eslint/parser": "8.x",
},
dependencies: {
"@typescript-eslint/utils": "^8.5.0",
},
},
postBuild() {
Deno.copyFileSync("../LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});
22 changes: 11 additions & 11 deletions eslint-plugin/deno.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@resulto/eslint-plugin",
"version": "2.0.1",
"exports": {
".": "./mod.ts"
},
"imports": {
"@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.12.2",
"@typescript-eslint/rule-tester": "npm:@typescript-eslint/rule-tester@^8.12.2",
"@typescript-eslint/utils": "npm:@typescript-eslint/utils@^8.12.2",
"typescript": "npm:typescript@^5.6.3"
}
"name": "@resulto/eslint-plugin",
"version": "2.0.1",
"exports": {
".": "./mod.ts"
},
"imports": {
"@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.12.2",
"@typescript-eslint/rule-tester": "npm:@typescript-eslint/rule-tester@^8.12.2",
"@typescript-eslint/utils": "npm:@typescript-eslint/utils@^8.12.2",
"typescript": "npm:typescript@^5.6.3"
}
}
38 changes: 19 additions & 19 deletions eslint-plugin/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import denoJson from "./deno.json" with { type: "json" };
import mustUseResult from "./rules/must_use_result.ts";

const plugin: FlatConfig.Plugin = {
configs: {
get recommended() {
return recommended;
},
},
meta: {
name: "eslint-plugin-resulto",
version: denoJson.version,
},
rules: {
"must-use-result": mustUseResult,
},
configs: {
get recommended() {
return recommended;
},
},
meta: {
name: "eslint-plugin-resulto",
version: denoJson.version,
},
rules: {
"must-use-result": mustUseResult,
},
};

const recommended: FlatConfig.Config = {
name: "name/recommended",
plugins: {
resulto: plugin,
},
rules: {
"resulto/must-use-result": "error",
},
name: "name/recommended",
plugins: {
resulto: plugin,
},
rules: {
"resulto/must-use-result": "error",
},
};

export default plugin;
Loading

0 comments on commit 595a796

Please sign in to comment.