@chris.araneo/eslint-config 0.0.132 → 0.0.134
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 +1 -1
- package/dist/src/angular/angular-eslint-template.js +51 -48
- package/dist/src/angular/angular-eslint-template.js.map +1 -1
- package/dist/src/angular/angular-eslint.js +30 -27
- package/dist/src/angular/angular-eslint.js.map +1 -1
- package/dist/src/angular/ng-perfectionist.js +13 -15
- package/dist/src/angular/ng-perfectionist.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="https://avatars.githubusercontent.com/u/6019716" alt="Official @eslint GitHub user avatar" width="256px" height="256px"/>
|
|
5
5
|
<br>
|
|
6
|
-
<a href="https://github.com/ChrisAraneo/eslint-config/blob/master/package.json"><img src="https://img.shields.io/badge/version-v0.0.
|
|
6
|
+
<a href="https://github.com/ChrisAraneo/eslint-config/blob/master/package.json"><img src="https://img.shields.io/badge/version-v0.0.134-blue" alt="version"></a>
|
|
7
7
|
<a href="https://github.com/ChrisAraneo/eslint-config/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="@chris.araneo/eslint-config is released under the MIT license."></a>
|
|
8
8
|
<a href="https://github.com/ChrisAraneo/eslint-config/actions/workflows/ci.yml"><img alt="GitHub CI Status" src="https://img.shields.io/github/actions/workflow/status/ChrisAraneo/eslint-config/ci.yml?label=CI&logo=GitHub"></a>
|
|
9
9
|
<br>
|
|
@@ -3,53 +3,56 @@ import { match } from 'ts-pattern';
|
|
|
3
3
|
export const getAngularTemplatesConfigs = ({ templates, } = {}) => match(templates?.length ?? 0)
|
|
4
4
|
.with(0, () => [])
|
|
5
5
|
.otherwise(() => [
|
|
6
|
-
...angular.configs.templateAll.map((config) =>
|
|
7
|
-
...config
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'error',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
6
|
+
...angular.configs.templateAll.map((config) => {
|
|
7
|
+
const { plugins: _plugins, ...rest } = config;
|
|
8
|
+
return {
|
|
9
|
+
...rest,
|
|
10
|
+
files: templates,
|
|
11
|
+
rules: {
|
|
12
|
+
...config.rules,
|
|
13
|
+
'@angular-eslint/template/alt-text': 'error',
|
|
14
|
+
'@angular-eslint/template/attributes-order': 'error',
|
|
15
|
+
'@angular-eslint/template/banana-in-box': 'error',
|
|
16
|
+
'@angular-eslint/template/button-has-type': 'error',
|
|
17
|
+
'@angular-eslint/template/click-events-have-key-events': 'error',
|
|
18
|
+
'@angular-eslint/template/conditional-complexity': 'error',
|
|
19
|
+
'@angular-eslint/template/cyclomatic-complexity': [
|
|
20
|
+
'error',
|
|
21
|
+
{ maxComplexity: 6 },
|
|
22
|
+
],
|
|
23
|
+
'@angular-eslint/template/elements-content': 'error',
|
|
24
|
+
'@angular-eslint/template/eqeqeq': 'error',
|
|
25
|
+
'@angular-eslint/template/i18n': 'off',
|
|
26
|
+
'@angular-eslint/template/interactive-supports-focus': 'error',
|
|
27
|
+
'@angular-eslint/template/label-has-associated-control': 'error',
|
|
28
|
+
'@angular-eslint/template/mouse-events-have-key-events': 'error',
|
|
29
|
+
'@angular-eslint/template/no-any': 'error',
|
|
30
|
+
'@angular-eslint/template/no-autofocus': 'error',
|
|
31
|
+
'@angular-eslint/template/no-call-expression': 'off',
|
|
32
|
+
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
33
|
+
'@angular-eslint/template/no-duplicate-attributes': 'error',
|
|
34
|
+
'@angular-eslint/template/no-empty-control-flow': 'error',
|
|
35
|
+
'@angular-eslint/template/no-inline-styles': 'error',
|
|
36
|
+
'@angular-eslint/template/no-interpolation-in-attributes': 'error',
|
|
37
|
+
'@angular-eslint/template/no-negated-async': 'error',
|
|
38
|
+
'@angular-eslint/template/no-nested-tags': 'error',
|
|
39
|
+
'@angular-eslint/template/no-positive-tabindex': 'error',
|
|
40
|
+
'@angular-eslint/template/prefer-at-else': 'error',
|
|
41
|
+
'@angular-eslint/template/prefer-at-empty': 'error',
|
|
42
|
+
'@angular-eslint/template/prefer-built-in-pipes': 'error',
|
|
43
|
+
'@angular-eslint/template/prefer-class-binding': 'error',
|
|
44
|
+
'@angular-eslint/template/prefer-contextual-for-variables': 'error',
|
|
45
|
+
'@angular-eslint/template/prefer-control-flow': 'error',
|
|
46
|
+
'@angular-eslint/template/prefer-ngsrc': 'error',
|
|
47
|
+
'@angular-eslint/template/prefer-self-closing-tags': 'error',
|
|
48
|
+
'@angular-eslint/template/prefer-static-string-properties': 'error',
|
|
49
|
+
'@angular-eslint/template/prefer-template-literal': 'error',
|
|
50
|
+
'@angular-eslint/template/role-has-required-aria': 'error',
|
|
51
|
+
'@angular-eslint/template/table-scope': 'error',
|
|
52
|
+
'@angular-eslint/template/use-track-by-function': 'error',
|
|
53
|
+
'@angular-eslint/template/valid-aria': 'error',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}),
|
|
54
57
|
]);
|
|
55
58
|
//# sourceMappingURL=angular-eslint-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-eslint-template.js","sourceRoot":"/","sources":["src/angular/angular-eslint-template.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,SAAS,MACA,EAAE,EAAmB,EAAE,CAChC,KAAK,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,CAAC;KAC1B,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;KACjB,SAAS,CAAC,GAAG,EAAE,CAAC;IACf,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAChC,CAAC,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"angular-eslint-template.js","sourceRoot":"/","sources":["src/angular/angular-eslint-template.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,SAAS,MACA,EAAE,EAAmB,EAAE,CAChC,KAAK,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,CAAC;KAC1B,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;KACjB,SAAS,CAAC,GAAG,EAAE,CAAC;IACf,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAChC,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9C,OAAO;YACL,GAAG,IAAI;YACP,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE;gBACL,GAAG,MAAM,CAAC,KAAK;gBACf,mCAAmC,EAAE,OAAO;gBAC5C,2CAA2C,EAAE,OAAO;gBACpD,wCAAwC,EAAE,OAAO;gBACjD,0CAA0C,EAAE,OAAO;gBACnD,uDAAuD,EAAE,OAAO;gBAChE,iDAAiD,EAAE,OAAO;gBAC1D,gDAAgD,EAAE;oBAChD,OAAO;oBACP,EAAE,aAAa,EAAE,CAAC,EAAE;iBACrB;gBACD,2CAA2C,EAAE,OAAO;gBACpD,iCAAiC,EAAE,OAAO;gBAC1C,+BAA+B,EAAE,KAAK;gBACtC,qDAAqD,EAAE,OAAO;gBAC9D,uDAAuD,EAAE,OAAO;gBAChE,uDAAuD,EAAE,OAAO;gBAChE,iCAAiC,EAAE,OAAO;gBAC1C,uCAAuC,EAAE,OAAO;gBAChD,6CAA6C,EAAE,KAAK;gBACpD,kDAAkD,EAAE,OAAO;gBAC3D,kDAAkD,EAAE,OAAO;gBAC3D,gDAAgD,EAAE,OAAO;gBACzD,2CAA2C,EAAE,OAAO;gBACpD,yDAAyD,EACvD,OAAO;gBACT,2CAA2C,EAAE,OAAO;gBACpD,yCAAyC,EAAE,OAAO;gBAClD,+CAA+C,EAAE,OAAO;gBACxD,yCAAyC,EAAE,OAAO;gBAClD,0CAA0C,EAAE,OAAO;gBACnD,gDAAgD,EAAE,OAAO;gBACzD,+CAA+C,EAAE,OAAO;gBACxD,0DAA0D,EACxD,OAAO;gBACT,8CAA8C,EAAE,OAAO;gBACvD,uCAAuC,EAAE,OAAO;gBAChD,mDAAmD,EAAE,OAAO;gBAC5D,0DAA0D,EACxD,OAAO;gBACT,kDAAkD,EAAE,OAAO;gBAC3D,iDAAiD,EAAE,OAAO;gBAC1D,sCAAsC,EAAE,OAAO;gBAC/C,gDAAgD,EAAE,OAAO;gBACzD,qCAAqC,EAAE,OAAO;aAC/C;SACe,CAAC;IACrB,CAAC,CACF;CACF,CAAC,CAAC"}
|
|
@@ -2,31 +2,34 @@ import angular from 'angular-eslint';
|
|
|
2
2
|
import { match } from 'ts-pattern';
|
|
3
3
|
export const getAngularSourcesConfigs = ({ prefix, sources, } = {}) => match(sources?.length ?? 0)
|
|
4
4
|
.with(0, () => [])
|
|
5
|
-
.otherwise(() => angular.configs.tsAll.map((config) =>
|
|
6
|
-
...config
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
5
|
+
.otherwise(() => angular.configs.tsAll.map((config, index) => {
|
|
6
|
+
const { plugins: _plugins, ...rest } = config;
|
|
7
|
+
return {
|
|
8
|
+
...(index === 0 ? config : rest),
|
|
9
|
+
files: sources,
|
|
10
|
+
rules: {
|
|
11
|
+
...config.rules,
|
|
12
|
+
'@angular-eslint/component-selector': [
|
|
13
|
+
'error',
|
|
14
|
+
{
|
|
15
|
+
prefix: prefix ?? 'app',
|
|
16
|
+
style: 'kebab-case',
|
|
17
|
+
type: 'element',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
'@angular-eslint/directive-selector': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
prefix: prefix ?? 'app',
|
|
24
|
+
style: 'camelCase',
|
|
25
|
+
type: 'attribute',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
'@angular-eslint/no-forward-ref': 'off',
|
|
29
|
+
'@angular-eslint/prefer-on-push-component-change-detection': 'off',
|
|
30
|
+
'@angular-eslint/prefer-output-emitter-ref': 'off',
|
|
31
|
+
'@angular-eslint/prefer-signals': 'off',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}));
|
|
32
35
|
//# sourceMappingURL=angular-eslint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-eslint.js","sourceRoot":"/","sources":["src/angular/angular-eslint.ts"],"names":[],"mappings":"AAAA,OAAO,O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;iBAChB;aACF;YACD,oCAAoC,EAAE;gBACpC,OAAO;gBACP;oBACE,MAAM,EAAE,MAAM,IAAI,KAAK;oBACvB,KAAK,EAAE,WAAW;oBAClB,IAAI,EAAE,WAAW;iBAClB;aACF;YACD,gCAAgC,EAAE,KAAK;YACvC,2DAA2D,EAAE,KAAK;YAClE,2CAA2C,EAAE,KAAK;YAClD,gCAAgC,EAAE,KAAK;SACxC;KACe,CAAC;AACrB,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -3,20 +3,18 @@ import angular from 'angular-eslint';
|
|
|
3
3
|
import { match } from 'ts-pattern';
|
|
4
4
|
export const getNgPerfectionistConfigs = ({ sources, } = {}) => match(sources?.length ?? 0)
|
|
5
5
|
.with(0, () => [])
|
|
6
|
-
.otherwise(() =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
processor: angular.processInlineTemplates,
|
|
13
|
-
rules: {
|
|
14
|
-
'@chris.araneo/ng-perfectionist/sort-component-imports': 'error',
|
|
15
|
-
'@chris.araneo/ng-perfectionist/sort-component-style-urls': 'error',
|
|
16
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-declarations': 'error',
|
|
17
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-exports': 'error',
|
|
18
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-imports': 'error',
|
|
19
|
-
},
|
|
6
|
+
.otherwise(() => angular.configs.tsAll.map(({ plugins: _plugins, ...config }) => ({
|
|
7
|
+
...config,
|
|
8
|
+
files: sources,
|
|
9
|
+
plugins: {
|
|
10
|
+
'@chris.araneo/ng-perfectionist': ngPerfectionist,
|
|
20
11
|
},
|
|
21
|
-
|
|
12
|
+
rules: {
|
|
13
|
+
'@chris.araneo/ng-perfectionist/sort-component-imports': 'error',
|
|
14
|
+
'@chris.araneo/ng-perfectionist/sort-component-style-urls': 'error',
|
|
15
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-declarations': 'error',
|
|
16
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-exports': 'error',
|
|
17
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-imports': 'error',
|
|
18
|
+
},
|
|
19
|
+
})));
|
|
22
20
|
//# sourceMappingURL=ng-perfectionist.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-perfectionist.js","sourceRoot":"/","sources":["src/angular/ng-perfectionist.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,8CAA8C,CAAC;AAC3E,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,OAAO,MACE,EAAE,EAAmB,EAAE,CAChC,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC;KACxB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;KACjB,SAAS,CAAC,GAAG,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"ng-perfectionist.js","sourceRoot":"/","sources":["src/angular/ng-perfectionist.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,8CAA8C,CAAC;AAC3E,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,OAAO,MACE,EAAE,EAAmB,EAAE,CAChC,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC;KACxB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;KACjB,SAAS,CAAC,GAAG,EAAE,CACd,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CACvB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE,CACnC,CAAC;IACC,GAAG,MAAM;IACT,KAAK,EAAE,OAAO;IACd,OAAO,EAAE;QACP,gCAAgC,EAAE,eAAe;KAClD;IACD,KAAK,EAAE;QACL,uDAAuD,EAAE,OAAO;QAChE,0DAA0D,EACxD,OAAO;QACT,4DAA4D,EAC1D,OAAO;QACT,uDAAuD,EAAE,OAAO;QAChE,uDAAuD,EAAE,OAAO;KACjE;CACF,CAAkB,CACtB,CACF,CAAC"}
|