diff --git a/@coven/compare/deno.json b/@coven/compare/deno.json index ce92f88..3b62a6c 100644 --- a/@coven/compare/deno.json +++ b/@coven/compare/deno.json @@ -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" } diff --git a/@coven/constants/deno.json b/@coven/constants/deno.json index f99b207..68b6a97 100644 --- a/@coven/constants/deno.json +++ b/@coven/constants/deno.json @@ -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" } diff --git a/@coven/cron/deno.json b/@coven/cron/deno.json index 899c1bf..1e79f63 100644 --- a/@coven/cron/deno.json +++ b/@coven/cron/deno.json @@ -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" } diff --git a/@coven/expression/deno.json b/@coven/expression/deno.json index 97f1378..34715db 100644 --- a/@coven/expression/deno.json +++ b/@coven/expression/deno.json @@ -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" } diff --git a/@coven/iterables/deno.json b/@coven/iterables/deno.json index 7096466..3783018 100644 --- a/@coven/iterables/deno.json +++ b/@coven/iterables/deno.json @@ -5,5 +5,5 @@ "./async": "./async/mod.ts" }, "name": "@coven/iterables", - "version": "0.9.0" + "version": "0.9.1" } diff --git a/@coven/math/deno.json b/@coven/math/deno.json index c9e08bc..b9a1121 100644 --- a/@coven/math/deno.json +++ b/@coven/math/deno.json @@ -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" } diff --git a/@coven/memo/deno.json b/@coven/memo/deno.json index 0adae38..f01774f 100644 --- a/@coven/memo/deno.json +++ b/@coven/memo/deno.json @@ -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" } diff --git a/@coven/pair/deno.json b/@coven/pair/deno.json index 013d79b..9cd0111 100644 --- a/@coven/pair/deno.json +++ b/@coven/pair/deno.json @@ -13,5 +13,5 @@ "react-dom": "npm:react-dom@^19.2.4" }, "name": "@coven/pair", - "version": "0.9.0" + "version": "0.9.1" } diff --git a/@coven/parsers/deno.json b/@coven/parsers/deno.json index b9ef2dd..4639be4 100644 --- a/@coven/parsers/deno.json +++ b/@coven/parsers/deno.json @@ -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" } diff --git a/@coven/predicates/deno.json b/@coven/predicates/deno.json index c2f25af..2cc0c85 100644 --- a/@coven/predicates/deno.json +++ b/@coven/predicates/deno.json @@ -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" } diff --git a/@coven/rules/README.md b/@coven/rules/README.md index 1c96949..ca24b00 100644 --- a/@coven/rules/README.md +++ b/@coven/rules/README.md @@ -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/). diff --git a/@coven/rules/deno.json b/@coven/rules/deno.json index 06cab9d..bd051ea 100644 --- a/@coven/rules/deno.json +++ b/@coven/rules/deno.json @@ -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" } diff --git a/@coven/rules/mod.ts b/@coven/rules/mod.ts index 1ca9d24..5cce040 100644 --- a/@coven/rules/mod.ts +++ b/@coven/rules/mod.ts @@ -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 { diff --git a/@coven/template/deno.json b/@coven/template/deno.json index cab31aa..865246d 100644 --- a/@coven/template/deno.json +++ b/@coven/template/deno.json @@ -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" } diff --git a/@coven/terminal/deno.json b/@coven/terminal/deno.json index 629a729..324cb53 100644 --- a/@coven/terminal/deno.json +++ b/@coven/terminal/deno.json @@ -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" } diff --git a/@coven/types/deno.json b/@coven/types/deno.json index 7a4a0e2..714875c 100644 --- a/@coven/types/deno.json +++ b/@coven/types/deno.json @@ -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" } diff --git a/@coven/utils/FNV_OFFSET_32.ts b/@coven/utils/FNV_OFFSET_32.ts index e0626b5..2a67903 100644 --- a/@coven/utils/FNV_OFFSET_32.ts +++ b/@coven/utils/FNV_OFFSET_32.ts @@ -1,4 +1,4 @@ /** * Initial 32-bit FNV offset. */ -export const FNV_OFFSET_32 = 0x811c9dc5; +export const FNV_OFFSET_32 = 0x81_1c_9d_c5; diff --git a/@coven/utils/FNV_PRIME_32.ts b/@coven/utils/FNV_PRIME_32.ts index 94fd65c..206c677 100644 --- a/@coven/utils/FNV_PRIME_32.ts +++ b/@coven/utils/FNV_PRIME_32.ts @@ -1,4 +1,4 @@ /** * 32-bit FNV prime. */ -export const FNV_PRIME_32 = 0x01000193; +export const FNV_PRIME_32 = 0x01_00_01_93; diff --git a/@coven/utils/UINT32.ts b/@coven/utils/UINT32.ts index e8cb1a6..5c4956b 100644 --- a/@coven/utils/UINT32.ts +++ b/@coven/utils/UINT32.ts @@ -1,4 +1,4 @@ /** * Unsigned 32-bit integer. */ -export const UINT32 = 2 ** 32; +export const UINT32 = 0x01_00_00_00_00; diff --git a/@coven/utils/deno.json b/@coven/utils/deno.json index 7e9360c..fbc56c4 100644 --- a/@coven/utils/deno.json +++ b/@coven/utils/deno.json @@ -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" } diff --git a/@simulcast/core/deno.json b/@simulcast/core/deno.json index 4cdd7f0..34f0cc2 100644 --- a/@simulcast/core/deno.json +++ b/@simulcast/core/deno.json @@ -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" } diff --git a/@simulcast/preact/deno.json b/@simulcast/preact/deno.json index e3eee4e..1126b40 100644 --- a/@simulcast/preact/deno.json +++ b/@simulcast/preact/deno.json @@ -11,5 +11,5 @@ "preact": "npm:preact@^10.29.0" }, "name": "@simulcast/preact", - "version": "0.9.0" + "version": "0.9.1" } diff --git a/@simulcast/react/deno.json b/@simulcast/react/deno.json index 42c9798..4e5ffd8 100644 --- a/@simulcast/react/deno.json +++ b/@simulcast/react/deno.json @@ -12,5 +12,5 @@ "react": "npm:react@^19.2.4" }, "name": "@simulcast/react", - "version": "0.9.0" + "version": "0.9.1" } diff --git a/@simulcast/vue/deno.json b/@simulcast/vue/deno.json index ae7bc8b..2ea2e27 100644 --- a/@simulcast/vue/deno.json +++ b/@simulcast/vue/deno.json @@ -6,5 +6,5 @@ "vue": "npm:vue@^3.5.31" }, "name": "@simulcast/vue", - "version": "0.9.0" + "version": "0.9.1" }