eslint-config-cityssm 3.1.0 → 3.2.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/eslint.config.d.ts +3 -2
- package/eslint.config.js +27 -19
- package/eslint.config.ts +31 -21
- package/package.json +3 -3
package/eslint.config.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export
|
|
1
|
+
export declare const config: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
|
+
export declare const configWebApp: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
3
|
+
export default config;
|
package/eslint.config.js
CHANGED
|
@@ -9,7 +9,7 @@ import eslintPluginSecurity from 'eslint-plugin-security';
|
|
|
9
9
|
import eslintPluginSonarjs from 'eslint-plugin-sonarjs';
|
|
10
10
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
11
11
|
import tseslint from 'typescript-eslint';
|
|
12
|
-
export
|
|
12
|
+
export const config = tseslint.config(
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
14
14
|
eslint.configs.recommended, ...tseslint.configs.recommended, eslintPluginEslintComments.recommended, eslintPluginJsdoc.configs['flat/recommended-typescript'], eslintPluginRegexp.configs['flat/recommended'],
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
@@ -27,8 +27,7 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
plugins: {
|
|
30
|
-
'no-secrets': eslintPluginNoSecrets
|
|
31
|
-
'no-unsanitized': eslintPluginNoUnsanitized
|
|
30
|
+
'no-secrets': eslintPluginNoSecrets
|
|
32
31
|
},
|
|
33
32
|
rules: {
|
|
34
33
|
'@typescript-eslint/member-delimiter-style': [
|
|
@@ -64,22 +63,6 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
64
63
|
'n/no-missing-import': 'off',
|
|
65
64
|
'no-extra-semi': 'off',
|
|
66
65
|
'no-secrets/no-secrets': 'error',
|
|
67
|
-
'no-unsanitized/method': [
|
|
68
|
-
'error',
|
|
69
|
-
{
|
|
70
|
-
escape: {
|
|
71
|
-
methods: ['cityssm.escapeHTML']
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
'no-unsanitized/property': [
|
|
76
|
-
'error',
|
|
77
|
-
{
|
|
78
|
-
escape: {
|
|
79
|
-
methods: ['cityssm.escapeHTML']
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
66
|
'sonarjs/cognitive-complexity': ['warn', 20],
|
|
84
67
|
'sonarjs/no-duplicate-string': 'warn',
|
|
85
68
|
'sort-imports': [
|
|
@@ -124,3 +107,28 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
124
107
|
]
|
|
125
108
|
}
|
|
126
109
|
});
|
|
110
|
+
export const configWebApp = tseslint.config(...config, {
|
|
111
|
+
plugins: {
|
|
112
|
+
'no-unsanitized': eslintPluginNoUnsanitized
|
|
113
|
+
},
|
|
114
|
+
rules: {
|
|
115
|
+
'jsdoc/require-jsdoc': 'off',
|
|
116
|
+
'no-unsanitized/method': [
|
|
117
|
+
'error',
|
|
118
|
+
{
|
|
119
|
+
escape: {
|
|
120
|
+
methods: ['cityssm.escapeHTML']
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
'no-unsanitized/property': [
|
|
125
|
+
'error',
|
|
126
|
+
{
|
|
127
|
+
escape: {
|
|
128
|
+
methods: ['cityssm.escapeHTML']
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
export default config;
|
package/eslint.config.ts
CHANGED
|
@@ -10,7 +10,7 @@ import eslintPluginSonarjs from 'eslint-plugin-sonarjs'
|
|
|
10
10
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
11
11
|
import tseslint from 'typescript-eslint'
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export const config = tseslint.config(
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
15
15
|
eslint.configs.recommended,
|
|
16
16
|
|
|
@@ -40,8 +40,7 @@ export default tseslint.config(
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
plugins: {
|
|
43
|
-
'no-secrets': eslintPluginNoSecrets
|
|
44
|
-
'no-unsanitized': eslintPluginNoUnsanitized
|
|
43
|
+
'no-secrets': eslintPluginNoSecrets
|
|
45
44
|
},
|
|
46
45
|
rules: {
|
|
47
46
|
'@typescript-eslint/member-delimiter-style': [
|
|
@@ -82,24 +81,6 @@ export default tseslint.config(
|
|
|
82
81
|
'no-extra-semi': 'off',
|
|
83
82
|
'no-secrets/no-secrets': 'error',
|
|
84
83
|
|
|
85
|
-
'no-unsanitized/method': [
|
|
86
|
-
'error',
|
|
87
|
-
{
|
|
88
|
-
escape: {
|
|
89
|
-
methods: ['cityssm.escapeHTML']
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
|
|
94
|
-
'no-unsanitized/property': [
|
|
95
|
-
'error',
|
|
96
|
-
{
|
|
97
|
-
escape: {
|
|
98
|
-
methods: ['cityssm.escapeHTML']
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
|
|
103
84
|
'sonarjs/cognitive-complexity': ['warn', 20],
|
|
104
85
|
'sonarjs/no-duplicate-string': 'warn',
|
|
105
86
|
|
|
@@ -147,3 +128,32 @@ export default tseslint.config(
|
|
|
147
128
|
}
|
|
148
129
|
}
|
|
149
130
|
)
|
|
131
|
+
|
|
132
|
+
export const configWebApp = tseslint.config(...config, {
|
|
133
|
+
plugins: {
|
|
134
|
+
'no-unsanitized': eslintPluginNoUnsanitized
|
|
135
|
+
},
|
|
136
|
+
rules: {
|
|
137
|
+
'jsdoc/require-jsdoc': 'off',
|
|
138
|
+
|
|
139
|
+
'no-unsanitized/method': [
|
|
140
|
+
'error',
|
|
141
|
+
{
|
|
142
|
+
escape: {
|
|
143
|
+
methods: ['cityssm.escapeHTML']
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
|
|
148
|
+
'no-unsanitized/property': [
|
|
149
|
+
'error',
|
|
150
|
+
{
|
|
151
|
+
escape: {
|
|
152
|
+
methods: ['cityssm.escapeHTML']
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
export default config
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "eslint-config-cityssm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "ESLint rules used in the City of Sault Ste. Marie's TypeScript projects.",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.2.0",
|
|
6
6
|
"main": "eslint.config.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./eslint.config.js",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
45
45
|
"@eslint/js": "^9.3.0",
|
|
46
46
|
"eslint": "^8.57.0",
|
|
47
|
-
"eslint-config-love": "^
|
|
47
|
+
"eslint-config-love": "^50.0.0",
|
|
48
48
|
"eslint-plugin-import": "^2.29.1",
|
|
49
49
|
"eslint-plugin-jsdoc": "^48.2.6",
|
|
50
50
|
"eslint-plugin-n": "^17.7.0",
|
|
51
51
|
"eslint-plugin-no-secrets": "^1.0.2",
|
|
52
52
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
53
|
-
"eslint-plugin-promise": "^6.
|
|
53
|
+
"eslint-plugin-promise": "^6.2.0",
|
|
54
54
|
"eslint-plugin-regexp": "^2.6.0",
|
|
55
55
|
"eslint-plugin-security": "^3.0.0",
|
|
56
56
|
"eslint-plugin-sonarjs": "^1.0.3",
|