@ddd-ts-kit/eslint-plugin 0.22.0 → 0.23.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/dist/rules/clean-file-size.d.ts +1 -1
- package/dist/rules/clean-file-size.d.ts.map +1 -1
- package/dist/rules/clean-file-size.js +6 -1
- package/dist/rules/clean-file-size.js.map +1 -1
- package/dist/rules/clean-function-size.js +1 -1
- package/dist/rules/clean-function-size.js.map +1 -1
- package/dist/rules/language-declared-vocabulary.d.ts.map +1 -1
- package/dist/rules/language-declared-vocabulary.js +36 -1
- package/dist/rules/language-declared-vocabulary.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/rules/language-declared-vocabulary.fr.md +2 -2
- package/docs/rules/language-declared-vocabulary.md +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cleanFileSize: import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooLong", [], import("../index.js").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
1
|
+
export declare const cleanFileSize: import("@typescript-eslint/utils/ts-eslint").RuleModule<"aggregateTooLong" | "tooLong", [], import("../index.js").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
2
2
|
//# sourceMappingURL=clean-file-size.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-file-size.d.ts","sourceRoot":"","sources":["../../src/rules/clean-file-size.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"clean-file-size.d.ts","sourceRoot":"","sources":["../../src/rules/clean-file-size.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,wLA8BxB,CAAC"}
|
|
@@ -7,6 +7,7 @@ export const cleanFileSize = defineRule({
|
|
|
7
7
|
description: 'A file is at most 350 lines, tests included: past that it holds more than one responsibility.',
|
|
8
8
|
messages: {
|
|
9
9
|
tooLong: 'This file is {{count}} lines long (limit {{limit}}). It holds more than one responsibility: move each one to a file named after it (a class, a function with the types of its signature, a group of tests about one behaviour) until every file reads in one sitting.',
|
|
10
|
+
aggregateTooLong: 'This aggregate is {{count}} lines long (limit {{limit}}). Move a decision out: a domain service of domain/services/ that takes the state and returns the new state and its events, which the aggregate applies in its intention method; a value object for fields that travel together; an entity for a part with its own identity. Never a public method that sets the state from outside, and never a shortened comment, test or written rule.',
|
|
10
11
|
},
|
|
11
12
|
create({ file, sourceCode, report }) {
|
|
12
13
|
if (file.path.endsWith('.d.ts') || file.path.split('/').includes('generated')) {
|
|
@@ -16,7 +17,11 @@ export const cleanFileSize = defineRule({
|
|
|
16
17
|
Program() {
|
|
17
18
|
const count = sourceCode.lines.at(-1) === '' ? sourceCode.lines.length - 1 : sourceCode.lines.length;
|
|
18
19
|
if (count > MAX_LINES) {
|
|
19
|
-
report({
|
|
20
|
+
report({
|
|
21
|
+
loc: { line: MAX_LINES + 1, column: 0 },
|
|
22
|
+
messageId: file.path.endsWith('.aggregate.ts') ? 'aggregateTooLong' : 'tooLong',
|
|
23
|
+
data: { count, limit: MAX_LINES },
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-file-size.js","sourceRoot":"","sources":["../../src/rules/clean-file-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"clean-file-size.js","sourceRoot":"","sources":["../../src/rules/clean-file-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAiC;IACtE,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,+FAA+F;IAC5G,QAAQ,EAAE;QACR,OAAO,EACL,uQAAuQ;QACzQ,gBAAgB,EACd,kbAAkb;KACrb;IACD,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC9E,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO;YACL,OAAO;gBACL,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;gBAErG,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;oBACtB,MAAM,CAAC;wBACL,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;wBACvC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS;wBAC/E,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;qBAClC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const cleanFunctionSize = defineRule({
|
|
|
23
23
|
recommended: 'warn',
|
|
24
24
|
description: 'A function has at most 3 parameters and 30 lines (configurable, never above 100 lines); a longer one is doing more than one thing.',
|
|
25
25
|
messages: {
|
|
26
|
-
parameters: '{{name}} takes {{count}} parameters (limit {{limit}}). Group the parameters that travel together into a typed props object or a value object (`
|
|
26
|
+
parameters: '{{name}} takes {{count}} parameters (limit {{limit}}). Group the parameters that travel together into a typed props object or a value object (`Invoice.draft({ customer, lines, currency, draftedAt })`): they are a concept that has no name yet. Never add one more parameter, nor split the function only to get under the limit.',
|
|
27
27
|
lines: '{{name}} is {{count}} lines long (limit {{limit}}). Extract each step into a function named after what it does, placed below this one, until the body reads as a list of intentions.',
|
|
28
28
|
},
|
|
29
29
|
schema: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-function-size.js","sourceRoot":"","sources":["../../src/rules/clean-function-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAQ/E,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAEjE,iHAAiH;AACjH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAoC;IAC7E,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,MAAM;IACnB,WAAW,EACT,oIAAoI;IACtI,QAAQ,EAAE;QACR,UAAU,EACR,
|
|
1
|
+
{"version":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U,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC7F,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,CACL,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU;QACzC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,iGAAiG;AACjG,SAAS,kBAAkB,CAAC,MAAqB;IAC/C,OAAO,CACL,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU;QAClD,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CACzC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-declared-vocabulary.d.ts","sourceRoot":"","sources":["../../src/rules/language-declared-vocabulary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"language-declared-vocabulary.d.ts","sourceRoot":"","sources":["../../src/rules/language-declared-vocabulary.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,0BAA0B,+JA6CrC,CAAC"}
|
|
@@ -3,6 +3,8 @@ import { defineRule } from '../support/rule/define-rule.js';
|
|
|
3
3
|
import { projectVocabularies } from '../support/vocabularies/project-vocabularies.js';
|
|
4
4
|
/** The relationship schema of the access model declares its relations: like a published language, it names its values itself. */
|
|
5
5
|
const RELATIONSHIP_SCHEMA = /(?<![\w$.])defineSchema\s*\(/;
|
|
6
|
+
/** The properties of an object that name a column, a table or a schema (`{ name: 'note' }`). */
|
|
7
|
+
const NAME_PROPERTIES = new Set(['name', 'tableName', 'schema']);
|
|
6
8
|
export const languageDeclaredVocabulary = defineRule({
|
|
7
9
|
id: 'language/declared-vocabulary',
|
|
8
10
|
type: 'suggestion',
|
|
@@ -18,7 +20,7 @@ export const languageDeclaredVocabulary = defineRule({
|
|
|
18
20
|
const declared = projectVocabularies(file, context.languageOptions.parser);
|
|
19
21
|
const judge = (node, value) => {
|
|
20
22
|
const known = (declared.get(value) ?? []).filter((candidate) => isReadBy(file, candidate));
|
|
21
|
-
if (known.length > 0 && !known.some((at) => at.file === file.path) && !
|
|
23
|
+
if (known.length > 0 && !known.some((at) => at.file === file.path) && !isName(file, node)) {
|
|
22
24
|
const vocabularies = known.map(({ vocabulary, file: at }) => `${vocabulary} (${at})`).join(' and of ');
|
|
23
25
|
report({
|
|
24
26
|
node,
|
|
@@ -58,6 +60,10 @@ function isReadBy(file, { readBy }) {
|
|
|
58
60
|
}
|
|
59
61
|
return location.area === 'context' && location.context === readBy.context;
|
|
60
62
|
}
|
|
63
|
+
/** A literal that names a module or a place of the storage, not a value. */
|
|
64
|
+
function isName(file, node) {
|
|
65
|
+
return isSpecifier(node) || isStorageName(file, node);
|
|
66
|
+
}
|
|
61
67
|
/** The specifier of an import or an export names a module, not a value. */
|
|
62
68
|
function isSpecifier(node) {
|
|
63
69
|
const { parent } = node;
|
|
@@ -67,4 +73,33 @@ function isSpecifier(node) {
|
|
|
67
73
|
parent?.type === AST_NODE_TYPES.ImportExpression ||
|
|
68
74
|
parent?.type === AST_NODE_TYPES.TSExternalModuleReference);
|
|
69
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* In the persistence of a context, the name of a column, a table or a schema is a word of the
|
|
78
|
+
* storage that may spell a value by chance (a column `note` next to a kind `note`): the
|
|
79
|
+
* first argument of a call, or the value of `name`, `tableName` or `schema`. A stored value, the
|
|
80
|
+
* argument of `.default(..)` or a value compared in a query, is still judged.
|
|
81
|
+
*/
|
|
82
|
+
function isStorageName(file, node) {
|
|
83
|
+
const { location } = file;
|
|
84
|
+
const { parent } = node;
|
|
85
|
+
const persistence = location.area === 'context' && location.layer === 'infrastructure' && location.inside[0] === 'persistence';
|
|
86
|
+
if (!persistence || parent === undefined) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
if (parent.type === AST_NODE_TYPES.CallExpression) {
|
|
90
|
+
return parent.arguments[0] === node && calleeName(parent.callee) !== 'default';
|
|
91
|
+
}
|
|
92
|
+
return (parent.type === AST_NODE_TYPES.Property &&
|
|
93
|
+
parent.value === node &&
|
|
94
|
+
parent.key.type === AST_NODE_TYPES.Identifier &&
|
|
95
|
+
NAME_PROPERTIES.has(parent.key.name));
|
|
96
|
+
}
|
|
97
|
+
function calleeName(callee) {
|
|
98
|
+
if (callee.type === AST_NODE_TYPES.Identifier) {
|
|
99
|
+
return callee.name;
|
|
100
|
+
}
|
|
101
|
+
return callee.type === AST_NODE_TYPES.MemberExpression && callee.property.type === AST_NODE_TYPES.Identifier
|
|
102
|
+
? callee.property.name
|
|
103
|
+
: undefined;
|
|
104
|
+
}
|
|
70
105
|
//# sourceMappingURL=language-declared-vocabulary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-declared-vocabulary.js","sourceRoot":"","sources":["../../src/rules/language-declared-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAItF,iIAAiI;AACjI,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"language-declared-vocabulary.js","sourceRoot":"","sources":["../../src/rules/language-declared-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;A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|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.23.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.23.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](language-declared-vocabulary.md) · **Français**
|
|
2
|
-
<!-- translation-of: language-declared-vocabulary.md sha256:
|
|
2
|
+
<!-- translation-of: language-declared-vocabulary.md sha256:9394ca2c186d87ee -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit/language-declared-vocabulary
|
|
5
5
|
|
|
@@ -47,7 +47,7 @@ Un mot signifie une chose dans un contexte, et peut signifier autre chose dans l
|
|
|
47
47
|
|
|
48
48
|
## Détails
|
|
49
49
|
|
|
50
|
-
Une clé entre guillemets est une valeur réécrite et elle est signalée : écrivez-la comme une clé calculée, `[AppointmentStatus.NoShow]: 'No show'`, ce qui type aussi l'objet par le vocabulaire. Une clé identifiant et le spécificateur d'un import ou d'un export sont des noms et ne sont pas jugés. Un test écrit volontairement les valeurs qu'envoie un client, et un langage publié nomme lui-même les valeurs de son contrat : ni l'un ni l'autre n'est jugé. Le message nomme le vocabulaire, le fichier qui le déclare et ce qu'il faut écrire à la place.
|
|
50
|
+
Une clé entre guillemets est une valeur réécrite et elle est signalée : écrivez-la comme une clé calculée, `[AppointmentStatus.NoShow]: 'No show'`, ce qui type aussi l'objet par le vocabulaire. Une clé identifiant et le spécificateur d'un import ou d'un export sont des noms et ne sont pas jugés. Dans la persistance d'un contexte (`infrastructure/persistence/`), le nom d'une colonne, d'une table ou d'un schéma est un mot du stockage et n'est pas jugé : le premier argument d'un appel (`text('note')`, `createTable('invoice')`, `.where('note', ..)`) et la valeur de `name`, `tableName` ou `schema` ; une valeur stockée, l'argument de `.default(..)` ou une valeur comparée dans une requête, l'est. Un test écrit volontairement les valeurs qu'envoie un client, et un langage publié nomme lui-même les valeurs de son contrat : ni l'un ni l'autre n'est jugé. Le message nomme le vocabulaire, le fichier qui le déclare et ce qu'il faut écrire à la place.
|
|
51
51
|
|
|
52
52
|
## Options
|
|
53
53
|
|
|
@@ -46,7 +46,7 @@ A word means one thing in one context, and may mean something else next door; th
|
|
|
46
46
|
|
|
47
47
|
## Details
|
|
48
48
|
|
|
49
|
-
A quoted key is a value spelled again and is reported: write it as a computed key, `[AppointmentStatus.NoShow]: 'No show'`, which also types the object by the vocabulary. An identifier key and the specifier of an import or an export are names and are not judged. A test spells the values a client sends on purpose, and a published language names the values of its contract itself: neither is judged. The message names the vocabulary, the file that declares it and what to write instead.
|
|
49
|
+
A quoted key is a value spelled again and is reported: write it as a computed key, `[AppointmentStatus.NoShow]: 'No show'`, which also types the object by the vocabulary. An identifier key and the specifier of an import or an export are names and are not judged. In the persistence of a context (`infrastructure/persistence/`), the name of a column, a table or a schema is a word of the storage and is not judged: the first argument of a call (`text('note')`, `createTable('invoice')`, `.where('note', ..)`) and the value of `name`, `tableName` or `schema`; a stored value, the argument of `.default(..)` or a value compared in a query, is. A test spells the values a client sends on purpose, and a published language names the values of its contract itself: neither is judged. The message names the vocabulary, the file that declares it and what to write instead.
|
|
50
50
|
|
|
51
51
|
## Options
|
|
52
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "AST-accurate ESLint rules for DDD and Clean Architecture in TypeScript: layer and context isolation, domain purity, clean code ordering.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|