eslint-config-final 1.7.21 → 1.8.0
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/index.js +18 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -9,6 +9,8 @@ const rxjsAngular = require('eslint-plugin-rxjs-angular-x');
|
|
|
9
9
|
const tailwindcss = require('eslint-plugin-tailwindcss');
|
|
10
10
|
|
|
11
11
|
const javascript = {
|
|
12
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
13
|
+
|
|
12
14
|
extends: [
|
|
13
15
|
eslint.configs.recommended,
|
|
14
16
|
stylistic.configs.customize({
|
|
@@ -59,6 +61,8 @@ const javascript = {
|
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
const typescript = {
|
|
64
|
+
files: ['**/*.{ts,tsx,mts,cts}'],
|
|
65
|
+
|
|
62
66
|
extends: [
|
|
63
67
|
...javascript.extends,
|
|
64
68
|
...tseslint.configs.recommended,
|
|
@@ -77,6 +81,8 @@ const typescript = {
|
|
|
77
81
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
78
82
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
79
83
|
'@typescript-eslint/no-unused-expressions': 'off',
|
|
84
|
+
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
85
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
80
86
|
'@typescript-eslint/no-unused-vars': ['error', {
|
|
81
87
|
argsIgnorePattern: '^_',
|
|
82
88
|
caughtErrorsIgnorePattern: '^_',
|
|
@@ -91,6 +97,8 @@ const typescript = {
|
|
|
91
97
|
};
|
|
92
98
|
|
|
93
99
|
const angularTypescript = {
|
|
100
|
+
files: ['**/*.ts'],
|
|
101
|
+
|
|
94
102
|
extends: [
|
|
95
103
|
...angularPlugin.configs.tsRecommended,
|
|
96
104
|
rxjs.default.configs.recommended,
|
|
@@ -102,6 +110,12 @@ const angularTypescript = {
|
|
|
102
110
|
},
|
|
103
111
|
|
|
104
112
|
rules: {
|
|
113
|
+
'@angular-eslint/component-selector': ['error', { type: 'element', prefix: 'app', style: 'kebab-case' }],
|
|
114
|
+
'@angular-eslint/directive-selector': ['error', { type: 'attribute', prefix: 'app', style: 'camelCase' }],
|
|
115
|
+
'@angular-eslint/no-empty-lifecycle-method': 'error',
|
|
116
|
+
'@angular-eslint/no-lifecycle-call': 'error',
|
|
117
|
+
'@angular-eslint/prefer-output-readonly': 'error',
|
|
118
|
+
|
|
105
119
|
'rxjs-x/no-nested-subscribe': 'off',
|
|
106
120
|
'rxjs-x/no-unsafe-catch': 'error',
|
|
107
121
|
'rxjs-x/no-unsafe-switchmap': 'error',
|
|
@@ -112,12 +126,16 @@ const angularTypescript = {
|
|
|
112
126
|
};
|
|
113
127
|
|
|
114
128
|
const angularTemplate = {
|
|
129
|
+
files: ['**/*.html'],
|
|
130
|
+
|
|
115
131
|
extends: [
|
|
116
132
|
...angularPlugin.configs.templateRecommended,
|
|
117
133
|
],
|
|
118
134
|
};
|
|
119
135
|
|
|
120
136
|
const tailwind = {
|
|
137
|
+
files: ['**/*.{ts,html}'],
|
|
138
|
+
|
|
121
139
|
extends: [
|
|
122
140
|
...tailwindcss.configs['flat/recommended'],
|
|
123
141
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-final",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
22
22
|
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
|
23
23
|
"angular-eslint": "^22.0.0",
|
|
24
|
-
"eslint-plugin-no-implicit-any-function-args": "^1.4.
|
|
24
|
+
"eslint-plugin-no-implicit-any-function-args": "^1.4.91",
|
|
25
25
|
"eslint-plugin-rxjs-angular-x": "^1.0.1",
|
|
26
26
|
"eslint-plugin-rxjs-x": "^1.0.2",
|
|
27
27
|
"eslint-plugin-tailwindcss": "^3.18.3",
|