@chris.araneo/eslint-config 0.0.128 → 0.0.129
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.
|
@@ -4,6 +4,7 @@ import { createTypeScriptConfigBlock, createTypeScriptTestsConfigBlock, } from '
|
|
|
4
4
|
import { setTsconfigRootDir } from '../utils/set-tsconfig-root-dir.js';
|
|
5
5
|
import { getAngularSourcesConfigs } from './angular-eslint.js';
|
|
6
6
|
import { getAngularTemplatesConfigs } from './angular-eslint-template.js';
|
|
7
|
+
import { getNgPerfectionistConfigs } from './ng-perfectionist.js';
|
|
7
8
|
export const createAngularConfigBlock = ({ ignored = [], jsons = [], prefix = 'app', shouldResolveAppRootDir = false, sources = [], templates = [], tests = [], tsconfigRootDir = undefined, } = {}) => ({
|
|
8
9
|
[IGNORED]: [
|
|
9
10
|
{
|
|
@@ -14,6 +15,7 @@ export const createAngularConfigBlock = ({ ignored = [], jsons = [], prefix = 'a
|
|
|
14
15
|
[SOURCES]: [
|
|
15
16
|
...(createTypeScriptConfigBlock({ sources })[SOURCES] || []),
|
|
16
17
|
...getAngularSourcesConfigs({ prefix, sources }),
|
|
18
|
+
...getNgPerfectionistConfigs({ sources }),
|
|
17
19
|
].map((config) => setTsconfigRootDir({
|
|
18
20
|
config,
|
|
19
21
|
shouldResolveAppRootDir,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/angular/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAA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AAC,CAAC,MAAM,EAAE,EAAE,CACf,kBAAkB,CAAC;QACjB,MAAM;QACN,uBAAuB;QACvB,OAAO;QACP,eAAe;KAChB,CAAC,CACH;IACD,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC,EAAE,SAAS,EAAE,CAAC;IACtD,CAAC,KAAK,CAAC,EAAE;QACP,GAAG,CAAC,gCAAgC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;KACvE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACf,kBAAkB,CAAC;QACjB,MAAM;QACN,uBAAuB;QACvB,OAAO,EAAE,KAAK;QACd,eAAe;KAChB,CAAC,CACH;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import ngPerfectionist from '@chris.araneo/eslint-plugin-ng-perfectionist';
|
|
2
|
+
import { match } from 'ts-pattern';
|
|
3
|
+
export const getNgPerfectionistConfigs = ({ sources, } = {}) => match(sources?.length ?? 0)
|
|
4
|
+
.with(0, () => [])
|
|
5
|
+
.otherwise(() => [
|
|
6
|
+
{
|
|
7
|
+
files: sources,
|
|
8
|
+
plugins: {
|
|
9
|
+
'@chris.araneo/ng-perfectionist': ngPerfectionist,
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
'@chris.araneo/ng-perfectionist/sort-component-imports': 'error',
|
|
13
|
+
'@chris.araneo/ng-perfectionist/sort-component-style-urls': 'error',
|
|
14
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-declarations': 'error',
|
|
15
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-exports': 'error',
|
|
16
|
+
'@chris.araneo/ng-perfectionist/sort-ng-module-imports': 'error',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
]);
|
|
20
|
+
//# sourceMappingURL=ng-perfectionist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-perfectionist.js","sourceRoot":"/","sources":["src/angular/ng-perfectionist.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,8CAA8C,CAAC;AAE3E,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;IACf;QACE,KAAK,EAAE,OAAO;QACd,OAAO,EAAE;YACP,gCAAgC,EAAE,eAAe;SAClD;QACD,KAAK,EAAE;YACL,uDAAuD,EAAE,OAAO;YAChE,0DAA0D,EAAE,OAAO;YACnE,4DAA4D,EAAE,OAAO;YACrE,uDAAuD,EAAE,OAAO;YAChE,uDAAuD,EAAE,OAAO;SACjE;KACe;CACnB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris.araneo/eslint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.129",
|
|
4
4
|
"description": "ESLint shareable configuration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"typescript-eslint": "^8.56.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
+
"@chris.araneo/eslint-plugin-ng-perfectionist": "^0.0.1",
|
|
60
61
|
"@jest/globals": "^30.2.0",
|
|
61
62
|
"@types/app-root-dir": "^0.1.4",
|
|
62
63
|
"@types/jest": "^30.0.0",
|