@chris.araneo/eslint-config 0.0.14 → 0.0.15
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/index.mjs +76 -70
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# @chris.araneo/eslint-config
|
|
1
|
+
# @chris.araneo/eslint-config
|
package/index.mjs
CHANGED
|
@@ -1,70 +1,76 @@
|
|
|
1
|
-
import eslint from
|
|
2
|
-
import tseslint from
|
|
3
|
-
import angular from
|
|
4
|
-
import eslintPluginJsonc from
|
|
5
|
-
import simpleImportSort from
|
|
6
|
-
import jsoncParser from
|
|
7
|
-
|
|
8
|
-
export default
|
|
9
|
-
return tseslint.config(
|
|
10
|
-
...eslintPluginJsonc.configs[
|
|
11
|
-
{
|
|
12
|
-
files: jsonFiles,
|
|
13
|
-
languageOptions: {
|
|
14
|
-
parser: jsoncParser,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
files: sourceFiles,
|
|
19
|
-
extends: [
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import angular from 'angular-eslint';
|
|
4
|
+
import eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
5
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
+
import jsoncParser from 'jsonc-eslint-parser';
|
|
7
|
+
|
|
8
|
+
export default (jsonFiles, sourceFiles, htmlFiles) => {
|
|
9
|
+
return tseslint.config(
|
|
10
|
+
...eslintPluginJsonc.configs['flat/recommended-with-jsonc'],
|
|
11
|
+
{
|
|
12
|
+
files: jsonFiles,
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parser: jsoncParser,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
files: sourceFiles,
|
|
19
|
+
extends: [eslint.configs.all, ...tseslint.configs.all],
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parserOptions: {
|
|
22
|
+
projectService: true,
|
|
23
|
+
tsconfigRootDir: import.meta.dirname,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
files: sourceFiles,
|
|
29
|
+
extends: [...angular.configs.tsAll],
|
|
30
|
+
processor: angular.processInlineTemplates,
|
|
31
|
+
rules: {
|
|
32
|
+
'@angular-eslint/directive-selector': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
type: 'attribute',
|
|
36
|
+
prefix: 'app',
|
|
37
|
+
style: 'camelCase',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'@angular-eslint/component-selector': [
|
|
41
|
+
'error',
|
|
42
|
+
{
|
|
43
|
+
type: 'element',
|
|
44
|
+
prefix: 'app',
|
|
45
|
+
style: 'kebab-case',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
'@typescript-eslint/no-extraneous-class': 'off',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
files: sourceFiles,
|
|
53
|
+
plugins: {
|
|
54
|
+
'simple-import-sort': simpleImportSort,
|
|
55
|
+
},
|
|
56
|
+
rules: {
|
|
57
|
+
'simple-import-sort/imports': 'error',
|
|
58
|
+
'simple-import-sort/exports': 'error',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
files: htmlFiles,
|
|
63
|
+
extends: [...angular.configs.templateAll],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
ignores: [
|
|
67
|
+
'node_modules/',
|
|
68
|
+
'reports/',
|
|
69
|
+
'.stryker-tmp/',
|
|
70
|
+
'.angular',
|
|
71
|
+
'package.json',
|
|
72
|
+
'package-lock.json',
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
);
|
|
76
|
+
};
|
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.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"./index.mjs"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"format": "npx sort-package-json"
|
|
22
|
+
"format": "npx sort-package-json && prettier --write ."
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"angular-eslint": "^19.4.0",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"jsonc-eslint-parser": "^2.4.0",
|
|
30
30
|
"typescript-eslint": "^8.32.1"
|
|
31
31
|
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"prettier": "^3.5.3"
|
|
34
|
+
},
|
|
32
35
|
"publishConfig": {
|
|
33
36
|
"access": "public"
|
|
34
37
|
}
|