@k03mad/dice 10.1.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.editorconfig CHANGED
@@ -8,8 +8,5 @@ indent_style = space
8
8
  insert_final_newline = true
9
9
  trim_trailing_whitespace = true
10
10
 
11
- [*.json]
12
- indent_size = 2
13
-
14
- [*.{yml,yaml}]
11
+ [*.{json,yml,yaml}]
15
12
  indent_size = 2
@@ -5,10 +5,10 @@ updates:
5
5
  schedule:
6
6
  interval: monthly
7
7
  assignees:
8
- - "k03mad"
8
+ - 'k03mad'
9
9
  - package-ecosystem: github-actions
10
10
  directory: /
11
11
  schedule:
12
12
  interval: monthly
13
13
  assignees:
14
- - "k03mad"
14
+ - 'k03mad'
package/.oxfmtrc.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
+ "ignorePatterns": ["node_modules/**"],
4
+ "singleQuote": true,
5
+ "arrowParens": "avoid",
6
+ "bracketSpacing": false,
7
+ "quoteProps": "consistent",
8
+ "experimentalSortImports": {
9
+ "groups": [
10
+ ["builtin"],
11
+ ["external", "type-external"],
12
+ ["internal", "type-internal"],
13
+ ["parent", "type-parent"],
14
+ ["sibling", "type-sibling"],
15
+ ["index", "type-index"]
16
+ ]
17
+ }
18
+ }
package/.oxlintrc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "extends": ["./node_modules/@k03mad/oxlint-config/.oxlintrc.json"],
4
+ "env": {
5
+ "node": true
6
+ }
7
+ }
@@ -1,6 +1,3 @@
1
1
  {
2
- "cSpell.words": [
3
- "eslintcache",
4
- "nvmrc"
5
- ]
2
+ "cSpell.words": ["eslintcache", "nvmrc", "oxfmt", "oxlint"]
6
3
  }
package/app/run.js CHANGED
@@ -22,8 +22,8 @@ console.log(config.messages.welcome);
22
22
 
23
23
  process.stdin.on('keypress', async (char, key) => {
24
24
  if (
25
- (key.ctrl === true && key.name === config.exit.ctrlKeyModifier)
26
- || char === config.exit.extraKey
25
+ (key.ctrl === true && key.name === config.exit.ctrlKeyModifier) ||
26
+ char === config.exit.extraKey
27
27
  ) {
28
28
  process.exit();
29
29
  } else {
@@ -18,10 +18,12 @@ export default {
18
18
  },
19
19
 
20
20
  messages: {
21
- welcome: green([
22
- '— type any digit to generate that number of dice',
23
- '— press any key to reroll dice',
24
- `— press ${bold('CTRL+C')} or type '${bold(EXIT_EXTRA_KEY)}' to exit`,
25
- ].join('\n')),
21
+ welcome: green(
22
+ [
23
+ '— type any digit to generate that number of dice',
24
+ '— press any key to reroll dice',
25
+ `— press ${bold('CTRL+C')} or type '${bold(EXIT_EXTRA_KEY)}' to exit`,
26
+ ].join('\n'),
27
+ ),
26
28
  },
27
29
  };
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * @param {Array} arr
3
3
  */
4
- export const getRandomArrElem = arr => arr[
5
- Math.floor(Math.random() * arr.length)
6
- ];
4
+ export const getRandomArrElem = arr => arr[Math.floor(Math.random() * arr.length)];
package/package.json CHANGED
@@ -1,33 +1,34 @@
1
1
  {
2
2
  "name": "@k03mad/dice",
3
- "version": "10.1.0",
3
+ "version": "11.0.1",
4
4
  "description": "Dice",
5
+ "license": "MIT",
5
6
  "maintainers": [
6
7
  "Kirill Molchanov <k03.mad@gmail.com"
7
8
  ],
8
- "bin": {
9
- "dice": "app/run.js"
10
- },
11
9
  "repository": {
12
10
  "type": "git",
13
11
  "url": "git+https://github.com/k03mad/dice.git"
14
12
  },
15
- "license": "MIT",
13
+ "bin": {
14
+ "dice": "app/run.js"
15
+ },
16
16
  "type": "module",
17
- "engines": {
18
- "node": ">=24"
17
+ "scripts": {
18
+ "lint": "oxlint --report-unused-disable-directives && oxfmt --check",
19
+ "prepare": "husky || true"
19
20
  },
20
21
  "dependencies": {
21
22
  "chalk": "5.6.2",
22
23
  "terminal-image": "4.2.0"
23
24
  },
24
25
  "devDependencies": {
25
- "@k03mad/eslint-config": "33.1.0",
26
- "eslint": "9.39.2",
27
- "husky": "9.1.7"
26
+ "@k03mad/oxlint-config": "0.1.0",
27
+ "husky": "9.1.7",
28
+ "oxfmt": "0.35.0",
29
+ "oxlint": "1.50.0"
28
30
  },
29
- "scripts": {
30
- "lint": "eslint ./ --cache",
31
- "prepare": "husky || true"
31
+ "engines": {
32
+ "node": ">=24"
32
33
  }
33
34
  }
package/eslint.config.js DELETED
@@ -1 +0,0 @@
1
- export {default} from '@k03mad/eslint-config';