@jimmy.codes/eslint-config 6.27.0 → 6.28.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/dist/index.d.mts
CHANGED
|
@@ -64,7 +64,7 @@ interface RuleOptions {
|
|
|
64
64
|
*/
|
|
65
65
|
'@next/next/inline-script-id'?: Linter.RuleEntry<[]>;
|
|
66
66
|
/**
|
|
67
|
-
* Prefer
|
|
67
|
+
* Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager.
|
|
68
68
|
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
69
69
|
*/
|
|
70
70
|
'@next/next/next-script-for-ga'?: Linter.RuleEntry<[]>;
|
|
@@ -1753,6 +1753,16 @@ interface RuleOptions {
|
|
|
1753
1753
|
* @see https://eslint.org/docs/latest/rules/curly
|
|
1754
1754
|
*/
|
|
1755
1755
|
'curly'?: Linter.RuleEntry<Curly>;
|
|
1756
|
+
/**
|
|
1757
|
+
* Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law
|
|
1758
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
1759
|
+
*/
|
|
1760
|
+
'de-morgan/no-negated-conjunction'?: Linter.RuleEntry<[]>;
|
|
1761
|
+
/**
|
|
1762
|
+
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
1763
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
1764
|
+
*/
|
|
1765
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<[]>;
|
|
1756
1766
|
/**
|
|
1757
1767
|
* Require `default` cases in `switch` statements
|
|
1758
1768
|
* @see https://eslint.org/docs/latest/rules/default-case
|
|
@@ -7024,6 +7034,11 @@ interface RuleOptions {
|
|
|
7024
7034
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
|
|
7025
7035
|
*/
|
|
7026
7036
|
'vitest/no-test-return-statement'?: Linter.RuleEntry<[]>;
|
|
7037
|
+
/**
|
|
7038
|
+
* Disallow unnecessary async function wrapper for expected promises
|
|
7039
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
|
|
7040
|
+
*/
|
|
7041
|
+
'vitest/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>;
|
|
7027
7042
|
/**
|
|
7028
7043
|
* Enforce padding around `afterAll` blocks
|
|
7029
7044
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
|
package/dist/index.mjs
CHANGED
|
@@ -7,9 +7,10 @@ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescrip
|
|
|
7
7
|
import { configs, importX } from "eslint-plugin-import-x";
|
|
8
8
|
import nodePlugin from "eslint-plugin-n";
|
|
9
9
|
import arrowReturnStylePlugin from "eslint-plugin-arrow-return-style-x";
|
|
10
|
+
import deMorganPlugin, { configs as configs$1 } from "eslint-plugin-de-morgan";
|
|
10
11
|
import eslint from "@eslint/js";
|
|
11
12
|
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
12
|
-
import perfectionist, { configs as configs$
|
|
13
|
+
import perfectionist, { configs as configs$2 } from "eslint-plugin-perfectionist";
|
|
13
14
|
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
14
15
|
import * as regexpPlugin from "eslint-plugin-regexp";
|
|
15
16
|
import stylisticPlugin from "@stylistic/eslint-plugin";
|
|
@@ -175,7 +176,8 @@ const additionalRules = {
|
|
|
175
176
|
};
|
|
176
177
|
const javascriptRules = {
|
|
177
178
|
...eslint.configs.recommended.rules,
|
|
178
|
-
...additionalRules
|
|
179
|
+
...additionalRules,
|
|
180
|
+
...configs$1.recommended.rules
|
|
179
181
|
};
|
|
180
182
|
|
|
181
183
|
//#endregion
|
|
@@ -184,7 +186,10 @@ const javascriptConfig = () => {
|
|
|
184
186
|
return [{
|
|
185
187
|
linterOptions: { reportUnusedDisableDirectives: true },
|
|
186
188
|
name: "jimmy.codes/javascript",
|
|
187
|
-
plugins: {
|
|
189
|
+
plugins: {
|
|
190
|
+
"arrow-style": arrowReturnStylePlugin,
|
|
191
|
+
"de-morgan": deMorganPlugin
|
|
192
|
+
},
|
|
188
193
|
rules: javascriptRules
|
|
189
194
|
}, {
|
|
190
195
|
files: GLOB_TESTS,
|
|
@@ -255,7 +260,7 @@ const nodeConfig = () => {
|
|
|
255
260
|
//#endregion
|
|
256
261
|
//#region src/rules/perfectionist.ts
|
|
257
262
|
const perfectionistRules = {
|
|
258
|
-
...configs$
|
|
263
|
+
...configs$2["recommended-natural"].rules,
|
|
259
264
|
"perfectionist/sort-imports": ["error", {
|
|
260
265
|
environment: "node",
|
|
261
266
|
groups: [
|
|
@@ -526,7 +531,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
526
531
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-BVXIAVcv.mjs"), tanstackQuery),
|
|
527
532
|
isAstroEnabled && unwrap(import("./astro-BnZ2LIR3.mjs"), astro),
|
|
528
533
|
isJestEnabled && unwrap(import("./jest-Dm9_cuf3.mjs"), jest),
|
|
529
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
534
|
+
isVitestEnabled && unwrap(import("./vitest-WmpT3DEl.mjs"), vitest),
|
|
530
535
|
isTestingLibraryEnabled && unwrap(import("./testing-library-BFsBlKXl.mjs"), testingLibrary),
|
|
531
536
|
isPlaywrightEnabled && unwrap(import("./playwright-ChDf6HhZ.mjs"), playwright),
|
|
532
537
|
isStorybookEnabled && unwrap(import("./storybook-BfbeHUhi.mjs"), storybook),
|
|
@@ -27,6 +27,7 @@ const vitestRules = async (options) => {
|
|
|
27
27
|
"vitest/no-restricted-vi-methods": "off",
|
|
28
28
|
"vitest/no-test-prefixes": "error",
|
|
29
29
|
"vitest/no-test-return-statement": "error",
|
|
30
|
+
"vitest/no-unneeded-async-expect-function": "error",
|
|
30
31
|
"vitest/padding-around-all": "error",
|
|
31
32
|
"vitest/prefer-called-once": "error",
|
|
32
33
|
"vitest/prefer-called-times": "off",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.28.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,19 +41,20 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
43
|
"@eslint/js": "^9.39.2",
|
|
44
|
-
"@next/eslint-plugin-next": "^16.0
|
|
44
|
+
"@next/eslint-plugin-next": "^16.1.0",
|
|
45
45
|
"@stylistic/eslint-plugin": "^5.6.1",
|
|
46
46
|
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
47
47
|
"@types/eslint": "9.6.1",
|
|
48
48
|
"@typescript-eslint/parser": "^8.50.0",
|
|
49
49
|
"@typescript-eslint/utils": "^8.50.0",
|
|
50
|
-
"@vitest/eslint-plugin": "^1.5.
|
|
50
|
+
"@vitest/eslint-plugin": "^1.5.4",
|
|
51
51
|
"astro-eslint-parser": "^1.2.2",
|
|
52
52
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
53
53
|
"eslint-config-prettier": "^10.1.8",
|
|
54
54
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
55
55
|
"eslint-plugin-arrow-return-style-x": "^1.2.6",
|
|
56
56
|
"eslint-plugin-astro": "^1.5.0",
|
|
57
|
+
"eslint-plugin-de-morgan": "^2.0.0",
|
|
57
58
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
58
59
|
"eslint-plugin-import-x": "^4.16.1",
|
|
59
60
|
"eslint-plugin-jest": "^29.5.0",
|