@mlaursen/eslint-config 5.1.3 → 5.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 +10 -0
- package/dist/base.js +13 -16
- package/dist/index.d.ts +1 -2972
- package/dist/index.js +1 -7
- package/dist/jsxA11y.js +2 -5
- package/dist/react.js +1 -2
- package/dist/typescript.js +3 -0
- package/package.json +16 -17
package/dist/index.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
var globals_1 = __importDefault(require("globals"));
|
|
8
|
-
exports.globals = globals_1.default;
|
|
3
|
+
exports.gitignore = exports.config = exports.configs = void 0;
|
|
9
4
|
var typescript_eslint_1 = require("typescript-eslint");
|
|
10
5
|
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return typescript_eslint_1.config; } });
|
|
11
6
|
var base_1 = require("./base");
|
|
@@ -35,6 +30,5 @@ exports.configs = {
|
|
|
35
30
|
exports.default = {
|
|
36
31
|
config: typescript_eslint_1.config,
|
|
37
32
|
configs: exports.configs,
|
|
38
|
-
globals: globals_1.default,
|
|
39
33
|
gitignore: gitignore_1.gitignore,
|
|
40
34
|
};
|
package/dist/jsxA11y.js
CHANGED
|
@@ -16,7 +16,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.jsxA11y = void 0;
|
|
18
18
|
var eslint_plugin_jsx_a11y_1 = __importDefault(require("eslint-plugin-jsx-a11y"));
|
|
19
|
-
var globals_1 = __importDefault(require("globals"));
|
|
20
19
|
var constants_1 = require("./constants");
|
|
21
20
|
/**
|
|
22
21
|
* @example
|
|
@@ -27,16 +26,14 @@ var constants_1 = require("./constants");
|
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
28
|
exports.jsxA11y = [
|
|
30
|
-
__assign(__assign({ name: "".concat(constants_1.BASE_NAME, "/jsx-a11y"), files: constants_1.JSX_FILES }, eslint_plugin_jsx_a11y_1.default.flatConfigs.recommended), {
|
|
31
|
-
globals: __assign({}, globals_1.default.browser),
|
|
32
|
-
}, rules: {
|
|
29
|
+
__assign(__assign({ name: "".concat(constants_1.BASE_NAME, "/jsx-a11y"), files: constants_1.JSX_FILES }, eslint_plugin_jsx_a11y_1.default.flatConfigs.recommended), { rules: {
|
|
33
30
|
// I **only** use autoFocus within dialogs which provide the correct
|
|
34
31
|
// context for screen readers.
|
|
35
32
|
"jsx-a11y/no-autofocus": "off",
|
|
36
33
|
} }),
|
|
37
34
|
{
|
|
38
|
-
files: constants_1.TEST_FILES,
|
|
39
35
|
name: "".concat(constants_1.BASE_NAME, "/jsx-a11y/testing"),
|
|
36
|
+
files: constants_1.TEST_FILES,
|
|
40
37
|
rules: {
|
|
41
38
|
"jsx-a11y/anchor-has-content": "off",
|
|
42
39
|
"jsx-a11y/click-events-have-key-events": "off",
|
package/dist/react.js
CHANGED
|
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.react = void 0;
|
|
18
18
|
var eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
|
|
19
19
|
var eslint_plugin_react_hooks_1 = __importDefault(require("eslint-plugin-react-hooks"));
|
|
20
|
-
var globals_1 = __importDefault(require("globals"));
|
|
21
20
|
var constants_1 = require("./constants");
|
|
21
|
+
// Why is the typedef optional?
|
|
22
22
|
var flat = eslint_plugin_react_1.default.configs.flat;
|
|
23
23
|
var reactPlugins = flat.recommended.plugins;
|
|
24
24
|
var recommendedRules = flat.recommended.rules;
|
|
@@ -54,6 +54,5 @@ exports.react = [
|
|
|
54
54
|
additionalHooks: "(useIsomorphicLayoutEffect)",
|
|
55
55
|
},
|
|
56
56
|
] }),
|
|
57
|
-
languageOptions: __assign(__assign({}, flat.recommended.languageOptions), { globals: __assign({}, globals_1.default.browser) }),
|
|
58
57
|
},
|
|
59
58
|
];
|
package/dist/typescript.js
CHANGED
|
@@ -45,6 +45,9 @@ exports.typescript = __spreadArray(__spreadArray(__spreadArray([], __read(base_1
|
|
|
45
45
|
name: "".concat(constants_1.BASE_NAME, "/typescript"),
|
|
46
46
|
files: constants_1.TS_FILES,
|
|
47
47
|
rules: {
|
|
48
|
+
// I normally do not want unified signatures since it helps improve type
|
|
49
|
+
// inference with function overloading
|
|
50
|
+
"@typescript-eslint/unified-signatures": "off",
|
|
48
51
|
// I prefer specifying when something is used only as a type
|
|
49
52
|
"@typescript-eslint/consistent-type-imports": [
|
|
50
53
|
"error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlaursen/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "An eslint config used by mlaursen for most projects.",
|
|
5
5
|
"repository": "https://github.com/mlaursen/eslint-config.git",
|
|
6
6
|
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
|
|
@@ -20,32 +20,31 @@
|
|
|
20
20
|
"typescript"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eslint/compat": "^1.2.
|
|
24
|
-
"@eslint/js": "^9.
|
|
23
|
+
"@eslint/compat": "^1.2.2",
|
|
24
|
+
"@eslint/js": "^9.14.0",
|
|
25
25
|
"@next/eslint-plugin-next": "^14.2.15",
|
|
26
26
|
"@types/eslint__js": "^8.42.3",
|
|
27
|
-
"@typescript-eslint/utils": "^8.
|
|
28
|
-
"eslint-plugin-jest": "^28.
|
|
27
|
+
"@typescript-eslint/utils": "^8.13.0",
|
|
28
|
+
"eslint-plugin-jest": "^28.9.0",
|
|
29
29
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
30
|
-
"eslint-plugin-jsx-a11y": "^6.10.
|
|
31
|
-
"eslint-plugin-react": "^7.37.
|
|
30
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
31
|
+
"eslint-plugin-react": "^7.37.2",
|
|
32
32
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
33
|
-
"eslint-plugin-testing-library": "^6.
|
|
34
|
-
"
|
|
35
|
-
"typescript-eslint": "^8.8.1"
|
|
33
|
+
"eslint-plugin-testing-library": "^6.4.0",
|
|
34
|
+
"typescript-eslint": "^8.13.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"@changesets/cli": "^2.27.9",
|
|
39
|
-
"@inquirer/prompts": "^7.0.
|
|
38
|
+
"@inquirer/prompts": "^7.0.1",
|
|
40
39
|
"@octokit/core": "^6.1.2",
|
|
41
|
-
"@types/node": "^
|
|
40
|
+
"@types/node": "^22.9.0",
|
|
42
41
|
"dotenv": "^16.4.5",
|
|
43
|
-
"eslint": "^9.
|
|
42
|
+
"eslint": "^9.14.0",
|
|
44
43
|
"husky": "^9.1.6",
|
|
45
|
-
"inquirer": "^12.0.
|
|
44
|
+
"inquirer": "^12.0.1",
|
|
46
45
|
"lint-staged": "^15.2.10",
|
|
47
46
|
"prettier": "^3.3.3",
|
|
48
|
-
"tsx": "^4.19.
|
|
47
|
+
"tsx": "^4.19.2",
|
|
49
48
|
"typescript": "^5.6.3"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
@@ -69,8 +68,8 @@
|
|
|
69
68
|
]
|
|
70
69
|
},
|
|
71
70
|
"volta": {
|
|
72
|
-
"node": "
|
|
73
|
-
"pnpm": "9.12.
|
|
71
|
+
"node": "22.11.0",
|
|
72
|
+
"pnpm": "9.12.3"
|
|
74
73
|
},
|
|
75
74
|
"scripts": {
|
|
76
75
|
"clean": "rm -rf dist",
|