eslint-plugin-hex-under 0.6.0 → 0.7.0

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.
Files changed (2) hide show
  1. package/README.md +21 -21
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -2,23 +2,6 @@
2
2
 
3
3
  Sometimes it's really hard for humans to read hexadecimal numbers and know the exact decimal value.
4
4
 
5
- ## Testing & Code Coverage
6
-
7
- This project uses **Vitest** as its test runner with comprehensive code coverage tracking. All tests are written using Vitest's modern testing framework and ESLint's RuleTester for validating rule behavior.
8
-
9
- ### Running Tests
10
-
11
- ```sh
12
- # Run all tests once
13
- npm run test
14
-
15
- # Run tests in watch mode (for development)
16
- npm run test:watch
17
-
18
- # Run tests with coverage report
19
- npm run coverage
20
- ```
21
-
22
5
  ## hex-under
23
6
 
24
7
  This ESLint plugin proves, if you use hexadecimal numbers in your code, that its value is less than or equal a specified value (default: 255). If you use a hexadecimal number greater than this specified value, it will be transformed to its decimal value.
@@ -63,9 +46,9 @@ npm install --save-dev eslint-plugin-hex-under
63
46
  ```js
64
47
  // eslint.config.js
65
48
 
66
- const eslintPluginHexUnder = require("eslint-plugin-hex-under");
49
+ import eslintPluginHexUnder from "eslint-plugin-hex-under";
67
50
 
68
- module.exports = [
51
+ export default [
69
52
  {
70
53
  files: ["*.js"],
71
54
  plugins: {
@@ -85,9 +68,9 @@ There is a similar rule to prove for BigInteger hexadecimal numbers. You can ena
85
68
  ```js
86
69
  // eslint.config.js
87
70
 
88
- const eslintPluginHexUnder = require("eslint-plugin-hex-under");
71
+ import eslintPluginHexUnder from "eslint-plugin-hex-under";
89
72
 
90
- module.exports = [
73
+ export default = [
91
74
  {
92
75
  files: ["*.js"],
93
76
  plugins: {
@@ -99,3 +82,20 @@ module.exports = [
99
82
  },
100
83
  ];
101
84
  ```
85
+
86
+ ## Testing & Code Coverage
87
+
88
+ This project uses **Vitest** as its test runner with comprehensive code coverage tracking. All tests are written using Vitest's modern testing framework and ESLint's RuleTester for validating rule behavior.
89
+
90
+ ### Running Tests
91
+
92
+ ```sh
93
+ # Run all tests once
94
+ npm run test
95
+
96
+ # Run tests in watch mode (for development)
97
+ npm run test:watch
98
+
99
+ # Run tests with coverage report
100
+ npm run coverage
101
+ ```
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "eslint-plugin-hex-under",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "src/eslint-plugin-hex-under.js",
6
6
  "scripts": {
7
7
  "lint": "prettier . --check && eslint .",
8
8
  "test": "vitest run",
9
+ "test:bats": "bats bats/*.bats",
9
10
  "test:watch": "vitest",
10
11
  "coverage": "vitest run --coverage"
11
12
  },
@@ -19,6 +20,7 @@
19
20
  "description": "This ESLint rule proves that hex numbers are less than a specified value.",
20
21
  "devDependencies": {
21
22
  "@vitest/coverage-v8": "4.1.0",
23
+ "bats": "1.13.0",
22
24
  "eslint": "10.0.3",
23
25
  "prettier": "3.8.1",
24
26
  "tinyexec": "1.0.4",