@chris.araneo/eslint-config 0.0.135 → 0.0.137
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.js +38 -35
- package/dist/src/angular/angular-eslint.js.map +1 -1
- package/dist/src/builder/append-cross-config-files-to-ignores.js +3 -3
- package/dist/src/builder/append-cross-config-files-to-ignores.js.map +1 -1
- package/dist/src/builder/get-config-value.js +1 -4
- package/dist/src/builder/get-config-value.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.137-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,40 +3,43 @@ import angular from 'angular-eslint';
|
|
|
3
3
|
import { match } from 'ts-pattern';
|
|
4
4
|
export const getAngularSourcesConfigs = ({ prefix, sources, } = {}) => match(sources?.length ?? 0)
|
|
5
5
|
.with(0, () => [])
|
|
6
|
-
.otherwise(() =>
|
|
7
|
-
...config
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
.otherwise(() => [
|
|
7
|
+
...angular.configs.tsAll.map((config) => ({
|
|
8
|
+
...config,
|
|
9
|
+
files: sources,
|
|
10
|
+
})),
|
|
11
|
+
{
|
|
12
|
+
files: sources,
|
|
13
|
+
plugins: {
|
|
14
|
+
'@chris.araneo/ng-perfectionist': ngPerfectionist,
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'@angular-eslint/component-selector': [
|
|
18
|
+
'error',
|
|
19
|
+
{
|
|
20
|
+
prefix: prefix ?? 'app',
|
|
21
|
+
style: 'kebab-case',
|
|
22
|
+
type: 'element',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'@angular-eslint/directive-selector': [
|
|
26
|
+
'error',
|
|
27
|
+
{
|
|
28
|
+
prefix: prefix ?? 'app',
|
|
29
|
+
style: 'camelCase',
|
|
30
|
+
type: 'attribute',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'@angular-eslint/no-forward-ref': 'off',
|
|
34
|
+
'@angular-eslint/prefer-on-push-component-change-detection': 'off',
|
|
35
|
+
'@angular-eslint/prefer-output-emitter-ref': 'off',
|
|
36
|
+
'@angular-eslint/prefer-signals': 'off',
|
|
37
|
+
'@chris.araneo/ng-perfectionist/sort-component-imports': 'error',
|
|
38
|
+
'@chris.araneo/ng-perfectionist/sort-component-style-urls': 'error',
|
|
39
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-declarations': 'error',
|
|
40
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-exports': 'error',
|
|
41
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-imports': 'error',
|
|
42
|
+
},
|
|
12
43
|
},
|
|
13
|
-
|
|
14
|
-
...config.rules,
|
|
15
|
-
'@angular-eslint/component-selector': [
|
|
16
|
-
'error',
|
|
17
|
-
{
|
|
18
|
-
prefix: prefix ?? 'app',
|
|
19
|
-
style: 'kebab-case',
|
|
20
|
-
type: 'element',
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
'@angular-eslint/directive-selector': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
prefix: prefix ?? 'app',
|
|
27
|
-
style: 'camelCase',
|
|
28
|
-
type: 'attribute',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
'@angular-eslint/no-forward-ref': 'off',
|
|
32
|
-
'@angular-eslint/prefer-on-push-component-change-detection': 'off',
|
|
33
|
-
'@angular-eslint/prefer-output-emitter-ref': 'off',
|
|
34
|
-
'@angular-eslint/prefer-signals': 'off',
|
|
35
|
-
'@chris.araneo/ng-perfectionist/sort-component-imports': 'error',
|
|
36
|
-
'@chris.araneo/ng-perfectionist/sort-component-style-urls': 'error',
|
|
37
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-declarations': 'error',
|
|
38
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-exports': 'error',
|
|
39
|
-
'@chris.araneo/ng-perfectionist/sort-ng-module-imports': 'error',
|
|
40
|
-
},
|
|
41
|
-
})));
|
|
44
|
+
]);
|
|
42
45
|
//# 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,eAAe,MAAM,8CAA8C,CAAC;AAC3E,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAOnC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,MAAM,EACN,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,
|
|
1
|
+
{"version":3,"file":"angular-eslint.js","sourceRoot":"/","sources":["src/angular/angular-eslint.ts"],"names":[],"mappings":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lodash-es';
|
|
2
2
|
import { JSONS, NX, SOURCES, TEMPLATES, TESTS, } from '../interfaces.js';
|
|
3
3
|
import { getConfigValue } from './get-config-value.js';
|
|
4
4
|
import { getUniqueConfigFiles } from './get-unique-config-files.js';
|
|
@@ -28,9 +28,9 @@ export const appendCrossConfigFilesToIgnores = ({ configBlock, }) => chain([
|
|
|
28
28
|
...currentIgnores,
|
|
29
29
|
...getUniqueConfigFiles({ configBlock, keys: ignores }),
|
|
30
30
|
];
|
|
31
|
-
return
|
|
31
|
+
return isEmpty(updatedIgnores)
|
|
32
32
|
? config
|
|
33
|
-
: { ...config, ignores: updatedIgnores }
|
|
33
|
+
: { ...config, ignores: updatedIgnores };
|
|
34
34
|
}),
|
|
35
35
|
])
|
|
36
36
|
.reduce((acc, [key, configs]) => ({ ...acc, [key]: configs }), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"append-cross-config-files-to-ignores.js","sourceRoot":"/","sources":["src/builder/append-cross-config-files-to-ignores.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"append-cross-config-files-to-ignores.js","sourceRoot":"/","sources":["src/builder/append-cross-config-files-to-ignores.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAGL,KAAK,EACL,EAAE,EACF,OAAO,EACP,SAAS,EACT,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAMpE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,WAAW,GACL,EAAe,EAAE,CACvB,KAAK,CAAC;IACJ;QACE,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;QAC3B,GAAG,EAAE,OAAO;KACb;IACD;QACE,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;QAC3B,GAAG,EAAE,KAAK;KACX;IACD;QACE,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QACpC,GAAG,EAAE,SAAS;KACf;IACD;QACE,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC;QACxC,GAAG,EAAE,KAAK;KACX;CACF,CAAC;KACC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACzB,GAAG;IACH,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,GAAgB,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAChE,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,cAAc,GAAa,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QACtD,MAAM,cAAc,GAAG;YACrB,GAAG,cAAc;YACjB,GAAG,oBAAoB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SACxD,CAAC;QAEF,OAAO,OAAO,CAAC,cAAc,CAAC;YAC5B,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC7C,CAAC,CACF;CACF,CAAC;KACD,MAAM,CACL,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,GAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,EAClE;IACE,GAAG,WAAW;CACA,CACjB;KACA,KAAK,EAAE,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { cloneDeep } from 'lodash-es';
|
|
2
1
|
import { isConfigKey } from './is-config-key.js';
|
|
3
|
-
export const getConfigValue = ({ configBlock, key }) => isConfigKey({ value: key })
|
|
4
|
-
? cloneDeep(configBlock[key] ?? [])
|
|
5
|
-
: [];
|
|
2
|
+
export const getConfigValue = ({ configBlock, key }) => isConfigKey({ value: key }) ? (configBlock[key] ?? []) : [];
|
|
6
3
|
//# sourceMappingURL=get-config-value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config-value.js","sourceRoot":"/","sources":["src/builder/get-config-value.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-config-value.js","sourceRoot":"/","sources":["src/builder/get-config-value.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAOjD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,EAAS,EAAmB,EAAE,CAC7E,WAAW,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,GAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC"}
|