@sasjs/lint 2.7.0 → 3.0.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.
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ // Generated by scripts/generate-macro-names.mjs from @sasjs/sas-language.
3
+ // Do not edit. Regenerate with `npm run generate:macros`.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.sasMacros = void 0;
6
+ /**
7
+ * The macro names that ship with SAS, lower-cased and without the leading
8
+ * `%`, as published in the macroStatements and macroFunctions groups of
9
+ * `@sasjs/sas-language`.
10
+ */
11
+ exports.sasMacros = [
12
+ 'abort',
13
+ 'armconv',
14
+ 'armend',
15
+ 'armgtid',
16
+ 'arminit',
17
+ 'armjoin',
18
+ 'armproc',
19
+ 'armstop',
20
+ 'armstrt',
21
+ 'armupdt',
22
+ 'bquote',
23
+ 'by',
24
+ 'cmpres',
25
+ 'colormac',
26
+ 'compstor',
27
+ 'copy',
28
+ 'datatyp',
29
+ 'dequote',
30
+ 'display',
31
+ 'do',
32
+ 'dqload',
33
+ 'dqputloc',
34
+ 'dqunload',
35
+ 'else',
36
+ 'end',
37
+ 'eval',
38
+ 'global',
39
+ 'goto',
40
+ 'helpclr',
41
+ 'if',
42
+ 'inc',
43
+ 'include',
44
+ 'index',
45
+ 'indexc',
46
+ 'indexw',
47
+ 'input',
48
+ 'kcmpres',
49
+ 'kindex',
50
+ 'kleft',
51
+ 'klength',
52
+ 'klowcase',
53
+ 'kscan',
54
+ 'ksubstr',
55
+ 'ktrim',
56
+ 'kupcase',
57
+ 'kverify',
58
+ 'left',
59
+ 'length',
60
+ 'let',
61
+ 'list',
62
+ 'local',
63
+ 'lowcase',
64
+ 'macro',
65
+ 'mend',
66
+ 'nrbquote',
67
+ 'nrquote',
68
+ 'nrstr',
69
+ 'perfend',
70
+ 'perfinit',
71
+ 'perfstop',
72
+ 'perfstrt',
73
+ 'put',
74
+ 'qbquote',
75
+ 'qcmpres',
76
+ 'qdequote',
77
+ 'qindex',
78
+ 'qindexc',
79
+ 'qindexw',
80
+ 'qkcmpres',
81
+ 'qkleft',
82
+ 'qklowcas',
83
+ 'qklowcase',
84
+ 'qkscan',
85
+ 'qksubstr',
86
+ 'qktrim',
87
+ 'qkupcase',
88
+ 'qleft',
89
+ 'qlowcase',
90
+ 'qscan',
91
+ 'qsubstr',
92
+ 'qsysfunc',
93
+ 'qtrim',
94
+ 'quote',
95
+ 'qupcase',
96
+ 'return',
97
+ 'run',
98
+ 'scan',
99
+ 'str',
100
+ 'substr',
101
+ 'superq',
102
+ 'symdel',
103
+ 'symexist',
104
+ 'symglobl',
105
+ 'symlocal',
106
+ 'syscall',
107
+ 'sysevalf',
108
+ 'sysexec',
109
+ 'sysfunc',
110
+ 'sysget',
111
+ 'syslput',
112
+ 'sysmacdelete',
113
+ 'sysmacexec',
114
+ 'sysmacexist',
115
+ 'sysmexecdepth',
116
+ 'sysmexecname',
117
+ 'sysmstoreclear',
118
+ 'sysprod',
119
+ 'sysrc',
120
+ 'sysrput',
121
+ 'then',
122
+ 'to',
123
+ 'tplot',
124
+ 'translate',
125
+ 'tranwrd',
126
+ 'trim',
127
+ 'trimn',
128
+ 'unquote',
129
+ 'until',
130
+ 'upcase',
131
+ 'validchs',
132
+ 'verify',
133
+ 'while',
134
+ 'window'
135
+ ];
136
+ //# sourceMappingURL=sasMacros.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sasMacros.generated.js","sourceRoot":"","sources":["../../src/utils/sasMacros.generated.ts"],"names":[],"mappings":";AAAA,0EAA0E;AAC1E,0DAA0D;;;AAE1D;;;;GAIG;AACU,QAAA,SAAS,GAAsB;IAC1C,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,QAAQ;IACR,UAAU;IACV,UAAU;IACV,MAAM;IACN,SA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object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSasMacro = exports.sasMacros = void 0;
4
+ const sasMacros_generated_1 = require("./sasMacros.generated");
5
+ /**
6
+ * The set of macro names that ship with SAS, lower-cased for comparison.
7
+ *
8
+ * The names are generated from the macroStatements and macroFunctions groups of
9
+ * `@sasjs/sas-language`, which owns the SAS language data - see
10
+ * `scripts/generate-macro-names.mjs`. A macro matching one of these names is
11
+ * treated as declared, so it is never reported by `noUndeclaredMacros` and
12
+ * never written to a file header by the formatter.
13
+ */
14
+ exports.sasMacros = new Set(sasMacros_generated_1.sasMacros);
15
+ /**
16
+ * Reports whether a macro name is one of the macros that ship with SAS.
17
+ * @param {string} name - the macro name to test.
18
+ * @returns {boolean} true when the name belongs to a SAS-provided macro.
19
+ */
20
+ const isSasMacro = (name) => exports.sasMacros.has(name.toLowerCase());
21
+ exports.isSasMacro = isSasMacro;
22
+ //# sourceMappingURL=sasMacros.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sasMacros.js","sourceRoot":"","sources":["../../src/utils/sasMacros.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAE1D;;;;;;;;GAQG;AACU,QAAA,SAAS,GAAgB,IAAI,GAAG,CAAC,+BAAK,CAAC,CAAA;AAEpD;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,IAAY,EAAW,EAAE,CAClD,iBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;AADtB,QAAA,UAAU,cACY"}