@virmator/lint 13.1.0 → 13.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 +1 -0
- package/configs/eslint.config.base.mjs +10 -9
- package/configs/eslint.config.mjs +11 -1
- package/dist/lint.d.ts +10 -0
- package/dist/lint.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ A default plugin for [virmator](https://www.npmjs.com/package/virmator).
|
|
|
16
16
|
- Deps
|
|
17
17
|
- [eslint](https://npmjs.com/package/eslint)
|
|
18
18
|
- [eslint-plugin-require-extensions](https://npmjs.com/package/eslint-plugin-require-extensions)
|
|
19
|
+
- [eslint-plugin-unicorn](https://npmjs.com/package/eslint-plugin-unicorn)
|
|
19
20
|
- [@eslint/js](https://npmjs.com/package/@eslint/js)
|
|
20
21
|
- [@eslint/eslintrc](https://npmjs.com/package/@eslint/eslintrc)
|
|
21
22
|
- [@stylistic/eslint-plugin](https://npmjs.com/package/@stylistic/eslint-plugin)
|
|
@@ -44,6 +44,7 @@ export function defineEslintConfig(repoDir) {
|
|
|
44
44
|
'*.yml',
|
|
45
45
|
'**/configs/',
|
|
46
46
|
'**/coverage/',
|
|
47
|
+
'**/dist-*/',
|
|
47
48
|
'**/dist/',
|
|
48
49
|
'cspell.config.cjs',
|
|
49
50
|
'package-lock.json',
|
|
@@ -77,11 +78,11 @@ export function defineEslintConfig(repoDir) {
|
|
|
77
78
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
78
79
|
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
79
80
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
81
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
82
|
+
|
|
80
83
|
'prettier/prettier': 'off',
|
|
81
84
|
'sonarjs/no-duplicate-string': 'off',
|
|
82
85
|
|
|
83
|
-
'no-lonely-if': 'error',
|
|
84
|
-
|
|
85
86
|
'unicorn/new-for-builtins': 'error',
|
|
86
87
|
'unicorn/no-array-push-push': 'error',
|
|
87
88
|
'unicorn/no-await-in-promise-methods': 'error',
|
|
@@ -95,24 +96,22 @@ export function defineEslintConfig(repoDir) {
|
|
|
95
96
|
'unicorn/no-lonely-if': 'error',
|
|
96
97
|
'unicorn/no-negated-condition': 'error',
|
|
97
98
|
'unicorn/no-negation-in-equality-check': 'error',
|
|
98
|
-
'unicorn/no-useless-length-check': 'error',
|
|
99
99
|
'unicorn/no-single-promise-in-promise-methods': 'error',
|
|
100
100
|
'unicorn/no-thenable': 'error',
|
|
101
|
-
|
|
102
|
-
'unicorn/no-unnecessary-await': 'error',
|
|
101
|
+
'unicorn/no-unnecessary-await': 'error', // not sure on this one
|
|
103
102
|
'unicorn/no-unnecessary-polyfills': 'error',
|
|
104
103
|
'unicorn/no-unreadable-iife': 'error',
|
|
105
104
|
'unicorn/no-useless-fallback-in-spread': 'error',
|
|
105
|
+
'unicorn/no-useless-length-check': 'error',
|
|
106
106
|
'unicorn/no-useless-promise-resolve-reject': 'error',
|
|
107
107
|
'unicorn/no-useless-spread': 'error',
|
|
108
108
|
'unicorn/no-useless-switch-case': 'error',
|
|
109
109
|
'unicorn/no-zero-fractions': 'error',
|
|
110
110
|
'unicorn/number-literal-case': 'error',
|
|
111
|
-
'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
112
111
|
'unicorn/numeric-separators-style': 'error',
|
|
113
112
|
'unicorn/prefer-array-find': 'error',
|
|
114
|
-
'unicorn/prefer-array-flat': 'error',
|
|
115
113
|
'unicorn/prefer-array-flat-map': 'error',
|
|
114
|
+
'unicorn/prefer-array-flat': 'error',
|
|
116
115
|
'unicorn/prefer-array-index-of': 'error',
|
|
117
116
|
'unicorn/prefer-array-some': 'error',
|
|
118
117
|
'unicorn/prefer-blob-reading-methods': 'error',
|
|
@@ -123,19 +122,21 @@ export function defineEslintConfig(repoDir) {
|
|
|
123
122
|
'unicorn/prefer-event-target': 'error',
|
|
124
123
|
'unicorn/prefer-export-from': 'error',
|
|
125
124
|
'unicorn/prefer-includes': 'error',
|
|
125
|
+
'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
126
126
|
'unicorn/prefer-modern-dom-apis': 'error',
|
|
127
|
-
'unicorn/prefer-module': 'error',
|
|
128
127
|
'unicorn/prefer-modern-math-apis': 'error',
|
|
128
|
+
'unicorn/prefer-module': 'error',
|
|
129
|
+
'unicorn/prefer-node-protocol': 'error',
|
|
129
130
|
'unicorn/prefer-set-size': 'error',
|
|
130
131
|
'unicorn/prefer-string-raw': 'error',
|
|
131
132
|
'unicorn/prefer-string-slice': 'error',
|
|
132
133
|
'unicorn/prefer-type-error': 'error',
|
|
133
134
|
'unicorn/throw-new-error': 'error',
|
|
134
|
-
'unicorn/prefer-node-protocol': 'error',
|
|
135
135
|
|
|
136
136
|
'@jsdoc/no-undefined-types': 'error',
|
|
137
137
|
'@typescript-eslint/await-thenable': 'error',
|
|
138
138
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
139
|
+
'no-lonely-if': 'error',
|
|
139
140
|
|
|
140
141
|
'@typescript-eslint/no-floating-promises': [
|
|
141
142
|
'error',
|
|
@@ -7,6 +7,16 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
export default [
|
|
8
8
|
...defineEslintConfig(__dirname),
|
|
9
9
|
{
|
|
10
|
-
ignores: [
|
|
10
|
+
ignores: [
|
|
11
|
+
/** Add file globs that should be ignored. */
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
rules: {
|
|
16
|
+
/**
|
|
17
|
+
* Turn off or on specific rules. See {@link defineEslintConfig} for which plugins are
|
|
18
|
+
* already enabled.
|
|
19
|
+
*/
|
|
20
|
+
},
|
|
11
21
|
},
|
|
12
22
|
];
|
package/dist/lint.d.ts
CHANGED
|
@@ -48,6 +48,11 @@ export declare const virmatorLintPlugin: Readonly<Readonly<{
|
|
|
48
48
|
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
|
49
49
|
readonly packageType: readonly [PackageType.TopPackage, PackageType.MonoRoot];
|
|
50
50
|
};
|
|
51
|
+
readonly 'eslint-plugin-unicorn': {
|
|
52
|
+
readonly type: NpmDepType.Dev;
|
|
53
|
+
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
|
54
|
+
readonly packageType: readonly [PackageType.TopPackage, PackageType.MonoRoot];
|
|
55
|
+
};
|
|
51
56
|
readonly '@eslint/js': {
|
|
52
57
|
readonly type: NpmDepType.Dev;
|
|
53
58
|
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
|
@@ -154,6 +159,11 @@ export declare const virmatorLintPlugin: Readonly<Readonly<{
|
|
|
154
159
|
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
|
155
160
|
readonly packageType: readonly [PackageType.TopPackage, PackageType.MonoRoot];
|
|
156
161
|
};
|
|
162
|
+
readonly 'eslint-plugin-unicorn': {
|
|
163
|
+
readonly type: NpmDepType.Dev;
|
|
164
|
+
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
|
165
|
+
readonly packageType: readonly [PackageType.TopPackage, PackageType.MonoRoot];
|
|
166
|
+
};
|
|
157
167
|
readonly '@eslint/js': {
|
|
158
168
|
readonly type: NpmDepType.Dev;
|
|
159
169
|
readonly env: readonly [VirmatorEnv.Node, VirmatorEnv.Web];
|
package/dist/lint.js
CHANGED
|
@@ -89,6 +89,17 @@ export const virmatorLintPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
89
89
|
PackageType.MonoRoot,
|
|
90
90
|
],
|
|
91
91
|
},
|
|
92
|
+
'eslint-plugin-unicorn': {
|
|
93
|
+
type: NpmDepType.Dev,
|
|
94
|
+
env: [
|
|
95
|
+
VirmatorEnv.Node,
|
|
96
|
+
VirmatorEnv.Web,
|
|
97
|
+
],
|
|
98
|
+
packageType: [
|
|
99
|
+
PackageType.TopPackage,
|
|
100
|
+
PackageType.MonoRoot,
|
|
101
|
+
],
|
|
102
|
+
},
|
|
92
103
|
'@eslint/js': {
|
|
93
104
|
type: NpmDepType.Dev,
|
|
94
105
|
env: [
|