@checkdigit/eslint-plugin 7.13.0-PR.57-58ae → 7.13.0-PR.57-8dbb
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/dist-mjs/no-util.mjs +4 -4
- package/dist-types/no-util.d.ts +2 -2
- package/package.json +1 -1
- package/src/no-util.ts +4 -4
package/dist-mjs/no-util.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/no-util.ts
|
|
2
2
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
3
3
|
var ruleId = "no-util";
|
|
4
|
-
var
|
|
4
|
+
var NO_UTIL = "NO_UTIL";
|
|
5
5
|
var DISABLE_NEXT_LINE = "eslint-disable-next-line";
|
|
6
6
|
var createRule = ESLintUtils.RuleCreator((name) => name);
|
|
7
7
|
var rule = createRule({
|
|
@@ -13,7 +13,7 @@ var rule = createRule({
|
|
|
13
13
|
},
|
|
14
14
|
schema: [],
|
|
15
15
|
messages: {
|
|
16
|
-
[
|
|
16
|
+
[NO_UTIL]: "File name '{{filename}}' contains banned 'util' pattern."
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
defaultOptions: [],
|
|
@@ -32,7 +32,7 @@ var rule = createRule({
|
|
|
32
32
|
const utilRegex = /(?:^|[-_/])util(?=[-_./]|$)/iu;
|
|
33
33
|
if (utilRegex.test(filename)) {
|
|
34
34
|
context.report({
|
|
35
|
-
messageId:
|
|
35
|
+
messageId: NO_UTIL,
|
|
36
36
|
data: { filename },
|
|
37
37
|
loc: {
|
|
38
38
|
start: { line: 0, column: 0 },
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
no_util_default as default,
|
|
50
50
|
ruleId
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL25vLXV0aWwudHMiX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1QjtBQUFBLFVBQ0YsQ0FBQztBQUFBLFFBQ0g7QUFBQSxNQUNGO0FBQUEsSUFDRjtBQUFBLEVBQ0Y7QUFDRixDQUFDO0FBRUQsSUFBTyxrQkFBUTsiLAogICJuYW1lcyI6IFtdCn0K
|
package/dist-types/no-util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
export declare const ruleId = "no-util";
|
|
3
|
-
declare const
|
|
4
|
-
declare const rule: ESLintUtils.RuleModule<typeof
|
|
3
|
+
declare const NO_UTIL = "NO_UTIL";
|
|
4
|
+
declare const rule: ESLintUtils.RuleModule<typeof NO_UTIL>;
|
|
5
5
|
export default rule;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@checkdigit/eslint-plugin","version":"7.13.0-PR.57-
|
|
1
|
+
{"name":"@checkdigit/eslint-plugin","version":"7.13.0-PR.57-8dbb","description":"Check Digit eslint plugins","keywords":["eslint","eslintplugin"],"homepage":"https://github.com/checkdigit/eslint-plugin#readme","bugs":{"url":"https://github.com/checkdigit/eslint-plugin/issues"},"repository":{"type":"git","url":"https://github.com/checkdigit/eslint-plugin"},"license":"MIT","author":"Check Digit, LLC","sideEffects":false,"type":"module","exports":{".":{"types":"./dist-types/index.d.ts","import":"./dist-mjs/index.mjs","default":"./dist-mjs/index.mjs"}},"files":["src","dist-types","dist-mjs","!src/**/test/**","!src/**/*.test.ts","!src/**/*.spec.ts","!dist-types/**/test/**","!dist-types/**/*.test.d.ts","!dist-types/**/*.spec.d.ts","!dist-mjs/**/test/**","!dist-mjs/**/*.test.mjs","!dist-mjs/**/*.spec.mjs","SECURITY.md"],"scripts":{"build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","build:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","ci:compile":"tsc --noEmit","ci:coverage":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=true","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false","lint":"eslint --max-warnings 0 .","lint:fix":"eslint --max-warnings 0 --fix .","prepare":"","prepublishOnly":"npm run build:dist-types && npm run build:dist-mjs","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style"},"prettier":"@checkdigit/prettier-config","jest":{"preset":"@checkdigit/jest-config"},"dependencies":{"@typescript-eslint/type-utils":"^8.23.0","@typescript-eslint/utils":"^8.23.0","http-status-codes":"^2.3.0","ts-api-utils":"^2.0.1"},"devDependencies":{"@checkdigit/jest-config":"^6.0.2","@checkdigit/prettier-config":"^6.1.0","@checkdigit/typescript-config":"^9.0.0","@eslint/js":"^9.19.0","@types/eslint":"^9.6.1","@types/eslint-config-prettier":"^6.11.3","@typescript-eslint/parser":"^8.23.0","@typescript-eslint/rule-tester":"^8.23.0","eslint":"^9.19.0","eslint-config-prettier":"^10.0.1","eslint-import-resolver-typescript":"^3.7.0","eslint-plugin-eslint-plugin":"^6.4.0","eslint-plugin-import":"^2.31.0","eslint-plugin-no-only-tests":"^3.3.0","eslint-plugin-no-secrets":"^2.2.1","eslint-plugin-node":"^11.1.0","eslint-plugin-sonarjs":"1.0.4","rimraf":"^6.0.1","typescript-eslint":"^8.23.0"},"peerDependencies":{"eslint":">=9 <10"},"engines":{"node":">=22.11"}}
|
package/src/no-util.ts
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
10
10
|
|
|
11
11
|
export const ruleId = 'no-util';
|
|
12
|
-
const
|
|
12
|
+
const NO_UTIL = 'NO_UTIL';
|
|
13
13
|
const DISABLE_NEXT_LINE = 'eslint-disable-next-line';
|
|
14
14
|
|
|
15
15
|
const createRule = ESLintUtils.RuleCreator((name) => name);
|
|
16
16
|
|
|
17
|
-
const rule: ESLintUtils.RuleModule<typeof
|
|
17
|
+
const rule: ESLintUtils.RuleModule<typeof NO_UTIL> = createRule({
|
|
18
18
|
name: ruleId,
|
|
19
19
|
meta: {
|
|
20
20
|
type: 'problem',
|
|
@@ -23,7 +23,7 @@ const rule: ESLintUtils.RuleModule<typeof NO_UTIL_FILENAME> = createRule({
|
|
|
23
23
|
},
|
|
24
24
|
schema: [],
|
|
25
25
|
messages: {
|
|
26
|
-
[
|
|
26
|
+
[NO_UTIL]: "File name '{{filename}}' contains banned 'util' pattern.",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
defaultOptions: [],
|
|
@@ -42,7 +42,7 @@ const rule: ESLintUtils.RuleModule<typeof NO_UTIL_FILENAME> = createRule({
|
|
|
42
42
|
const utilRegex = /(?:^|[-_/])util(?=[-_./]|$)/iu;
|
|
43
43
|
if (utilRegex.test(filename)) {
|
|
44
44
|
context.report({
|
|
45
|
-
messageId:
|
|
45
|
+
messageId: NO_UTIL,
|
|
46
46
|
data: { filename },
|
|
47
47
|
loc: {
|
|
48
48
|
start: { line: 0, column: 0 },
|