angular-eslint 0.0.1-alpha.0 → 18.0.0-alpha.4
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/LICENSE +21 -0
- package/README.md +0 -2
- package/dist/configs/template-accessibility.d.ts +4 -0
- package/dist/configs/template-accessibility.d.ts.map +1 -0
- package/dist/configs/template-accessibility.js +25 -0
- package/dist/configs/template-all.d.ts +4 -0
- package/dist/configs/template-all.d.ts.map +1 -0
- package/dist/configs/template-all.js +43 -0
- package/dist/configs/template-base.d.ts +4 -0
- package/dist/configs/template-base.d.ts.map +1 -0
- package/dist/configs/template-base.js +11 -0
- package/dist/configs/template-recommended.d.ts +4 -0
- package/dist/configs/template-recommended.d.ts.map +1 -0
- package/dist/configs/template-recommended.js +17 -0
- package/dist/configs/ts-all.d.ts +4 -0
- package/dist/configs/ts-all.d.ts.map +1 -0
- package/dist/configs/ts-all.js +53 -0
- package/dist/configs/ts-base.d.ts +4 -0
- package/dist/configs/ts-base.d.ts.map +1 -0
- package/dist/configs/ts-base.js +12 -0
- package/dist/configs/ts-recommended.d.ts +4 -0
- package/dist/configs/ts-recommended.d.ts.map +1 -0
- package/dist/configs/ts-recommended.js +26 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/package.json +22 -12
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 James Henry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-accessibility.d.ts","sourceRoot":"","sources":["../../src/configs/template-accessibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;iCAK3D,WAAW,MAAM,UACjB,WAAW,MAAM;AAF3B,wBAqBE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const template_base_1 = __importDefault(require("./template-base"));
|
|
7
|
+
exports.default = (plugin, parser) => [
|
|
8
|
+
(0, template_base_1.default)(plugin, parser),
|
|
9
|
+
{
|
|
10
|
+
name: 'angular-eslint/template-accessibility',
|
|
11
|
+
rules: {
|
|
12
|
+
'@angular-eslint/template/alt-text': 'error',
|
|
13
|
+
'@angular-eslint/template/click-events-have-key-events': 'error',
|
|
14
|
+
'@angular-eslint/template/elements-content': 'error',
|
|
15
|
+
'@angular-eslint/template/interactive-supports-focus': 'error',
|
|
16
|
+
'@angular-eslint/template/label-has-associated-control': 'error',
|
|
17
|
+
'@angular-eslint/template/mouse-events-have-key-events': 'error',
|
|
18
|
+
'@angular-eslint/template/no-autofocus': 'error',
|
|
19
|
+
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
20
|
+
'@angular-eslint/template/role-has-required-aria': 'error',
|
|
21
|
+
'@angular-eslint/template/table-scope': 'error',
|
|
22
|
+
'@angular-eslint/template/valid-aria': 'error',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-all.d.ts","sourceRoot":"","sources":["../../src/configs/template-all.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;iCAK3D,WAAW,MAAM,UACjB,WAAW,MAAM;AAF3B,wBAuCE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const template_base_1 = __importDefault(require("./template-base"));
|
|
7
|
+
exports.default = (plugin, parser) => [
|
|
8
|
+
(0, template_base_1.default)(plugin, parser),
|
|
9
|
+
{
|
|
10
|
+
name: 'angular-eslint/template-all',
|
|
11
|
+
rules: {
|
|
12
|
+
'@angular-eslint/template/alt-text': 'error',
|
|
13
|
+
'@angular-eslint/template/attributes-order': 'error',
|
|
14
|
+
'@angular-eslint/template/banana-in-box': 'error',
|
|
15
|
+
'@angular-eslint/template/button-has-type': 'error',
|
|
16
|
+
'@angular-eslint/template/click-events-have-key-events': 'error',
|
|
17
|
+
'@angular-eslint/template/conditional-complexity': 'error',
|
|
18
|
+
'@angular-eslint/template/cyclomatic-complexity': 'error',
|
|
19
|
+
'@angular-eslint/template/elements-content': 'error',
|
|
20
|
+
'@angular-eslint/template/eqeqeq': 'error',
|
|
21
|
+
'@angular-eslint/template/i18n': 'error',
|
|
22
|
+
'@angular-eslint/template/interactive-supports-focus': 'error',
|
|
23
|
+
'@angular-eslint/template/label-has-associated-control': 'error',
|
|
24
|
+
'@angular-eslint/template/mouse-events-have-key-events': 'error',
|
|
25
|
+
'@angular-eslint/template/no-any': 'error',
|
|
26
|
+
'@angular-eslint/template/no-autofocus': 'error',
|
|
27
|
+
'@angular-eslint/template/no-call-expression': 'error',
|
|
28
|
+
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
29
|
+
'@angular-eslint/template/no-duplicate-attributes': 'error',
|
|
30
|
+
'@angular-eslint/template/no-inline-styles': 'error',
|
|
31
|
+
'@angular-eslint/template/no-interpolation-in-attributes': 'error',
|
|
32
|
+
'@angular-eslint/template/no-negated-async': 'error',
|
|
33
|
+
'@angular-eslint/template/no-positive-tabindex': 'error',
|
|
34
|
+
'@angular-eslint/template/prefer-control-flow': 'error',
|
|
35
|
+
'@angular-eslint/template/prefer-ngsrc': 'error',
|
|
36
|
+
'@angular-eslint/template/prefer-self-closing-tags': 'error',
|
|
37
|
+
'@angular-eslint/template/role-has-required-aria': 'error',
|
|
38
|
+
'@angular-eslint/template/table-scope': 'error',
|
|
39
|
+
'@angular-eslint/template/use-track-by-function': 'error',
|
|
40
|
+
'@angular-eslint/template/valid-aria': 'error',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-base.d.ts","sourceRoot":"","sources":["../../src/configs/template-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;iCAG/C,SAAS,UAAU,CAAC,MAAM,UAC1B,SAAS,UAAU,CAAC,MAAM,KACjC,SAAS,UAAU,CAAC,MAAM;AAH7B,wBAWG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = (plugin, parser) => ({
|
|
4
|
+
name: 'angular-eslint/template-base',
|
|
5
|
+
languageOptions: {
|
|
6
|
+
parser,
|
|
7
|
+
},
|
|
8
|
+
plugins: {
|
|
9
|
+
'@angular-eslint/template': plugin,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-recommended.d.ts","sourceRoot":"","sources":["../../src/configs/template-recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;iCAK3D,WAAW,MAAM,UACjB,WAAW,MAAM;AAF3B,wBAaE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const template_base_1 = __importDefault(require("./template-base"));
|
|
7
|
+
exports.default = (plugin, parser) => [
|
|
8
|
+
(0, template_base_1.default)(plugin, parser),
|
|
9
|
+
{
|
|
10
|
+
name: 'angular-eslint/template-recommended',
|
|
11
|
+
rules: {
|
|
12
|
+
'@angular-eslint/template/banana-in-box': 'error',
|
|
13
|
+
'@angular-eslint/template/eqeqeq': 'error',
|
|
14
|
+
'@angular-eslint/template/no-negated-async': 'error',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-all.d.ts","sourceRoot":"","sources":["../../src/configs/ts-all.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;iCAK3D,WAAW,MAAM,UACjB,WAAW,MAAM;AAF3B,wBAiDE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ts_base_1 = __importDefault(require("./ts-base"));
|
|
7
|
+
exports.default = (plugin, parser) => [
|
|
8
|
+
(0, ts_base_1.default)(plugin, parser),
|
|
9
|
+
{
|
|
10
|
+
name: 'angular-eslint/ts-all',
|
|
11
|
+
rules: {
|
|
12
|
+
'@angular-eslint/component-class-suffix': 'error',
|
|
13
|
+
'@angular-eslint/component-max-inline-declarations': 'error',
|
|
14
|
+
'@angular-eslint/component-selector': 'error',
|
|
15
|
+
'@angular-eslint/consistent-component-styles': 'error',
|
|
16
|
+
'@angular-eslint/contextual-decorator': 'error',
|
|
17
|
+
'@angular-eslint/contextual-lifecycle': 'error',
|
|
18
|
+
'@angular-eslint/directive-class-suffix': 'error',
|
|
19
|
+
'@angular-eslint/directive-selector': 'error',
|
|
20
|
+
'@angular-eslint/no-async-lifecycle-method': 'error',
|
|
21
|
+
'@angular-eslint/no-attribute-decorator': 'error',
|
|
22
|
+
'@angular-eslint/no-conflicting-lifecycle': 'error',
|
|
23
|
+
'@angular-eslint/no-duplicates-in-metadata-arrays': 'error',
|
|
24
|
+
'@angular-eslint/no-empty-lifecycle-method': 'error',
|
|
25
|
+
'@angular-eslint/no-forward-ref': 'error',
|
|
26
|
+
'@angular-eslint/no-host-metadata-property': 'error',
|
|
27
|
+
'@angular-eslint/no-input-prefix': 'error',
|
|
28
|
+
'@angular-eslint/no-input-rename': 'error',
|
|
29
|
+
'@angular-eslint/no-inputs-metadata-property': 'error',
|
|
30
|
+
'@angular-eslint/no-lifecycle-call': 'error',
|
|
31
|
+
'@angular-eslint/no-output-native': 'error',
|
|
32
|
+
'@angular-eslint/no-output-on-prefix': 'error',
|
|
33
|
+
'@angular-eslint/no-output-rename': 'error',
|
|
34
|
+
'@angular-eslint/no-outputs-metadata-property': 'error',
|
|
35
|
+
'@angular-eslint/no-pipe-impure': 'error',
|
|
36
|
+
'@angular-eslint/no-queries-metadata-property': 'error',
|
|
37
|
+
'@angular-eslint/pipe-prefix': 'error',
|
|
38
|
+
'@angular-eslint/prefer-on-push-component-change-detection': 'error',
|
|
39
|
+
'@angular-eslint/prefer-output-readonly': 'error',
|
|
40
|
+
'@angular-eslint/prefer-standalone': 'error',
|
|
41
|
+
'@angular-eslint/prefer-standalone-component': 'error',
|
|
42
|
+
'@angular-eslint/relative-url-prefix': 'error',
|
|
43
|
+
'@angular-eslint/require-localize-metadata': 'error',
|
|
44
|
+
'@angular-eslint/sort-lifecycle-methods': 'error',
|
|
45
|
+
'@angular-eslint/sort-ngmodule-metadata-arrays': 'error',
|
|
46
|
+
'@angular-eslint/use-component-selector': 'error',
|
|
47
|
+
'@angular-eslint/use-component-view-encapsulation': 'error',
|
|
48
|
+
'@angular-eslint/use-injectable-provided-in': 'error',
|
|
49
|
+
'@angular-eslint/use-lifecycle-interface': 'error',
|
|
50
|
+
'@angular-eslint/use-pipe-transform-interface': 'error',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-base.d.ts","sourceRoot":"","sources":["../../src/configs/ts-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;iCAG/C,SAAS,UAAU,CAAC,MAAM,UAC1B,SAAS,UAAU,CAAC,MAAM,KACjC,SAAS,UAAU,CAAC,MAAM;AAH7B,wBAYG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = (plugin, parser) => ({
|
|
4
|
+
name: 'angular-eslint/ts-base',
|
|
5
|
+
languageOptions: {
|
|
6
|
+
parser,
|
|
7
|
+
sourceType: 'module',
|
|
8
|
+
},
|
|
9
|
+
plugins: {
|
|
10
|
+
'@angular-eslint': plugin,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-recommended.d.ts","sourceRoot":"","sources":["../../src/configs/ts-recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;iCAK3D,WAAW,MAAM,UACjB,WAAW,MAAM;AAF3B,wBAsBE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ts_base_1 = __importDefault(require("./ts-base"));
|
|
7
|
+
exports.default = (plugin, parser) => [
|
|
8
|
+
(0, ts_base_1.default)(plugin, parser),
|
|
9
|
+
{
|
|
10
|
+
name: 'angular-eslint/ts-recommended',
|
|
11
|
+
rules: {
|
|
12
|
+
'@angular-eslint/component-class-suffix': 'error',
|
|
13
|
+
'@angular-eslint/contextual-lifecycle': 'error',
|
|
14
|
+
'@angular-eslint/directive-class-suffix': 'error',
|
|
15
|
+
'@angular-eslint/no-empty-lifecycle-method': 'error',
|
|
16
|
+
'@angular-eslint/no-input-rename': 'error',
|
|
17
|
+
'@angular-eslint/no-inputs-metadata-property': 'error',
|
|
18
|
+
'@angular-eslint/no-output-native': 'error',
|
|
19
|
+
'@angular-eslint/no-output-on-prefix': 'error',
|
|
20
|
+
'@angular-eslint/no-output-rename': 'error',
|
|
21
|
+
'@angular-eslint/no-outputs-metadata-property': 'error',
|
|
22
|
+
'@angular-eslint/use-pipe-transform-interface': 'error',
|
|
23
|
+
'@angular-eslint/use-lifecycle-interface': 'warn',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
];
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
declare const templateParser: TSESLint.FlatConfig.Parser;
|
|
3
|
+
declare const tsPlugin: TSESLint.FlatConfig.Plugin;
|
|
4
|
+
declare const templatePlugin: TSESLint.FlatConfig.Plugin;
|
|
5
|
+
declare const configs: {
|
|
6
|
+
tsAll: TSESLint.FlatConfig.ConfigArray;
|
|
7
|
+
tsRecommended: TSESLint.FlatConfig.ConfigArray;
|
|
8
|
+
templateAll: TSESLint.FlatConfig.ConfigArray;
|
|
9
|
+
templateRecommended: TSESLint.FlatConfig.ConfigArray;
|
|
10
|
+
templateAccessibility: TSESLint.FlatConfig.ConfigArray;
|
|
11
|
+
};
|
|
12
|
+
declare const processInlineTemplates: TSESLint.Processor.LooseProcessorModule | undefined;
|
|
13
|
+
declare const _default: {
|
|
14
|
+
configs: {
|
|
15
|
+
tsAll: TSESLint.FlatConfig.ConfigArray;
|
|
16
|
+
tsRecommended: TSESLint.FlatConfig.ConfigArray;
|
|
17
|
+
templateAll: TSESLint.FlatConfig.ConfigArray;
|
|
18
|
+
templateRecommended: TSESLint.FlatConfig.ConfigArray;
|
|
19
|
+
templateAccessibility: TSESLint.FlatConfig.ConfigArray;
|
|
20
|
+
};
|
|
21
|
+
tsPlugin: TSESLint.FlatConfig.Plugin;
|
|
22
|
+
templateParser: {
|
|
23
|
+
meta?: {
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
version?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
parseForESLint(text: string, options?: unknown): {
|
|
28
|
+
ast: unknown;
|
|
29
|
+
services?: unknown;
|
|
30
|
+
scopeManager?: unknown;
|
|
31
|
+
visitorKeys?: unknown;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
templatePlugin: TSESLint.FlatConfig.Plugin;
|
|
35
|
+
processInlineTemplates: TSESLint.Processor.LooseProcessorModule | undefined;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
export { configs, templateParser, templatePlugin, tsPlugin, processInlineTemplates, };
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASzD,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,UAAU,CAAC,MAGzC,CAAC;AAyBF,QAAA,MAAM,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,MAGnC,CAAC;AACF,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,UAAU,CAAC,MAGzC,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;;CAYZ,CAAC;AAGF,QAAA,MAAM,sBAAsB,qDACwB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAOrD,wBAME;AACF,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,QAAQ,EACR,sBAAsB,GACvB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.processInlineTemplates = exports.tsPlugin = exports.templatePlugin = exports.templateParser = exports.configs = void 0;
|
|
30
|
+
const eslint_plugin_1 = __importDefault(require("@angular-eslint/eslint-plugin"));
|
|
31
|
+
const eslint_plugin_template_1 = __importDefault(require("@angular-eslint/eslint-plugin-template"));
|
|
32
|
+
const templateParserBase = __importStar(require("@angular-eslint/template-parser"));
|
|
33
|
+
const typescript_eslint_1 = require("typescript-eslint");
|
|
34
|
+
const template_accessibility_1 = __importDefault(require("./configs/template-accessibility"));
|
|
35
|
+
const template_all_1 = __importDefault(require("./configs/template-all"));
|
|
36
|
+
const template_recommended_1 = __importDefault(require("./configs/template-recommended"));
|
|
37
|
+
const ts_all_1 = __importDefault(require("./configs/ts-all"));
|
|
38
|
+
const ts_recommended_1 = __importDefault(require("./configs/ts-recommended"));
|
|
39
|
+
const templateParser = {
|
|
40
|
+
meta: templateParserBase.meta,
|
|
41
|
+
parseForESLint: templateParserBase.parseForESLint,
|
|
42
|
+
};
|
|
43
|
+
exports.templateParser = templateParser;
|
|
44
|
+
/*
|
|
45
|
+
we could build a plugin object here without the `configs` key - but if we do
|
|
46
|
+
that then we create a situation in which
|
|
47
|
+
```
|
|
48
|
+
require('angular-eslint').tsPlugin !== require('@angular-eslint/eslint-plugin')
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This is bad because it means that 3rd party configs would be required to use
|
|
52
|
+
`angular-eslint` or else they would break a user's config if the user either
|
|
53
|
+
used `angular.configs.recommended` et al or
|
|
54
|
+
```
|
|
55
|
+
{
|
|
56
|
+
plugins: {
|
|
57
|
+
'@angular-eslint': angular.tsPlugin,
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This might be something we could consider okay (eg 3rd party flat configs must
|
|
63
|
+
use our new package); however legacy configs consumed via `@eslint/eslintrc`
|
|
64
|
+
would never be able to satisfy this constraint and thus users would be blocked
|
|
65
|
+
from using them.
|
|
66
|
+
*/
|
|
67
|
+
const tsPlugin = eslint_plugin_1.default;
|
|
68
|
+
exports.tsPlugin = tsPlugin;
|
|
69
|
+
const templatePlugin = eslint_plugin_template_1.default;
|
|
70
|
+
exports.templatePlugin = templatePlugin;
|
|
71
|
+
const configs = {
|
|
72
|
+
tsAll: (0, ts_all_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
73
|
+
tsRecommended: (0, ts_recommended_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
74
|
+
templateAll: (0, template_all_1.default)(templatePlugin, templateParser),
|
|
75
|
+
templateRecommended: (0, template_recommended_1.default)(templatePlugin, templateParser),
|
|
76
|
+
templateAccessibility: (0, template_accessibility_1.default)(templatePlugin, templateParser),
|
|
77
|
+
};
|
|
78
|
+
exports.configs = configs;
|
|
79
|
+
// Export more succinct alias for us in user flat config files
|
|
80
|
+
const processInlineTemplates = templatePlugin.processors?.['extract-inline-html'];
|
|
81
|
+
exports.processInlineTemplates = processInlineTemplates;
|
|
82
|
+
/*
|
|
83
|
+
// eslint-disable-next-line import/no-default-export --
|
|
84
|
+
we do both a default and named exports to allow people to use this package from
|
|
85
|
+
both CJS and ESM in very natural ways.
|
|
86
|
+
*/
|
|
87
|
+
exports.default = {
|
|
88
|
+
configs,
|
|
89
|
+
tsPlugin,
|
|
90
|
+
templateParser,
|
|
91
|
+
templatePlugin,
|
|
92
|
+
processInlineTemplates,
|
|
93
|
+
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-eslint",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
3
|
+
"version": "18.0.0-alpha.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
9
7
|
"repository": {
|
|
10
8
|
"type": "git",
|
|
11
|
-
"url": "
|
|
9
|
+
"url": "https://github.com/angular-eslint/angular-eslint.git",
|
|
10
|
+
"directory": "packages/angular-eslint"
|
|
12
11
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"!**/*.tsbuildinfo",
|
|
15
|
+
"package.json",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"eslint": "^8.57.0 || ^9.0.0",
|
|
21
|
+
"typescript": "*"
|
|
17
22
|
},
|
|
18
|
-
"
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@angular-eslint/eslint-plugin": "18.0.0-alpha.4",
|
|
25
|
+
"@angular-eslint/eslint-plugin-template": "18.0.0-alpha.4",
|
|
26
|
+
"@angular-eslint/template-parser": "18.0.0-alpha.4",
|
|
27
|
+
"typescript-eslint": "8.0.0-alpha.16"
|
|
28
|
+
}
|
|
19
29
|
}
|