Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @coven/compare/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/compare",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/constants/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/constants",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/cron/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/cron",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/expression/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/expression",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/iterables/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"./async": "./async/mod.ts"
},
"name": "@coven/iterables",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/math/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/math",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/memo/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/memo",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/pair/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"react-dom": "npm:react-dom@^19.2.4"
},
"name": "@coven/pair",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/parsers/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/parsers",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/predicates/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/predicates",
"version": "0.9.0"
"version": "0.9.1"
}
33 changes: 32 additions & 1 deletion @coven/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,39 @@
🚨 Linting rules.

This library has a collection of linting rules used in Coven Engineering
libraries in Deno environments.
libraries in Deno environments. In theory it should be also compatible with
ESLint.

## Full list of rules

- `coven/max-lines`: Allow a max of `300` lines per file.
- `coven/no-break`: Disallow `break` statements.
- `coven/no-class`: Disallow classes.
- `coven/no-continue`: Disallow `continue` statements.
- `coven/no-default-export`: Disallow `export default` (use named instead).
- `coven/no-do-while`: Disallow `do..while` loops.
- `coven/no-enum`: Disallow `enum`.
- `coven/no-for-in`: Disallow `for..in` loops.
- `coven/no-function`: Disallow `function` (use `const` instead).
- `coven/no-null`: Disallow `null` (use `undefined` instead).
- `coven/no-switch`: Disallow `switch`.
- `coven/no-this`: Disallow `this`.
- `coven/no-throw`: Disallow `throw` statements.
- `coven/no-try`: Disallow `try` blocks.
- `coven/no-while`: Disallow `while` loops.

## Example

To use this from deno, update `deno.json`'s `lint` property and add the
following:

```json
{
"plugins": ["jsr:@coven/rules"]
}
```

## Other links

- [Coverage](https://app.codecov.io/github/covenengineering/libraries).
- [Deno Lint](https://docs.deno.com/runtime/reference/cli/lint/).
2 changes: 1 addition & 1 deletion @coven/rules/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/rules",
"version": "0.9.0"
"version": "0.9.1"
}
27 changes: 26 additions & 1 deletion @coven/rules/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,32 @@ import { noTry } from "./no-try.ts";
import { noWhile } from "./no-while.ts";

/**
* Coven Engineering lint rules.
* Coven Engineering lint rules. Add the code in the example to enable the rules
* in your Deno project.
*
* Full list of rules:
* - `max-lines`: Allow a max of `300` lines per file.
* - `no-break`: Disallow `break` statements.
* - `no-class`: Disallow classes.
* - `no-continue`: Disallow `continue` statements.
* - `no-default-export`: Disallow `export default` (use named instead).
* - `no-do-while`: Disallow `do..while` loops.
* - `no-enum`: Disallow `enum`.
* - `no-for-in`: Disallow `for..in` loops.
* - `no-function`: Disallow `function` (use `const` instead).
* - `no-null`: Disallow `null` (use `undefined` instead).
* - `no-switch`: Disallow `switch`.
* - `no-this`: Disallow `this`.
* - `no-throw`: Disallow `throw` statements.
* - `no-try`: Disallow `try` blocks.
* - `no-while`: Disallow `while` loops.
*
* @example
* ```json
* {
* "plugins": ["jsr:@coven/rules"],
* }
* ```
*/
// deno-lint-ignore coven/no-default-export
export default {
Expand Down
2 changes: 1 addition & 1 deletion @coven/template/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/template",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/terminal/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/terminal",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/types/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/types",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @coven/utils/FNV_OFFSET_32.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* Initial 32-bit FNV offset.
*/
export const FNV_OFFSET_32 = 0x811c9dc5;
export const FNV_OFFSET_32 = 0x81_1c_9d_c5;
2 changes: 1 addition & 1 deletion @coven/utils/FNV_PRIME_32.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* 32-bit FNV prime.
*/
export const FNV_PRIME_32 = 0x01000193;
export const FNV_PRIME_32 = 0x01_00_01_93;
2 changes: 1 addition & 1 deletion @coven/utils/UINT32.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* Unsigned 32-bit integer.
*/
export const UINT32 = 2 ** 32;
export const UINT32 = 0x01_00_00_00_00;
2 changes: 1 addition & 1 deletion @coven/utils/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@coven/utils",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @simulcast/core/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json",
"exports": "./mod.ts",
"name": "@simulcast/core",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @simulcast/preact/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"preact": "npm:preact@^10.29.0"
},
"name": "@simulcast/preact",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @simulcast/react/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"react": "npm:react@^19.2.4"
},
"name": "@simulcast/react",
"version": "0.9.0"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion @simulcast/vue/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"vue": "npm:vue@^3.5.31"
},
"name": "@simulcast/vue",
"version": "0.9.0"
"version": "0.9.1"
}