eslint-plugin-hex-under 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -63,6 +63,17 @@ const binary = 256;
63
63
  const octal = 256;
64
64
  ```
65
65
 
66
+ If you want to disable all rules, you can paste a special block comment at the very first line of the file.
67
+
68
+ ```js
69
+ /* ignore-all-hex-under */
70
+
71
+ // this all will be ignored
72
+ const foo = 0xffff;
73
+
74
+ const bar = 0b10100010101;
75
+ ```
76
+
66
77
  ## Integration
67
78
 
68
79
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-hex-under",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "main": "src/eslint-plugin-hex-under.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ const BINARY_REGEX_BIGINT = /^0[bB][01_]+n$/;
3
3
 
4
4
  export default {
5
5
  meta: {
6
- version: '0.3.0',
6
+ version: '0.3.1',
7
7
  type: 'suggestion',
8
8
  docs: {
9
9
  description: 'Ensures binary numbers do not exceed a limit.',
@@ -47,7 +47,7 @@ export default {
47
47
  const raw = node.raw;
48
48
 
49
49
  const sourceCode = context.sourceCode;
50
- if (sourceCode.lines[0] === '/* ignore-hex-under */') {
50
+ if (sourceCode.lines[0] === '/* ignore-all-hex-under */') {
51
51
  return;
52
52
  }
53
53
  const line = node.loc.end.line;
@@ -4,7 +4,7 @@ const HEX_REGEX_BIGINT = /^0[xX][0-9a-fA-F_]+n$/;
4
4
  export default {
5
5
  meta: {
6
6
  type: 'suggestion',
7
- version: '0.7.0',
7
+ version: '0.7.1',
8
8
  defaultOptions: [
9
9
  {
10
10
  limit: 255,
@@ -48,7 +48,7 @@ export default {
48
48
  const raw = node.raw;
49
49
 
50
50
  const sourceCode = context.sourceCode;
51
- if (sourceCode.lines[0] === '/* ignore-hex-under */') {
51
+ if (sourceCode.lines[0] === '/* ignore-all-hex-under */') {
52
52
  return;
53
53
  }
54
54
  const line = node.loc.end.line;
@@ -3,7 +3,7 @@ const OCTAL_REGEX_BIGINT = /^0[oO]?[0-7_]+n$/;
3
3
 
4
4
  export default {
5
5
  meta: {
6
- version: '0.3.0',
6
+ version: '0.3.1',
7
7
  type: 'suggestion',
8
8
  docs: {
9
9
  description: 'Ensures octal numbers do not exceed a limit.',
@@ -47,7 +47,7 @@ export default {
47
47
  const raw = node.raw;
48
48
 
49
49
  const sourceCode = context.sourceCode;
50
- if (sourceCode.lines[0] === '/* ignore-hex-under */') {
50
+ if (sourceCode.lines[0] === '/* ignore-all-hex-under */') {
51
51
  return;
52
52
  }
53
53
  const line = node.loc.end.line;