eslint-config-cityssm 3.0.4 → 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/README.md +2 -4
- package/eslint.config.d.ts +3 -2
- package/eslint.config.js +29 -20
- package/eslint.config.ts +34 -21
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -19,9 +19,7 @@ In the project's `eslint.config.js` file.
|
|
|
19
19
|
```javascript
|
|
20
20
|
import eslintConfigCityssm from 'eslint-config-cityssm'
|
|
21
21
|
|
|
22
|
-
export default [
|
|
23
|
-
...eslintConfigCityssm
|
|
24
|
-
]
|
|
22
|
+
export default [...eslintConfigCityssm]
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
## Included Plugins
|
|
@@ -30,7 +28,7 @@ export default [
|
|
|
30
28
|
|
|
31
29
|
- [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
32
30
|
- [eslint-config-love](https://www.npmjs.com/package/eslint-config-love)
|
|
33
|
-
- [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments)
|
|
31
|
+
- [@eslint-community/eslint-plugin-eslint-comments](https://www.npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments)
|
|
34
32
|
- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)
|
|
35
33
|
- [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc)
|
|
36
34
|
- [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n)
|
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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import eslint from '@eslint/js';
|
|
2
|
+
import eslintPluginEslintComments from '@eslint-community/eslint-plugin-eslint-comments/configs';
|
|
2
3
|
import eslintConfigLove from 'eslint-config-love';
|
|
3
4
|
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
|
|
4
5
|
import eslintPluginNoSecrets from 'eslint-plugin-no-secrets';
|
|
@@ -8,9 +9,9 @@ import eslintPluginSecurity from 'eslint-plugin-security';
|
|
|
8
9
|
import eslintPluginSonarjs from 'eslint-plugin-sonarjs';
|
|
9
10
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
10
11
|
import tseslint from 'typescript-eslint';
|
|
11
|
-
export
|
|
12
|
+
export const config = tseslint.config(
|
|
12
13
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
13
|
-
eslint.configs.recommended, ...tseslint.configs.recommended, eslintPluginJsdoc.configs['flat/recommended-typescript'], eslintPluginRegexp.configs['flat/recommended'],
|
|
14
|
+
eslint.configs.recommended, ...tseslint.configs.recommended, eslintPluginEslintComments.recommended, eslintPluginJsdoc.configs['flat/recommended-typescript'], eslintPluginRegexp.configs['flat/recommended'],
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
15
16
|
eslintPluginSecurity.configs.recommended,
|
|
16
17
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
@@ -26,8 +27,7 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
plugins: {
|
|
29
|
-
'no-secrets': eslintPluginNoSecrets
|
|
30
|
-
'no-unsanitized': eslintPluginNoUnsanitized
|
|
30
|
+
'no-secrets': eslintPluginNoSecrets
|
|
31
31
|
},
|
|
32
32
|
rules: {
|
|
33
33
|
'@typescript-eslint/member-delimiter-style': [
|
|
@@ -63,22 +63,6 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
63
63
|
'n/no-missing-import': 'off',
|
|
64
64
|
'no-extra-semi': 'off',
|
|
65
65
|
'no-secrets/no-secrets': 'error',
|
|
66
|
-
'no-unsanitized/method': [
|
|
67
|
-
'error',
|
|
68
|
-
{
|
|
69
|
-
escape: {
|
|
70
|
-
methods: ['cityssm.escapeHTML']
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
'no-unsanitized/property': [
|
|
75
|
-
'error',
|
|
76
|
-
{
|
|
77
|
-
escape: {
|
|
78
|
-
methods: ['cityssm.escapeHTML']
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
66
|
'sonarjs/cognitive-complexity': ['warn', 20],
|
|
83
67
|
'sonarjs/no-duplicate-string': 'warn',
|
|
84
68
|
'sort-imports': [
|
|
@@ -123,3 +107,28 @@ eslintPluginUnicorn.configs['flat/recommended'], eslintConfigLove, {
|
|
|
123
107
|
]
|
|
124
108
|
}
|
|
125
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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import eslint from '@eslint/js'
|
|
2
|
+
import eslintPluginEslintComments from '@eslint-community/eslint-plugin-eslint-comments/configs'
|
|
2
3
|
import eslintConfigLove from 'eslint-config-love'
|
|
3
4
|
import eslintPluginJsdoc from 'eslint-plugin-jsdoc'
|
|
4
5
|
import eslintPluginNoSecrets from 'eslint-plugin-no-secrets'
|
|
@@ -9,11 +10,13 @@ import eslintPluginSonarjs from 'eslint-plugin-sonarjs'
|
|
|
9
10
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
10
11
|
import tseslint from 'typescript-eslint'
|
|
11
12
|
|
|
12
|
-
export
|
|
13
|
+
export const config = tseslint.config(
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
14
15
|
eslint.configs.recommended,
|
|
15
16
|
|
|
16
17
|
...tseslint.configs.recommended,
|
|
18
|
+
|
|
19
|
+
eslintPluginEslintComments.recommended,
|
|
17
20
|
eslintPluginJsdoc.configs['flat/recommended-typescript'],
|
|
18
21
|
eslintPluginRegexp.configs['flat/recommended'],
|
|
19
22
|
|
|
@@ -37,8 +40,7 @@ export default tseslint.config(
|
|
|
37
40
|
}
|
|
38
41
|
},
|
|
39
42
|
plugins: {
|
|
40
|
-
'no-secrets': eslintPluginNoSecrets
|
|
41
|
-
'no-unsanitized': eslintPluginNoUnsanitized
|
|
43
|
+
'no-secrets': eslintPluginNoSecrets
|
|
42
44
|
},
|
|
43
45
|
rules: {
|
|
44
46
|
'@typescript-eslint/member-delimiter-style': [
|
|
@@ -79,24 +81,6 @@ export default tseslint.config(
|
|
|
79
81
|
'no-extra-semi': 'off',
|
|
80
82
|
'no-secrets/no-secrets': 'error',
|
|
81
83
|
|
|
82
|
-
'no-unsanitized/method': [
|
|
83
|
-
'error',
|
|
84
|
-
{
|
|
85
|
-
escape: {
|
|
86
|
-
methods: ['cityssm.escapeHTML']
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
|
|
91
|
-
'no-unsanitized/property': [
|
|
92
|
-
'error',
|
|
93
|
-
{
|
|
94
|
-
escape: {
|
|
95
|
-
methods: ['cityssm.escapeHTML']
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
|
|
100
84
|
'sonarjs/cognitive-complexity': ['warn', 20],
|
|
101
85
|
'sonarjs/no-duplicate-string': 'warn',
|
|
102
86
|
|
|
@@ -144,3 +128,32 @@ export default tseslint.config(
|
|
|
144
128
|
}
|
|
145
129
|
}
|
|
146
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.0
|
|
5
|
+
"version": "3.2.0",
|
|
6
6
|
"main": "eslint.config.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./eslint.config.js",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"author": "The Corporation of the City of Sault Ste. Marie",
|
|
42
42
|
"license": "Unlicense",
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
44
45
|
"@eslint/js": "^9.3.0",
|
|
45
46
|
"eslint": "^8.57.0",
|
|
46
|
-
"eslint-config-love": "^
|
|
47
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
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",
|