@chris.araneo/eslint-config 0.0.13 → 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 -0
- package/package.json +10 -4
- package/index.js +0 -118
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# @chris.araneo/eslint-config
|
|
1
|
+
# @chris.araneo/eslint-config
|
package/index.mjs
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
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",
|
|
@@ -14,18 +14,24 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Krzysztof Pająk (Chris Araneo) <chris.araneo@gmail.com>",
|
|
16
16
|
"type": "module",
|
|
17
|
-
"main": "./index.
|
|
17
|
+
"main": "./index.mjs",
|
|
18
18
|
"files": [
|
|
19
|
-
"./index.
|
|
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",
|
|
26
26
|
"eslint": "^9.27.0",
|
|
27
|
+
"eslint-plugin-jsonc": "^2.20.1",
|
|
28
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
29
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
27
30
|
"typescript-eslint": "^8.32.1"
|
|
28
31
|
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"prettier": "^3.5.3"
|
|
34
|
+
},
|
|
29
35
|
"publishConfig": {
|
|
30
36
|
"access": "public"
|
|
31
37
|
}
|
package/index.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import angular from "angular-eslint";
|
|
2
|
-
import typescript from "typescript-eslint";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
typescript: [
|
|
6
|
-
{
|
|
7
|
-
files: ["**/*.ts"],
|
|
8
|
-
plugins: {
|
|
9
|
-
typescript,
|
|
10
|
-
angular,
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
"@angular-eslint/component-class-suffix": [
|
|
14
|
-
"error",
|
|
15
|
-
{ suffixes: ["Component", "Modal", "Page"] },
|
|
16
|
-
],
|
|
17
|
-
"@angular-eslint/component-max-inline-declarations": "error",
|
|
18
|
-
"@angular-eslint/component-selector": [
|
|
19
|
-
"error",
|
|
20
|
-
{ type: "element", style: "kebab-case" },
|
|
21
|
-
],
|
|
22
|
-
"@angular-eslint/consistent-component-styles": "error",
|
|
23
|
-
"@angular-eslint/contextual-decorator": "error",
|
|
24
|
-
"@angular-eslint/contextual-lifecycle": "error",
|
|
25
|
-
"@angular-eslint/directive-class-suffix": "error",
|
|
26
|
-
"@angular-eslint/directive-selector": [
|
|
27
|
-
"error",
|
|
28
|
-
{ type: "attribute", style: "camelCase" },
|
|
29
|
-
],
|
|
30
|
-
"@angular-eslint/no-async-lifecycle-method": "error",
|
|
31
|
-
"@angular-eslint/no-attribute-decorator": "error",
|
|
32
|
-
"@angular-eslint/no-conflicting-lifecycle": "error",
|
|
33
|
-
"@angular-eslint/no-empty-lifecycle-method": "error",
|
|
34
|
-
"@angular-eslint/no-forward-ref": "error",
|
|
35
|
-
"@angular-eslint/no-input-prefix": ["error", { prefixes: ["on"] }],
|
|
36
|
-
"@angular-eslint/no-input-rename": "error",
|
|
37
|
-
"@angular-eslint/no-inputs-metadata-property": "error",
|
|
38
|
-
"@angular-eslint/no-lifecycle-call": "error",
|
|
39
|
-
"@angular-eslint/no-output-native": "error",
|
|
40
|
-
"@angular-eslint/no-output-on-prefix": "error",
|
|
41
|
-
"@angular-eslint/no-output-rename": "error",
|
|
42
|
-
"@angular-eslint/no-outputs-metadata-property": "error",
|
|
43
|
-
"@angular-eslint/no-pipe-impure": "error",
|
|
44
|
-
"@angular-eslint/no-queries-metadata-property": "error",
|
|
45
|
-
"@angular-eslint/prefer-output-readonly": "error",
|
|
46
|
-
"@angular-eslint/prefer-standalone": "error",
|
|
47
|
-
"@angular-eslint/relative-url-prefix": "error",
|
|
48
|
-
"@angular-eslint/sort-lifecycle-methods": "error",
|
|
49
|
-
"@angular-eslint/sort-ngmodule-metadata-arrays": "error",
|
|
50
|
-
"@angular-eslint/use-component-view-encapsulation": "error",
|
|
51
|
-
"@angular-eslint/use-injectable-provided-in": "error",
|
|
52
|
-
"@angular-eslint/use-lifecycle-interface": "error",
|
|
53
|
-
"@angular-eslint/use-pipe-transform-interface": "error",
|
|
54
|
-
"@typescript-eslint/return-await": "error",
|
|
55
|
-
"@typescript-eslint/lines-between-class-members": [
|
|
56
|
-
"error",
|
|
57
|
-
"always",
|
|
58
|
-
{ exceptAfterSingleLine: true },
|
|
59
|
-
],
|
|
60
|
-
"@typescript-eslint/member-ordering": "error",
|
|
61
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
62
|
-
"@typescript-eslint/no-extraneous-class": [
|
|
63
|
-
"error",
|
|
64
|
-
{ allowEmpty: true, allowStaticOnly: true },
|
|
65
|
-
],
|
|
66
|
-
"@typescript-eslint/no-misused-promises": [
|
|
67
|
-
"error",
|
|
68
|
-
{ checksVoidReturn: false },
|
|
69
|
-
],
|
|
70
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
71
|
-
"@typescript-eslint/prefer-destructuring": "error",
|
|
72
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
73
|
-
"@typescript-eslint/sort-type-constituents": "error",
|
|
74
|
-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
template: [
|
|
79
|
-
{
|
|
80
|
-
files: ["**/*.html"],
|
|
81
|
-
plugins: {
|
|
82
|
-
angular,
|
|
83
|
-
},
|
|
84
|
-
rules: {
|
|
85
|
-
"@angular-eslint/template/attributes-order": [
|
|
86
|
-
"error",
|
|
87
|
-
{ alphabetical: true },
|
|
88
|
-
],
|
|
89
|
-
"@angular-eslint/template/banana-in-box": "error",
|
|
90
|
-
"@angular-eslint/template/conditional-complexity": "error",
|
|
91
|
-
"@angular-eslint/template/cyclomatic-complexity": [
|
|
92
|
-
"error",
|
|
93
|
-
{ maxComplexity: 10 },
|
|
94
|
-
],
|
|
95
|
-
"@angular-eslint/template/elements-content": "error",
|
|
96
|
-
"@angular-eslint/template/eqeqeq": "error",
|
|
97
|
-
"@angular-eslint/template/label-has-associated-control": "error",
|
|
98
|
-
"@angular-eslint/template/mouse-events-have-key-events": "error",
|
|
99
|
-
"@angular-eslint/template/no-any": "error",
|
|
100
|
-
"@angular-eslint/template/no-autofocus": "error",
|
|
101
|
-
"@angular-eslint/template/no-call-expression": "error",
|
|
102
|
-
"@angular-eslint/template/no-distracting-elements": "error",
|
|
103
|
-
"@angular-eslint/template/no-duplicate-attributes": "error",
|
|
104
|
-
"@angular-eslint/template/no-interpolation-in-attributes": "error",
|
|
105
|
-
"@angular-eslint/template/no-negated-async": "error",
|
|
106
|
-
"@angular-eslint/template/no-positive-tabindex": "error",
|
|
107
|
-
"@angular-eslint/template/prefer-self-closing-tags": "error",
|
|
108
|
-
"@angular-eslint/template/role-has-required-aria": "error",
|
|
109
|
-
"@angular-eslint/template/table-scope": "error",
|
|
110
|
-
"@angular-eslint/template/use-track-by-function": [
|
|
111
|
-
"error",
|
|
112
|
-
{ alias: ["ngForTrackByIndex", "ngForTrackByProperty"] },
|
|
113
|
-
],
|
|
114
|
-
"@angular-eslint/template/valid-aria": "error",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
};
|