@chris.araneo/eslint-config 0.0.94 → 0.0.95
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/dist/src/angular/angular-eslint-template.js +0 -12
- package/dist/src/angular/angular-eslint-template.js.map +1 -1
- package/dist/src/angular/index.js +16 -3
- package/dist/src/angular/index.js.map +1 -1
- package/dist/src/json/index.js +1 -1
- package/dist/src/json/index.js.map +1 -1
- package/dist/src/json/jsonc.d.ts +1 -1
- package/dist/src/json/jsonc.js +18 -16
- package/dist/src/json/jsonc.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import angular from 'angular-eslint';
|
|
2
|
-
import { getEslintConfigRuleKeys } from '../typescript/eslint.js';
|
|
3
|
-
import { getTypescriptEslintConfigRuleKeys } from '../typescript/typescript-eslint.js';
|
|
4
|
-
import { getAngularSourcesConfigsRuleKeys } from './angular-eslint.js';
|
|
5
2
|
export const getAngularTemplatesConfigs = (templates) => [
|
|
6
3
|
...angular.configs.templateAll.map((config) => ({
|
|
7
4
|
...config,
|
|
@@ -12,14 +9,5 @@ export const getAngularTemplatesConfigs = (templates) => [
|
|
|
12
9
|
'@angular-eslint/template/prefer-control-flow': 'off',
|
|
13
10
|
},
|
|
14
11
|
})),
|
|
15
|
-
getDisabledSourceRules(templates),
|
|
16
12
|
];
|
|
17
|
-
const getDisabledSourceRules = (templates) => ({
|
|
18
|
-
files: templates,
|
|
19
|
-
rules: [
|
|
20
|
-
...getEslintConfigRuleKeys(),
|
|
21
|
-
...getTypescriptEslintConfigRuleKeys(),
|
|
22
|
-
...getAngularSourcesConfigsRuleKeys(),
|
|
23
|
-
].reduce((acc, key) => ({ ...acc, [key]: 'off' }), {}),
|
|
24
|
-
});
|
|
25
13
|
//# 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;AAGrC,
|
|
1
|
+
{"version":3,"file":"angular-eslint-template.js","sourceRoot":"/","sources":["src/angular/angular-eslint-template.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAGrC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,SAAmB,EACF,EAAE,CAAC;IACpB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAChC,CAAC,MAAM,EAAE,EAAE,CACT,CAAC;QACC,GAAG,MAAM;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE;YACL,GAAG,MAAM,CAAC,KAAK;YACf,+BAA+B,EAAE,KAAK;YACtC,8CAA8C,EAAE,KAAK;SACtD;KACF,CAAkB,CACtB;CACF,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { defineConfig } from 'eslint/config';
|
|
2
|
+
import { getEslintConfigRuleKeys } from 'src/typescript/eslint.js';
|
|
3
|
+
import { getTypescriptEslintConfigRuleKeys } from 'src/typescript/typescript-eslint.js';
|
|
2
4
|
import createJsonConfigs from '../json/index.js';
|
|
3
5
|
import { createTypeScriptConfigs } from '../typescript/index.js';
|
|
4
6
|
import { isEmpty } from '../utils.js';
|
|
5
|
-
import { getAngularSourcesConfigs } from './angular-eslint.js';
|
|
7
|
+
import { getAngularSourcesConfigs, getAngularSourcesConfigsRuleKeys, } from './angular-eslint.js';
|
|
6
8
|
import { getAngularTemplatesConfigs } from './angular-eslint-template.js';
|
|
7
9
|
export default (prefix = 'app', sources = [], templates = [], jsons = [], ignored) => {
|
|
8
10
|
const configs = [];
|
|
@@ -11,10 +13,13 @@ export default (prefix = 'app', sources = [], templates = [], jsons = [], ignore
|
|
|
11
13
|
configs.push(...getAngularSourcesConfigs(prefix, sources));
|
|
12
14
|
}
|
|
13
15
|
if (!isEmpty(templates)) {
|
|
14
|
-
configs.push(...
|
|
16
|
+
configs.push(...[
|
|
17
|
+
...getAngularTemplatesConfigs(templates),
|
|
18
|
+
getDisabledSourceRules(templates),
|
|
19
|
+
]);
|
|
15
20
|
}
|
|
16
21
|
if (!isEmpty(jsons)) {
|
|
17
|
-
configs.push(...createJsonConfigs(jsons));
|
|
22
|
+
configs.push(...[...createJsonConfigs(jsons), getDisabledSourceRules(jsons)]);
|
|
18
23
|
}
|
|
19
24
|
if (!isEmpty(ignored)) {
|
|
20
25
|
configs.push({
|
|
@@ -23,4 +28,12 @@ export default (prefix = 'app', sources = [], templates = [], jsons = [], ignore
|
|
|
23
28
|
}
|
|
24
29
|
return defineConfig(configs);
|
|
25
30
|
};
|
|
31
|
+
const getDisabledSourceRules = (files) => ({
|
|
32
|
+
files,
|
|
33
|
+
rules: [
|
|
34
|
+
...getEslintConfigRuleKeys(),
|
|
35
|
+
...getTypescriptEslintConfigRuleKeys(),
|
|
36
|
+
...getAngularSourcesConfigsRuleKeys(),
|
|
37
|
+
].reduce((acc, key) => ({ ...acc, [key]: 'off' }), {}),
|
|
38
|
+
});
|
|
26
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/angular/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/angular/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAGxF,OAAO,iBAAiB,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EACL,w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,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;CACvD,CAAkB,CAAC"}
|
package/dist/src/json/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/json/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAe,CAAC,QAAkB,EAAE,EAAE,EAAE;IACtC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/json/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAe,CAAC,QAAkB,EAAE,EAAE,EAAE;IACtC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC,CAAC"}
|
package/dist/src/json/jsonc.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
export declare const getJsoncConfig: (jsons: string[]) => Linter.Config;
|
|
2
|
+
export declare const getJsoncConfig: (jsons: string[]) => Linter.Config[];
|
package/dist/src/json/jsonc.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import json from '@eslint/json';
|
|
2
2
|
import jsonc from 'eslint-plugin-jsonc';
|
|
3
3
|
import jsoncParser from 'jsonc-eslint-parser';
|
|
4
|
-
export const getJsoncConfig = (jsons) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export const getJsoncConfig = (jsons) => [
|
|
5
|
+
{
|
|
6
|
+
files: jsons,
|
|
7
|
+
languageOptions: {
|
|
8
|
+
parser: jsoncParser,
|
|
9
|
+
},
|
|
10
|
+
plugins: {
|
|
11
|
+
json,
|
|
12
|
+
jsonc,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
...jsonc.configs['flat/recommended-with-jsonc'].rules,
|
|
16
|
+
'jsonc/no-comments': 'error',
|
|
17
|
+
'jsonc/no-dupe-keys': 'error',
|
|
18
|
+
'jsonc/sort-keys': 'error',
|
|
19
|
+
'jsonc/valid-json-number': 'error',
|
|
20
|
+
},
|
|
8
21
|
},
|
|
9
|
-
|
|
10
|
-
json,
|
|
11
|
-
jsonc,
|
|
12
|
-
},
|
|
13
|
-
rules: {
|
|
14
|
-
...jsonc.configs['flat/recommended-with-jsonc'].rules,
|
|
15
|
-
'jsonc/no-comments': 'error',
|
|
16
|
-
'jsonc/no-dupe-keys': 'error',
|
|
17
|
-
'jsonc/sort-keys': 'error',
|
|
18
|
-
'jsonc/valid-json-number': 'error',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
22
|
+
];
|
|
21
23
|
//# sourceMappingURL=jsonc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"/","sources":["src/json/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAC;AAEhC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAe,
|
|
1
|
+
{"version":3,"file":"jsonc.js","sourceRoot":"/","sources":["src/json/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAC;AAEhC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAe,EAAmB,EAAE,CAAC;IAClE;QACE,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE;YACf,MAAM,EAAE,WAAW;SACpB;QACD,OAAO,EAAE;YACP,IAAI;YACJ,KAAK;SACsB;QAC7B,KAAK,EAAE;YAEL,GAAI,KAAK,CAAC,OAAO,CAAC,6BAA6B,CAAS,CAAC,KAAK;YAC9D,mBAAmB,EAAE,OAAO;YAC5B,oBAAoB,EAAE,OAAO;YAC7B,iBAAiB,EAAE,OAAO;YAC1B,yBAAyB,EAAE,OAAO;SACnC;KACF;CACF,CAAC"}
|